Okay,
well,
if it does not particularly like me sharing the screen,
I can walk,
I can walk through what's happening on my website,
which might be the best thing to do.
Then I can see if it makes us any banter, it was sharing the screen earlier.
So, I'm just not sharing it now so, some sort of load loading at different times of the day is what? I'm almost wondering that it works better at sometimes is the day, that other times of the day.
But in any case, then, see, if I put this on descent, then.
Try two different, two different screens here.
You're saying the from two different position.
Okay,
well,
I'll walk through what I prepared and then you can look at it on the on the website might even be the easiest to do.
Anyone can bring up a web browser at the same time. And then you can see what I'm doing.
Alternatively, you can see if it can share candid camera.
Well, okay, well, we can walk through what I am. What I prepared on the website then, and then you can check it after. So, this will be in a sense, a facilitate, a facilitated learning thing. Sorry?
And questions about the final exam. It'll be next Monday as as you preferred twenty four hours to do it.
I'll put it online at four PM and you time that would be Eastern Daylight time,
and you can come back and you'll have until four PM Tuesday to hand and the result,
the particular technology I'm still playing with.
You will need to know the connection. It might be direct on great scope, or you do it, and you cannot integrate scope. The exam will be optional.
It will replace exam one higher the course weights or the exam will be forty percent and the homeworks sixty percent will drop the lowest homework and to help people lower all the letter
grades by one category.
So the syllabus said that ninety five and up with an eighty nine came up, was a minus, and so on ninety and up will be an, a, and eighty five and up and a minus. And so we'll lower all the letter grades by will eat them by one category.
And also, you still have the right to after you see your grade to convert to a past. No credit. Yeah. You're welcome. So that That'll help you out someone and I know.
You're having you you're having a tough. I agree. You didn't expect this to happen, but then, you know, we didn't expect this to happen either. So we're all trying to give a little.
And so what I'm doing also, so, you know, deleting some stuff from the course, but I'm giving you an introduction to things and yes I'm releasing the exam Monday at four PM.
And then you'll have until Tuesday at four PM. So this will accommodate people, you know, a good chunk of the class is now, perhaps twelve hours away. And so this will help you if you don't have to wake up at four a M, to do this.
So, that said, we still have some standards.
So,
I'll be curious and seeing so you get the letter grade and after that,
we have a form on website somewhere off with the link up,
which you can elect to convert to a pass credit.
So, I'm curious at what point people will want to convert from a letter great to a pass. So, That'll be interesting to see the second point on the I have on today. So.
The today's blog for for class. Twenty four is totally coincidentally, I found a born loser comic related to the statistics below the GPA.
Okay thanks. So so I don't actually know what are I don't even know if I could take it through various computer files and find out. I wouldn't want to know before I was doing these. Great. Okay.
Any cases are born, lose their card to and related to one of my statistics paradoxes. Also I handed out a a homework nine. It's online now, and it's due in a week.
Usual way on great scope. I want to try one more attempt to see if I can.
Make these things I, I really would like to share the screen chilly if I could.
Can you have letter grades before the final exam? Well, I won't have homework nine, but yeah.
Good point. Well, you have your homework? Yeah. Let me try and see what I can do.
Actually, let me try. Okay, let me just make a note before I forget.
Okay, I'll I'll try.
Okay, this is so.
We're just gonna curiosity is anyone seeing my laptop screen at the moment?
Because again, even my second computer doesn't always show me what you're showing. You're not necessarily. Okay. Okay. Any case. So, back to okay so homework nine.
Starting to share content. Well, thank you. It would be nice if it.
Caught up yeah I would I think is happening is, I'm hitting, my guess is that we're hitting a capacity problem with web at a prime time of the day.
It sucks. But okay. What I can do at least is I updated the class blog for today and, and you can, you know, you can call that up. Also.
If you want to computers in front of you, you could bring up a second window showing the class blog.
Well, one thing, what I typed up today was some information on math lab for students. Now I was somewhat surprised actually, when a couple of people told me, they were not familiar with Matlab.
So I asked around and the department, and I'm told, you actually were supposed to have been introduced to it in ten, ten and twenty ten. It's ninety one. It was a long time ago.
I guess, in any case, if you, if you're not familiar with it, let me summarize it for you, it's a package for calculation and it works.
It's you don't have to compile program if you type stuff and you get an answer, and it's designed to work with matrices. It's and it's designed. It has a lot of add on packages. That are very useful for engineers things to do a signal processing and control and stuff like that.
So there's a very large number of packages for engineers. And it also, if you want to say work with large matrices or you want to invert matrices, it's fine. I can value stuff like that.
It's algorithms are very efficient. They have hired as consultants some of the leaders in the fields. So, and I met the guy that did, for example, some of their matrix algorithms named Tim Davis.
And, you know, so he does stated the, you know, computer code and his code is in math lab. He also makes stuff available for free actually, on things like a C plus plus packages.
So, as these template libraries. So, if you know, C, plus plus, and you like playing with templates, you could get some of his algorithms, secret sauce functions for free, or you could use a Matlab. But Matlab is easier at the start.
So, in any case, it works with matrices and you can also do for loops and so on but it's better to work with matrices and.
And so you can do explore it, you can do very large projects on it research. You can also do exploration.
So,
what I've got here,
and I would,
I mean,
I have a Matlab session in the background I would run if I could,
but it's still just starting to share then unfortunately,
I can't run it,
but I have examples here and just simple things start off with random integer,
random numbers,
not round of normal uniforms.
You can do a lot of that stuff. You can it's got functions to work with calcium, normal distribution.
It has, it can handle about twenty of the most common probabilty distributions, normal uniform plus all discrete, discrete ones, like binomial and so on.
And so you can so it's good.
So let's go all the common stuff built in a lot of ones that have not discussed in class, but are in the book, I have an example here, or you can do a cumulative density function, or a probability density function.
The thing was Matlab is it doesn't work with algebra Mathematica that I showed you works with algebra. You can tell Mathematica integrate X query. That will reply. A third of execute.
Matlab is not that well, unless you have a call out to.
Some algebra package and so so when it works with, say, a normal, you would give it a set of points.
I have an example here I say, evaluate the normal density distribution function at one, two and three by the way the arguments for the normal thing.
It's the X values evaluated at and the mean and the standard deviation and did look density function and it will return a factor of Y, values the same length as the factor X values.
So you can evaluate the normal Kelsey and you can do random permutation sampling. And so on, okay, I've got one here. That's a little messed up. I'm sorry about that.
It's, it's running it as it's filling. It is one paragraph I attempted to have it as separate lines. Show you how you can just type in a simple matrix. So.
Two by two matrix elements one, two, three, four you can find the inverse. You can multiply. Just the star is is matrix model, application, dot star operator, sell and file. Multiplication.
You can find you can add major seats element element. You can get special matrix. Nice. Like, an identity Matrix, they call it II you can find eigen values of a matrix, just hit the I. T. function. There's another function. I didn't list to find. I can factors. Also.
If you apply one of your usual functions, like, sign Co signed square root to a matrix, it applies it element by element and returns a matrix of factor of Y, values. It's the same shape as the X values.
Yes, you can PoC I have a function there. Oh, you can do a sequence since this works with numbers not with algebra you may often want to give it a sequence of X values.
So, if you say zero call and ten, you'll get zero, one, two, three, six, seven, eight, nine, ten, you say zero, colon point, one, colon, ten, you'll get a sequence of every point, one from zero to ten.
So this is the easy way to create a sequence of X values for whatever you want to do a plot. So you create a sequence of X values and C, Y, equals sign of X and assign function of peice checks returns the vector Y, values.
And then you say X, Y, and you plot it.
And then the plot function has all sorts of options to make the thing look beautiful. You can label your acts easy to put things in color, blah, blah, blah, blah, blah and but I gave X Y, is the simplest, possible way.
That's for one very flexible and the to deploy. It can do very nice. Two D, plots shaded in perspective. They're a little more complicated.
What you do is and I have it down on the blog. Here.
You create a sequence of access, you create a sequence of wise, and you do something called mesh grid, which returns all the access repeated row after row and all the wise repeated column after column.
And I show you the syntax, your function can return two variables. Not just one. So, what I have here is square bracket X Y, Square bracket, equals mesh grid.
So returns to values X and Y, and the axis is rows at row are for all of the X values X sequences Y, is column after column of the Y, sequences.
And so you take an element from the matrix and all went for the White Mitch. You got you got a unique X Y, value and I show you how you can take this and say fine sign plus costs and then gets easy to get a matrix of these.
And then you can send it to the service function, which will do a color, a nice color shaded surface. Now that's for.
So, that's how you can do color plots to variable three D, X Y, and Z. now specifically for the homework question.
There's a page, which is very useful that I gave you, but what I'm telling you, here's a simplified version just for the normal for the calcium. There are other more complicated things, but, you know, if you're interested, you can start from what I've showed, you.
Now, one thing defined help in Mathematica, Matt. I'm sorry I find it easier just to fire up Firefox and do a search.
I say, Matlab, you know, Gaussian distribution or something and.
So, you could inside Matlab used to help, but I find it easier just to go and search in there.
And in any case, if you do that search, and this is a, they have a function for multi, you could search multivariate normal. I think that's probably what I did, her melted buried calcium.
So it has a function to work with a multivariate calcium. Finally you can now see my screen. I did nothing.
It's just the WebEx is overloaded, I think is a real Venice using Blackboards and chalk. Okay. We are now twenty five minutes into the class. You can see my screen. Okay.
What I will do is bring up and all I can think is it's loaded. I didn't do anything at the point the screen suddenly appeared. Okay now I just have.
The fact that people are switching off so if I turned off enough people, the survivors can see the screen, got it a few more people would.
Okay this is totally insane but if I can somehow.
Call up, so so I was trying to fire up Matt lab, but again I'm firing it up.
I want to run it on a server in my lab and so I'm running s. H.
and it's a remote accession and no, one can really get another thing.
I don't know for, because I'm running a faculty version of Matlab, and the faculty version has actually more features than the student version.
So I'm showing you, I can run and this be Matt lab. Okay. It's very small text. I can't help it.
So, you can just type in stuff one plus to okay, I can create a matrix call it a cause. It's a synthesis in one place to place.
There is a two by two matrix just out of curiosity here.
Seventeen people left. Okay. So this, which is so the fifteen of you that are still here welcome. Thanks to the others for leaving. So you can see something. Okay.
So, there's a two by two Matrix, if you can read the small type, and I can do the inverse of it. For example, I get that a times in verse of a, and so on okay.
As I said is, I can't really use zoom in on this. Unfortunately, okay. If I want to plot, I mean, make a sequence of axis.
I make it say one to ten and then I'll make Y, equals sign backs and onto a plot X.
Y, and the plot will pop up in a separate pay screen.
Okay, it's sorted chunky because the arguments for signer radiance, I guess so. Okay that would apply and then you could go in and edit the thing and play games with it and so on.
Okay, so that's okay now I was gonna show you more stuff so I'm sort of caught up with let me actually pop up. Oh, I gotta show you the Cognical.
So I took the time to link it in.
And,
okay,
remember,
I told you the statistical paradox,
or somebody could move from a poor region to a.
To a rich region and improve the average income of faults while here the born loser moves from one copy to another and raises the IQ at both. Okay.
Same principle, the mathematics is the same. Okay in any case back to what you're paying for.
I don't know, maybe you're paying for comics. I don't know any case. Did you to do?
We can do normals and randoms and so on I mean, things like the normal CDF, whatever, whereas my Matt window my other map window. Okay.
So, I can do something like, let me do a different set of Axis here. X equals, say, minus three to three.
Then I can say, norm PDF say it defaults to zero in signal one. And that's and I could pod it at chilling.
I mean, you say, why don't we get a few more points? So the thing actually looks semi reasonable. I'm gonna make in minus three and steps of point two to three. Okay.
Why equals norm PDF X? And I do a clock X. Y.
It will reuse a previous plot window, which will be there and very nice off to the side here. Good. You see if I want to CDF, I could say, why I see say cause norm CDF.
Y.
In this norm and then clock.
And there's the over here, we have to see, okay good. Now specifically for this is one variable. And now what we can also do it for two variables.
I'm going to what I'm going to do right now. It's actually answer the problem for you. So the fifteen of you that are still here, you get an answer to see how to do that problem.
So the two variable normal thing it takes a vector of means, which will default to zero, but I'm gonna write it in for zero and thereby means it takes a variance matrix.
So, the variance Matrix, now you can get the cold variance entries from the, the standard deviations and the correlation coefficient.
So so the cool variance Matrix, which I calculated from the stuff given is going to be one because the Sigma for the first variable is the signal for the first variable was one.
So the first entered the coherence matrix is one this here what? The second entries one point six and that is the, the second signal is to me. One point six. Okay. So what did I do here?
I can't tell.
Period there. Cool. Okay.
So the one one entry is the variance of the first variable,
which is one to two,
two entry is different to the second variable,
which is four,
because it segments to now,
the,
the off diagonal entries are the CO variants entries,
which are the correlation coefficient times to two segments and Sigma one times two and the row is point eight.
So you get one point six there in there. Okay. Excuse me. So, that does the that's the variance matrix. Now. What I can do, and I got to typed in down here.
I, I've got a list of access and what we have to do is turn it into an array of access and an array, a matrix of actions, and a matrix of wise. So I can do I can just do mesh grid. Here. I've got the access.
I'll just use that, so I can say XM se com while I am.
Equal smash grid.
Guest XX good, great.
The reason for some of this mess with stuff like mesh great is that the math lab concept of using matrices is starting to break down a little so do a mesh grid there. And then what I do is, I.
I have my list of and I gotta make a list of pairs. So P a call say.
Xm, this means Colin, stirring it out while I am string it up.
Now I have a list of pairs of axes and wise and if I follow along here, because I can't remember it myself, Pete, it into mvm PDF multivariate, normal distribution PDF.
So why goes M. G, in PDF.
The pairs and the new variable, which I just called, em, and the CO variance matrix. Do you see the right window here? Shows things? Good.
I got a list of wise and I have to reshape Y into a be. The same shape is the axis actually.
What does XM so, do you want I'm sending you saying why are for reshape equals re, shape?
Why you want to make the thirty one by thirty one Matrix?
And then I do a surface.
Xm,
why,
why are they who are it's my plot window there and right here is this thing here and here is your answer to that question.
Now, it's interactive if okay, I can go in and I can drag it and we're okay.
I could drag it over. Okay to hide any actual interactivity over this Internet thing. Oh, okay. Yeah, I can do that. And it's in the middle of updating now. So if surface that's looking straight down.
So we have a surface with a counter plug underneath it. And if I had a little more interactivity, I could actually have fun with this, in any case. So, that is an example of using abusing that.
Here's some other stuff I showed you, although the help, here's the link to the help page here and just have to reformat showing some of this stuff.
So so that is some of the.
You know, so that's a a quick introduction to math lab and just a second here. Okay.
Oh, I just, I wasn't reading the chat thing. So thanks. So DJ. Yeah, so those estimated security issues so is nice to pick web safety has the infrastructure to handle all the people?
Yeah, the well, you know, if there was better technology, I would use it, but what we're also learning, because this is the sort of thing I cannot actually test before the start of the class.
Because, you know, it works before the class and you guys join and then it stops working. So it's even impossible for me to debug the thing without finding a hundred volunteers to sign on. Okay. In any case.
So, that was my quick tutorial on Matt lab.
Any Matlab questions very large package and I just gave you a quick hint to it and it says,
I said it has a lot of toolboxes and that handle a lot of specialized things,
not all of,
which are licensed,
but it is very it is very nice in that respect so.
And as an students, you can have fun with that. Okay real productivity enhancer.
The only downside with that is this because I've used live for quite a few years. Is this forcing everything to look like a matrix starts getting tired?
Eventually if you more complicated data structures.
It can be really,
we're already seeing this a little with the surface thing,
but it can get really hard to force complicated data structures to look like matrices and it results in what is called.
Right? Only code it really compact code. You can do stuff in a few lines of code, but actually write the code. You kind of figure out what you yourself did because it's just forcing things to look like matrices.
So that's an issue when you can write explicit loose but they're incredibly slow.
But, you know, if you so, if you can make your data, look like a matrix, you're home free, because it has so many packages can handle really large matrices gigabytes. You can do stuff in parallel.
Like, you're on a, if you're on a multi core computer, then you can do stuff.
In parallel, if you have GPU attached, it computes things stuff like, say, inverting a matrix is compute bound. It takes time. That's the queue.
But the number of rows of the matrix major, because number of elements is quadratic the time to process it goes up more.
So, I can do all that in, does it all very well the problem and you can also call out to C plus plus code and stuff like that could code on and so on the problem.
Okay.
Like I said apart from what,
if your data doesn't look like a matrix,
I suppose you got all of it,
you've got trees,
you got trees and graphs and pointers all the good stuff you have in the data structures,
cause that's gonna be hard to do in Matlab,
the second point is when you add,
it's included as part of your intuition and I didn't know what paying grant annual license fee got fifty thousand box.
I, that's a crazy guess. But, of course, once you leave RPI and you get a nice paying job and I see the average starting K is what eighty, ninety thousand.
And now your company has to pay a lot more to license Matlab. So I'd like to that. It's the cocaine dealers or the crack dealers model. The first one is free, but then you pay. So, not that I would know I didn't get the idea. Okay.
So those are the pluses and minuses of Matlab. What I've personally done is graduated from Matlab writing stuff and C. plus plus I have access to the same algorithms and I've written C.
plus plus for so many decades to match the good at it.
So and another thing with Matt,
that if you can write functions,
I just haven't showed you how here,
but once you start writing functions,
the advantage of being interactive online system,
that doesn't a concept doesn't scale up is the problem for large things.
You got to be planning and designing and writing functions in advance and then you load the this is the same criticism by the way for Python. It's nice to start to do interactive stuff, but if the concept doesn't scale up to large systems, so easily.
Okay. In case, that was Matlab I'd like to switch tracks a little for a few minutes and do statistics. One question.
I would like to ask is many students have statistics courses in high school and other things, but many people do not and I would like to touch of feedback perhaps on.
You know, who has had say statistics.
Or Styx whatever you wanna call it statistics.
In high school homework nine does not create a republic for you. Okay. Did not. Okay. Okay. Oh, good. So, this is new part of the.
Course again you know, I, I can ask for a show of hands. I don't dare try the polling thing. And web C. T, it'll probably explode even my luck with it. Okay.
So I have two more two more YouTube things, and what I'll do is, you can watch them on your own you'll see a better call AP statistics. Okay, great.
You had it available, but didn't take it. No. Okay. So, what I'll do is I'll let you go asynchronous, but I have two more things in crash course statistics and just for those. That haven't had a let me first.
What regression is that's like, when you want to compute the relation between two between two variables.
I don't oh, well, Here's a topical one. Many people feel that the virus.
It does not survive as well and warm weather.
So you have some data on the web for different countries,
say what the death rate is you might,
and then you could look up the country's average temperature these last two months discipline,
weather statistics and you might want to see is there a relation to warmer countries?
Have less virus, fewer virus Des I'm going with this instead of reported cases because reported cases is such a, it depends on the testing you're doing. Okay. So that's called regression.
And the easy thing is it was a linear regression. So the draw straight line between so X value is, say, average temperature of a country, why value is death rate?
Not total number of deaths death rate now and you plot them it'll be a scatter plot and you try to find a relation and that's called regression.
Linear regression now you'll get a number you'll get out of this thing is you'll get a correlation coefficient out, which will say how much of the variance of the death rate.
Is related to temperature and it will always be less than one hundred percent and usually it's surprisingly small. So you'll get a slope for the line.
And you'll and you'll get a correlation coefficient out, which is how much is explained now and the regression video.
We'll talk about that and, of course, now we get into non math things, which is for men.
If you heard, the correlation is not causation just because there is a relation just because if you do a scatterplot between temperature and death rate, you seem to see it will be aligned slowing down high temperatures.
That doesn't mean that the high temperature caused the lower death rate, like, you know, very hot. Some of the hot countries like Africa and so they may not have had as many people travel there from infectious countries.
Maybe maybe not. I don't know.
So,
that's one limitation with that,
and another limitations are,
if there's a non linear relation,
many examples of that,
in medicine,
you get a linear relation between,
I don't know,
look look at the relation to water in your house.
If you got to the water, you dive thirst if you got a medium amount of water, you're happy and healthy. If you get a lot of water, you draw.
So, if you look at same amount of water, you have death rate. It's a U shaped curve. Okay. No water you dead. Well, so too much water. Your dad middle. You're happy. So you get these non linear relations, which are not captured. So, I'm giving you limits.
But regression is.
You know, it's a particular topic, and it goes onto things like multi regression where you got a lot of possible causes that are called independent variables and.
Then you, then you try to find the variable, which has the highest correlation with the dependent variable. That's the why and then you room.
So you'll essentially compute a new, why, where you remove the effect of the first one, then you find the second most important, independent variable and so on so you're trying to find causes. Well, it's a real thing. My roommate and I were trying in grad school.
At one point we were looking at animal performance statistics, and the animals with red race horses at in Boston. And so we'd independent variables. How many races the horse won what does the horses average speed?
How many dollars has it one, which is different for number races because some races pay more than and the dependent variable is is kinda like you to when it's an X Ray. So we've tried to find the most important statistic and so on.
Well, actually, I was in it for the math thing wasn't just looking at the horses. My roommate got into the horses, and he actually dropped out of a pH. D program at Harvard infant psych.
And then he went to law school in Canada and became a securities lawyer, so his love of racing caused him to drop out of his pH. D. program. On the other hand you got a much higher paying job.
So any case that's regression.
My other thing, they're non parametric statistics parametric, statistic, parameters, things like mean and standard deviation and so on non paramedic statistics are harder to explain their involving ordering and you can.
If you can browse site and you can, if you're interested, you can look into more of that and then you can tie to current events. We're just seeing argument swell.
You can, you can read the news you can see all these arguments about, does X affect the virus and why and so on and so on and so on one of the current fights is malarial drug help.
So you can imagine using statistics to analyze. That does a real job dry Larry drug drive you. Crazy. Yeah, it does. Everyone knows that, but you can expect that the effect of that.
Taking that malarial drug years ago before going to tropical places, and I don't think it drove me crazy, but, you know, you'll have to answer that one. So, in any case. So, you can look at statistics and I keep mentioning since I started the course never knew this all.
This stuff was gonna happen about type one type two errors. You get in statistics, you have a possible drug, does it help? Does it hurt?
Does it do nothing and just to remind you the reason for the bureaucracy, in this case, is sometimes a new drug might make things worse.
There was that morning sickness drug for women called that caused the woman's baby when born to have no hands and feet. The baby looked like a seal had slippers not hands and feet was horrible.
And everywhere else in the world legalized the drug and had thousands. Literally, thousands of children like this us did not have this problem because the US didn't legalize the drug. So that's statistics.
And again, our is trying to workload this into the course a touch more of this Thursday. And then again, Monday.
Have an exam, so I'll leave I have the chat window open that. Actually, it's to my side. I look over it to it occasionally. And I'll stay around for a few minutes in case. There's questions other than that have a good week.
I look outside my window. It's not snowing today. It's actually warm so I see you. This will be Thursday yesterday's. So.