WEBVTT mathematics/statistics/son
00:00:00.000 --> 00:00:01.300
Hi and welcome to www.educator.com.
00:00:01.300 --> 00:00:05.000
We are going to talk about expected value and variance of probability distribution.
00:00:05.000 --> 00:00:15.700
Just a brief recap of discrete versus continuous random variable is
00:00:15.700 --> 00:00:23.600
you need to understand random variable in order for us to move on to understanding expected value and variance.
00:00:23.600 --> 00:00:33.500
Then we are going to do a brief mean and variance review to just think about all the different kinds of mean and variance we have learned so far.
00:00:33.500 --> 00:00:41.800
We are going to talk about the new versions of mean and variance, mean and variance probability distribution.
00:00:41.800 --> 00:00:50.400
We are going to talk about three special situations, linear transformations of the random variable x and what happens to mean and variance,
00:00:50.400 --> 00:00:59.400
the sum of n independent values of x and the sum of difference of independent values of X and Y.
00:00:59.400 --> 00:01:02.500
Drawn from two different random variable pools.
00:01:02.500 --> 00:01:13.200
There are discrete versus continuous random variables so far we have been talking about random variable like x.
00:01:13.200 --> 00:01:57.700
x could be sum of 2 die, x could be the sum of 2 TV show, x could just be something simple like number of people in a room.
00:01:57.700 --> 00:01:59.800
It does not really matter what x is.
00:01:59.800 --> 00:02:10.300
X is whatever random variable and then whatever that random variable is you have the probability of those x in your probability distribution.
00:02:10.300 --> 00:02:16.800
That is what we have been looking at are discrete random variable.
00:02:16.800 --> 00:02:26.900
These are called discrete, their numbers like when we have the sum of two die, their numbers like 2, 12
00:02:26.900 --> 00:02:50.400
but they are discrete they are not continuous because having 1.7 as an expected value that means that if we had a distribution that look at 1, 2, 3, 4 these are our x.
00:02:50.400 --> 00:02:58.300
Having 1.7 although there is meaning it is like on average like somewhere around here for our distribution you are getting 1.7.
00:02:58.300 --> 00:03:03.700
Is it not possible to get that 1.7.
00:03:03.700 --> 00:03:17.400
Let us say we have the sum of two die, let us say that ended up an expected value of uneven set of two die and end up being 4.7.
00:03:17.400 --> 00:03:25.900
That is a perfectly fine expected value but can you ever roll an actual sum of 4.7,
00:03:25.900 --> 00:03:32.200
no that is impossible and because of that those are called discrete random variable.
00:03:32.200 --> 00:03:41.700
There are bins that you have to follow and those are the only possible values for that random variable.
00:03:41.700 --> 00:03:52.400
Now random variables like height are continuous because in something like average height or the sum of heights.
00:03:52.400 --> 00:03:55.800
It is not that I have particular values that you can have.
00:03:55.800 --> 00:03:59.400
You could have all kinds of different values.
00:03:59.400 --> 00:04:08.500
It will be less likely than others but there are infinite number of possibilities in between 2 discrete sums.
00:04:08.500 --> 00:04:17.400
We are only trying to be talking about discrete random variable and the probability distributions.
00:04:17.400 --> 00:04:26.900
So far of discrete random variables.
00:04:26.900 --> 00:04:34.100
All the stuff we have learned about expected value and all that stuff, it only works for discrete random variable.
00:04:34.100 --> 00:04:42.700
Later on will learn about how to deal with continuous random variables and that can be exciting if it can open up all the world for us.
00:04:42.700 --> 00:04:56.400
Given that, now we could do a brief review of mean and variance and we talk about samples, population and we are adding on probability distribution.
00:04:56.400 --> 00:05:04.500
With samples remember the mean is going to be symbolized by X bar while in a population the mean is symbolized by μ.
00:05:04.500 --> 00:05:13.100
Here the mean is symbolized by the expected value of x or μ sub x.
00:05:13.100 --> 00:05:23.900
First off, you know that the symbols are different, but the sample and population what you end up having to do is summing all the x.
00:05:23.900 --> 00:05:38.900
I=1 to n then dividing by how many number you have.
00:05:38.900 --> 00:05:48.500
In populations, what you end up doing is basically the same thing except you just change the notation slightly
00:05:48.500 --> 00:05:57.000
so that it reflects that you are doing this for the entire population, not just your little subset sample.
00:05:57.000 --> 00:06:16.700
Here we have x sub i just like before but instead i going from 1 to n, we have from 1 to N and divide by N and the number of all different people in your population.
00:06:16.700 --> 00:06:25.000
At first glance you might think what we learned about expected value might look a little bit different to you
00:06:25.000 --> 00:06:36.200
because you have the sum of all these different values of all these different x times the probability of those x.
00:06:36.200 --> 00:06:44.800
you might think we are not like adding them up and dividing by n, but in fact we are because let us unpack the p(x).
00:06:44.800 --> 00:06:55.600
If you think about the probability of X, think about double-clicking on it and we open it up what is actually inside?
00:06:55.600 --> 00:07:23.900
What is actually inside is the number of x, the number of times where you will get x out the total frequency.
00:07:23.900 --> 00:07:36.000
We are looking at something divided by the total frequency of however many it is but we are also weighting it by the number of x.
00:07:36.000 --> 00:07:50.000
Before we had things like 1 out of 36, there are 36 possible outcome and the number of times where you will get 1-1 is just 1out of 36.
00:07:50.000 --> 00:08:10.200
We can change that into a probability or we could unpack it as the number of times you will get x out of the total frequency, the total number of outcomes.
00:08:10.200 --> 00:08:12.800
It will be a little bit more transparent.
00:08:12.800 --> 00:08:23.100
In that way we have in your weighting x by however frequent it is and dividing by the total.
00:08:23.100 --> 00:08:32.800
That is very similar to our notion of mean like all these x divide by some total number of something.
00:08:32.800 --> 00:08:38.500
In that way we have that idea still present here we just have to unpack it a little.
00:08:38.500 --> 00:08:41.500
Let us talk about variance.
00:08:41.500 --> 00:08:50.200
Before what we want from variance was something like average distance away from the mean.
00:08:50.200 --> 00:08:59.100
We want these points and we want to know through the average distance away from the mean and we could not just look at deviations away from the mean
00:08:59.100 --> 00:09:08.200
because when you have x - X bar sometimes we positive and sometimes the only negative, so that is adding up to 0.
00:09:08.200 --> 00:09:12.800
We will square everything right.
00:09:12.800 --> 00:09:21.700
Here and in sample the variance we called s² actually.
00:09:21.700 --> 00:09:27.700
Here we would call this Sigma² and let us start here.
00:09:27.700 --> 00:09:39.900
The Sigma² what we are going to do is just take all of the difference squared deviations away from the mean.
00:09:39.900 --> 00:09:54.900
Take all these x and get all their squared deviations away from the mean, and then divide by N, how many x we have.
00:09:54.900 --> 00:09:58.500
It is the same i from 1 to N.
00:09:58.500 --> 00:10:10.300
When we looked at variance and more importantly standard deviation, which is going to be the square root of the things,
00:10:10.300 --> 00:10:20.300
what we wanted was the same idea, so squared deviation and this time we use x bar².
00:10:20.300 --> 00:10:29.600
Now we need to do a little bit of a correction and so we divide by n-1.
00:10:29.600 --> 00:10:49.600
In order to get standard deviation we just square root both sides and we get as square roots of x sub i – x bar² over n -1.
00:10:49.600 --> 00:11:09.500
You could also square that square root both sides here and we get Sigma equals the square root of sum of squared deviation away from μ this time over n.
00:11:09.500 --> 00:11:17.900
Let us sample population, but now let us talk about in probability distribution.
00:11:17.900 --> 00:11:34.000
Just like how here you see how μ is like population because probability distribution theoretical, so we use those Greek letters.
00:11:34.000 --> 00:11:41.900
Here we will use sigma, square that for variance but we will also put that x there.
00:11:41.900 --> 00:11:45.500
Instead of expected value we call this variance.
00:11:45.500 --> 00:11:54.200
You could write it as bar x or sigma sub x².
00:11:54.200 --> 00:12:04.600
If you break this down you could see the similarity but once again I will put it in the probability form where now you are summing the squared deviation.
00:12:04.600 --> 00:12:34.800
It is x - and imagine what you would pick here, you would not put μ or X bar, you would put it corresponding mean, which is μ sub x² times the P(x).
00:12:34.800 --> 00:12:36.700
You multiply all these together.
00:12:36.700 --> 00:12:43.900
It is the same thing if you break it apart you could see sort of this piece and this piece.
00:12:43.900 --> 00:12:55.300
This piece is very similar here and we are using probability to weight each x and then divided by the total number of outcomes.
00:12:55.300 --> 00:13:06.200
You could see this part is very similar to these parts and once again you could break down p(x)
00:13:06.200 --> 00:13:14.600
to be in a number of outcomes that look like X over the total number of outcomes.
00:13:14.600 --> 00:13:19.900
You could break it down, but here I'm going to write the standard deviation form.
00:13:19.900 --> 00:13:32.200
All you do is square root both sides, so it is not just Sigma, but Sigma sub x will be equal to the square root of this whole thing.
00:13:32.200 --> 00:13:44.200
Sum of X – μ sub x² × p(x).
00:13:44.200 --> 00:14:04.000
You can see that there are some real close similarities, but there are some subtle differences now too and I should say that still for discrete random variable.
00:14:04.000 --> 00:14:09.500
This is in the case where X is the discrete variable.
00:14:09.500 --> 00:14:14.100
Let us see some example situation.
00:14:14.100 --> 00:14:16.700
We have seen this situation in the lesson previous.
00:14:16.700 --> 00:14:21.400
At the state fair you can play fish for cash, a game of chance that cost $1 to play.
00:14:21.400 --> 00:14:26.000
You are going to fish out a card that have dollar amount that you of one from a giant fishbowl and here is the probability distribution
00:14:26.000 --> 00:14:35.100
and all these different potential winnings and the probability of those winnings.
00:14:35.100 --> 00:14:51.700
I put those here and before we look at how to find expected value and now we know how to find the standard deviation of these winnings.
00:14:51.700 --> 00:14:55.000
We know the formula that we could use and we could think about what the idea is.
00:14:55.000 --> 00:15:08.500
If expected value, if this is roughly the mean of the probability distribution
00:15:08.500 --> 00:15:21.600
and that is over time, over many, many cases this will be the mean over the mean of winning.
00:15:21.600 --> 00:15:25.800
We can think about what variance of x means.
00:15:25.800 --> 00:15:30.400
That means what is the spread around that mean?
00:15:30.400 --> 00:15:37.000
If we have large variance it means that there is lots of spread around it.
00:15:37.000 --> 00:15:41.600
There are small variance that is very consistent around that means right.
00:15:41.600 --> 00:15:51.400
You can think of this as the spread of the probability distribution, the mean or center.
00:15:51.400 --> 00:15:57.500
We are getting at these same concepts again like shape, center, spread.
00:15:57.500 --> 00:16:02.700
Here we have center and spread but now we are not just talking about distribution we are talking specifically about probability distribution.
00:16:02.700 --> 00:16:13.600
We could find the variance of this probability distribution if we wanted to.
00:16:13.600 --> 00:16:17.600
Let us talk about some special cases.
00:16:17.600 --> 00:16:28.200
There are going to be some cases where you have a very similar setup to the ones that we have just discussed where you know you need a probability distribution.
00:16:28.200 --> 00:16:32.200
There are going to be some subtle changes.
00:16:32.200 --> 00:16:39.000
One example is when you have some random variable, like winnings.
00:16:39.000 --> 00:16:45.500
But these winnings or this random variable is transformed linearly, somehow.
00:16:45.500 --> 00:16:56.400
Remember linear transformations are whenever you add a constant or subtract a constant either way, or if you multiply or divide by constant.
00:16:56.400 --> 00:17:03.200
Those are both linear transformation and doing some combination of the two that it still linear transformation.
00:17:03.200 --> 00:17:06.800
An example situation might be something like this.
00:17:06.800 --> 00:17:12.000
You have that same fish for cash game, but they have a special day where they have a promotion
00:17:12.000 --> 00:17:16.500
where whatever you get you pick at random you get triple the value for that day.
00:17:16.500 --> 00:17:20.500
What would be the expected value of that game?
00:17:20.500 --> 00:17:24.100
All information you need is actually there.
00:17:24.100 --> 00:17:30.200
We are going to talk about how to find expected value and variance for this kind of situation.
00:17:30.200 --> 00:17:37.400
Another special case is if you have an independent value of x and their sum together.
00:17:37.400 --> 00:17:47.100
For instance if you play that fish for cash game, but you buy 3 ticket, you played three times in a row and so you pick 3 ticket at random and their values are summed.
00:17:47.100 --> 00:18:05.200
In that case you have an independent values, n(3) independent events of this random variable, winnings
00:18:05.200 --> 00:18:17.500
and their sum together and you want to know what expected value should I have for this kind of situation and what is the variance?
00:18:17.500 --> 00:18:18.700
We are going to talk about that.
00:18:18.700 --> 00:18:28.800
And finally the last special case for you to talk about is when you have an independent value from x and another one from y
00:18:28.800 --> 00:18:33.700
and then you either sum one together or subtract one from the other.
00:18:33.700 --> 00:18:36.400
Some kind of combination of that.
00:18:36.400 --> 00:18:44.000
In this case it might be something like there is 2 fish for cash booths, it was 2 games that are similar
00:18:44.000 --> 00:18:48.900
and you buy a ticket from one booth and you buy ticket from another booth.
00:18:48.900 --> 00:18:54.300
And you know the probability distributions of both X and Y separately.
00:18:54.300 --> 00:19:00.100
What is expected value of this sum together or are subtracted from each other?
00:19:00.100 --> 00:19:04.300
What is the variance?
00:19:04.300 --> 00:19:14.400
These are the three different kinds of special cases that we are able to figure out just from having all of the same information we have had so far.
00:19:14.400 --> 00:19:22.900
We could just do a little bit of reasoning around these issues and I will come to some shortcuts.
00:19:22.900 --> 00:19:26.300
First let us talk about linear transformation.
00:19:26.300 --> 00:19:36.200
A linear transformation is whenever you have some x, so this is my old X, my old winnings value and you might multiply or divide it by some constant.
00:19:36.200 --> 00:19:47.000
We will call it d here, it is just traditionally called d or we might add or subtract a constant here.
00:19:47.000 --> 00:19:51.100
I just use that addition sign because it could always be that c is negative.
00:19:51.100 --> 00:20:02.900
In order to get my μ x I multiply by something, I divided by something, I add something to it.
00:20:02.900 --> 00:20:11.800
And then I get my new x as long as C and D are the same for every single value of X it is considered a linear transformation.
00:20:11.800 --> 00:20:20.500
Given these kinds of linear transformations, what happens to the mean and variance of the probability distribution?
00:20:20.500 --> 00:20:28.900
If you think about it, let us think about the concrete case of I picked a ticket and I get three times the value.
00:20:28.900 --> 00:20:42.800
You would expect that the mean which shift upwards and now you can win that money even though you spend a dollar you could win more money.
00:20:42.800 --> 00:20:53.400
If we need this value smaller somehow like what they are either severely for the game,
00:20:53.400 --> 00:21:07.500
but let us say whatever to get you pulled out you would only receive half for that value but it could happen.
00:21:07.500 --> 00:21:10.900
What would happen to the mean there?
00:21:10.900 --> 00:21:13.800
The mean should probably shift down a little bit.
00:21:13.800 --> 00:21:29.300
When you look at the μ, here we have old μ, this is old μ, old expected value.
00:21:29.300 --> 00:21:46.800
What should we do to this old expected value to reflect the changes that are going on in our underlying x, our underlying value?
00:21:46.800 --> 00:22:01.600
Here is what we do, in order to find the new μ and we will call this μ(c + dx) or we could have also called it μ(x μ).
00:22:01.600 --> 00:22:07.300
To find this new one, what we would still actually sort of simple.
00:22:07.300 --> 00:22:11.800
We will do the same transformation to the old μ.
00:22:11.800 --> 00:22:25.700
Whatever you did to the individual values, the individual x you do to the μ and you got your new μ.
00:22:25.700 --> 00:22:37.100
That is a nice way about the μ directly reflects the changes to the transformations to that individual values that they came from.
00:22:37.100 --> 00:22:39.000
How about variance?
00:22:39.000 --> 00:22:54.700
The old variance looks just like this, this is old bar x.
00:22:54.700 --> 00:23:02.500
What should we do to all variance in order to transform it into the new variance?
00:23:02.500 --> 00:23:08.100
Let me put a line here so that we can keep this separate.
00:23:08.100 --> 00:23:21.700
Here you are not going to add c necessarily because adding a constant does not necessarily make the spread wider or anything like that.
00:23:21.700 --> 00:23:32.000
We can now actually ignore the constant but only do now is let me write the new version.
00:23:32.000 --> 00:23:43.000
Here, the new version has C + dx or you could think of that as Sigma² x μ.
00:23:43.000 --> 00:23:52.900
The μ variance of x would now be it could ignore the c part, all we use is the D.
00:23:52.900 --> 00:24:11.200
This is the old variance and so here we multiply by d² and so what we are seeing is that the variance for actual of d
00:24:11.200 --> 00:24:31.300
is no matter whether d is negative or positive the variance gets larger when you do these linear transformation multiplicative transformation of your random variable.
00:24:31.300 --> 00:24:44.800
Just to round it out, if you wanted to know standard deviation, so if you wanted C+ dX, this is standard deviation it is not squared anymore.
00:24:44.800 --> 00:24:48.400
If you wanted that you would just square this and that.
00:24:48.400 --> 00:25:00.200
That would just be d but the positive version of d, absolute value of d × sigma.
00:25:00.200 --> 00:25:14.000
What we see is roughly the same idea as here, except everything has been squared root in.
00:25:14.000 --> 00:25:20.000
When you transformation are pretty straightforward.
00:25:20.000 --> 00:25:24.200
When it is the new μ you do the same transformation.
00:25:24.200 --> 00:25:34.800
When it is variance, the new variance you multiplied by a d² and you ignore the c.
00:25:34.800 --> 00:25:37.700
You do not need c in order to look at spread.
00:25:37.700 --> 00:25:46.400
What if we have n independent values of x?
00:25:46.400 --> 00:25:55.000
This is the case where picking out let us say three separate independent tickets/
00:25:55.000 --> 00:25:57.800
Let us say there is like 1 million tickets in there.
00:25:57.800 --> 00:26:03.700
We can almost treat each picking of the ticket as an independent event.
00:26:03.700 --> 00:26:10.900
We have n independent value of X, the same random variable.
00:26:10.900 --> 00:26:26.300
The same goal of winning and what happens to the μ sub x and sigma sub x² when we add these three separate values together.
00:26:26.300 --> 00:26:41.300
Let us think about this μ sub x, this is the expected value of just x by itself.
00:26:41.300 --> 00:26:54.400
We do not know which one, the first one it is just the expected value of x.
00:26:54.400 --> 00:27:01.600
Presumably each independent event has the same expected value of x.
00:27:01.600 --> 00:27:03.800
The first one, second one, third one.
00:27:03.800 --> 00:27:13.600
When you add them together, it is sort of like here is the average and let us say you take it out three different things
00:27:13.600 --> 00:27:20.600
and you add them together it will be like multiplying the average by three to get an estimate of your new μ.
00:27:20.600 --> 00:27:40.800
Here what is the expected value of now it is not just x but it is x1 + x2 + x3 and assuming that
00:27:40.800 --> 00:27:51.300
these are all independent but that will just be n however many times it is it could be 4, 5 tickets.
00:27:51.300 --> 00:27:57.700
N × my expected value for each event.
00:27:57.700 --> 00:28:20.900
μ sub x and we could have written as μ sub x + μ sub x + μ sub x, but in this way we are just noting that it is however many independent values you have.
00:28:20.900 --> 00:28:28.300
It does not have to be 3, it could be 4, it could be 10, could be 4.5, it does not matter.
00:28:28.300 --> 00:28:31.900
We could just put it up as n.
00:28:31.900 --> 00:28:33.700
That makes life easier.
00:28:33.700 --> 00:28:37.800
It is a little bit of jump but it is very reasonable.
00:28:37.800 --> 00:28:49.200
We can think about what is the variance of this x1 + x2 + x3?
00:28:49.200 --> 00:28:53.300
Let us think about this.
00:28:53.300 --> 00:29:07.100
Here we did not add any constant and if it increases by this match will probably just increase the variance as well.
00:29:07.100 --> 00:29:20.400
But not increase the variance as much as when you have one value multiplied by three here were adding three separate values that roughly have the same variance.
00:29:20.400 --> 00:29:28.000
This should probably just be something like n × Sigma sub x².
00:29:28.000 --> 00:29:34.100
It is almost like for each of these are just adding in that variance.
00:29:34.100 --> 00:29:57.100
It is just n × variance and then when you look at the standard deviation, once you know this it is a very simple if the square root of n × the old standard deviation.
00:29:57.100 --> 00:30:04.900
In this one is actually a little bit simpler to reason through because you can think of it as they are adding in these values.
00:30:04.900 --> 00:30:13.400
You add in the expected value and you add in the variance.
00:30:13.400 --> 00:30:15.700
It is very straightforward.
00:30:15.700 --> 00:30:33.500
Notice that here, this expected value is very similar to if you had taken a card and multiply that by three.
00:30:33.500 --> 00:30:38.700
The expected value is the same but the variance is actually slightly different.
00:30:38.700 --> 00:30:45.900
Here the variance is a little bit less because before it was d² but here it is just n.
00:30:45.900 --> 00:30:53.900
The variance is a little bit less in this case, than in the case of linear transformation.
00:30:53.900 --> 00:31:01.100
I want to make that little bit more clear.
00:31:01.100 --> 00:31:09.400
Here is the x are transforms linearly but here you are not transforming the x themselves.
00:31:09.400 --> 00:31:18.300
You are adding together three independent events and because of that here you can have less increase in variance.
00:31:18.300 --> 00:31:25.800
Here are the more of the increase in variance and so because of that, although this looks very similar
00:31:25.800 --> 00:31:34.700
because it is whatever you however many times you get to put it back there.
00:31:34.700 --> 00:31:48.500
Here you square that d and here you just have n times but notice that both here and here the expected value are the same because here c is 0 and D is going to be 3.
00:31:48.500 --> 00:31:57.700
Here n is 3 so the expected values are trying to be the same.
00:31:57.700 --> 00:32:09.100
Let us go on to a situation where you have 2 random variable.
00:32:09.100 --> 00:32:13.900
We already have been looking at one random variable so far, but now we have 2 random variables.
00:32:13.900 --> 00:32:32.300
You can think of them like 2 separate fishbowls and each has a different probability distribution of winnings.
00:32:32.300 --> 00:32:48.300
Each of them have these two distributions and I want to know if I take 1 from here and 1 from here what is the expected value over time of that sum or the difference?
00:32:48.300 --> 00:32:51.700
It also works for difference right.
00:32:51.700 --> 00:32:54.200
This one is pretty straightforward.
00:32:54.200 --> 00:33:02.300
If you have μ(x) + y because I am adding together 1 from x and 1 from y
00:33:02.300 --> 00:33:10.900
the expected value of this new sum is going to be the expected value of x + expected value of y.
00:33:10.900 --> 00:33:28.500
And if I wanted to do x – y, I want to come it in that way, as you could guess μ sub x – μ sub y.
00:33:28.500 --> 00:33:35.800
It is the difference of those expected value and the way you could think about it like this is when you pick out x, the expected value of that x is μ sub x.
00:33:35.800 --> 00:33:38.500
That is why they call it expected value.
00:33:38.500 --> 00:33:51.700
Instead of putting in just x we could plug-in for the expected value of x and here instead of putting in y
00:33:51.700 --> 00:34:01.100
we could plug in the expected value of y and that is our most high probability estimate of what x + y is.
00:34:01.100 --> 00:34:13.200
The same when subtracting X and Y but variance is little bit different because variance does not necessarily work in that parallel way.
00:34:13.200 --> 00:34:26.600
Here we have Sigma( x + y)² so the variance of X + y that is pretty straight forward.
00:34:26.600 --> 00:34:32.300
It is the variance of 1 + the variance of the other, straightforward.
00:34:32.300 --> 00:34:38.800
This is sort of the unexpected variance and it makes sense.
00:34:38.800 --> 00:34:45.400
When you have x - y you want to subtract the variance.
00:34:45.400 --> 00:34:49.800
You are actually reducing variance by doing this transformation.
00:34:49.800 --> 00:34:57.200
The variance actually will be the same as up here because no matter what you are going from two different pools,
00:34:57.200 --> 00:35:04.800
two different distributions or 2 different sources of that randomness.
00:35:04.800 --> 00:35:07.600
That spread is only going to increase.
00:35:07.600 --> 00:35:26.200
These two are the same, but this is only the case all of this only works if x and y are independent events.
00:35:26.200 --> 00:35:33.100
If they depend on each other in any way that you can count on this.
00:35:33.100 --> 00:35:39.900
Let us get into some examples.
00:35:39.900 --> 00:35:46.500
Here is example 1, at the state fair you can play fish for cash, a game of chance cost one dollar to play.
00:35:46.500 --> 00:35:51.700
You will fish on a card that had a dollar amount that you have one from the giant fishbowl.
00:35:51.700 --> 00:35:57.300
They are having a special where you draw a ticket they will triple the value printed on it.
00:35:57.300 --> 00:36:01.500
What is expected value and variance of the promotional game?
00:36:01.500 --> 00:36:15.700
If you download the example and you go to example 1, I put the original game on here with all the winnings, including 0 and the probability of those winnings.
00:36:15.700 --> 00:36:25.200
Here we want to sum these up to make sure it adds up to 1 so that we know that our probably distribution is complete.
00:36:25.200 --> 00:36:33.500
Let us talk about just plain old regular expected value of the old original game.
00:36:33.500 --> 00:36:38.900
I just multiplied x by the p(x).
00:36:38.900 --> 00:36:55.600
It is the contribution of each value of this random variable and then expected value in total is just that sum.
00:36:55.600 --> 00:36:57.500
This we have done before.
00:36:57.500 --> 00:37:04.500
The reason I want to do this is I want to show you how to calculate the variance.
00:37:04.500 --> 00:37:07.300
Here I have standard deviation.
00:37:07.300 --> 00:37:09.900
Whatever we have here we have to square root it.
00:37:09.900 --> 00:37:14.200
Let me just put a μ to myself here because I am going to need to square root it.
00:37:14.200 --> 00:37:19.000
Let us think about how to calculate variance here.
00:37:19.000 --> 00:37:24.700
This is the expected value, the mean but what is the spread around that mean.
00:37:24.700 --> 00:37:41.900
What we are going to have to know what x is over here, winnings – the mean, the expected value squared.
00:37:41.900 --> 00:37:46.200
The squared deviations away from the expected value.
00:37:46.200 --> 00:38:02.400
To all of those I am going to multiply, let me put this in a parenthesis.
00:38:02.400 --> 00:38:08.100
I am going to multiply the probability of that particular x.
00:38:08.100 --> 00:38:24.800
Here is the squared deviation and our probability tells how much should these deviations count.
00:38:24.800 --> 00:38:31.200
I will just copy and paste that all the way down.
00:38:31.200 --> 00:38:36.000
What we do here is we need to square root the sum of all of these.
00:38:36.000 --> 00:38:54.000
That is the spread around the mean.
00:38:54.000 --> 00:39:06.400
Let us think about this, if our expected values is $.60, and the squared of that is around $4 because it is standard deviation.
00:39:06.400 --> 00:39:11.500
That means if we go to the negative side it is going to be negative numbers.
00:39:11.500 --> 00:39:19.700
You cannot necessarily pull the cards that says give me $3.
00:39:19.700 --> 00:39:22.200
That does not make any sense.
00:39:22.200 --> 00:39:30.500
What we are seeing is this number is large because you did not pull by this big value.
00:39:30.500 --> 00:39:32.800
That 900 number.
00:39:32.800 --> 00:39:40.700
This is saying it is probably skewed on the right side towards the larger numbers.
00:39:40.700 --> 00:39:43.000
There is a long tail there.
00:39:43.000 --> 00:39:46.200
Let us get on to our problem.
00:39:46.200 --> 00:39:50.400
Now this is the problem we are talking about the new probability of winning.
00:39:50.400 --> 00:39:53.800
Here is the old probability of winnings.
00:39:53.800 --> 00:39:57.600
Actually, the probabilities do not change.
00:39:57.600 --> 00:40:12.000
Your chance of drawing a 0 card remains the same, but the value of those winnings have changed since it is now 0 × 3 which is still 0 unfortunately.
00:40:12.000 --> 00:40:19.600
All these other ones you can now win up to $2700 in this game.
00:40:19.600 --> 00:40:21.500
This game is a good deal.
00:40:21.500 --> 00:40:22.800
Well, let us see.
00:40:22.800 --> 00:40:25.500
Let us find the expected value.
00:40:25.500 --> 00:40:33.300
Here we are no longer using the old x that we are using the new x and this new X is 3x.
00:40:33.300 --> 00:40:36.900
Our d is 3.
00:40:36.900 --> 00:40:42.900
The new winnings × the probability of those new winnings.
00:40:42.900 --> 00:40:57.400
I am just going to copy and paste that all the way down and then sum that up and get a $1.80.
00:40:57.400 --> 00:41:05.600
This new game is a better deal because overtime iIf you spent for every dollar you spend you get $1.80 back.
00:41:05.600 --> 00:41:20.400
Not on any particular draw of a card will you get $1.80, but if you play this game a hundred times and spend $100 on average you will get an extra $8.
00:41:20.400 --> 00:41:28.600
Let us also see if we can find that using our shortcut.
00:41:28.600 --> 00:41:47.800
Before it was μ sub x and it said okay if you want to transform all your values by multiplying it by d and all you do is you multiply your old expected value like d.
00:41:47.800 --> 00:41:50.200
If that is the case yes it is.
00:41:50.200 --> 00:41:57.800
I could do this old expected value times 3 and get that same value.
00:41:57.800 --> 00:42:02.200
You could use that shortcut.
00:42:02.200 --> 00:42:04.800
Now let us calculate standard deviation.
00:42:04.800 --> 00:42:20.000
We know that in order to calculate variance, it is d² times variance, but here we have standard deviation, it is just d times standard deviation.
00:42:20.000 --> 00:42:20.600
Let us see if that works.
00:42:20.600 --> 00:42:30.200
D × stdev we should get $12.2 and the variance has gotten bigger because the spread got bigger.
00:42:30.200 --> 00:42:35.900
Now you can win all the way up to $2700 or 0.
00:42:35.900 --> 00:42:38.400
We increase that spread.
00:42:38.400 --> 00:42:45.600
Great, but we can also check and see if this works sort of conceptually.
00:42:45.600 --> 00:43:00.600
Here we are going to work to take the value of the new winnings - this expected value².
00:43:00.600 --> 00:43:19.900
We want to lock this one down because our expected value will change and wanted to take all of take that square deviation and multiply it by the probability.
00:43:19.900 --> 00:43:26.400
We could just copy and paste this all the way down.
00:43:26.400 --> 00:43:31.100
Here remember we need to find a standard deviation, rather than variance.
00:43:31.100 --> 00:43:36.900
We need to square root the sum of all of these.
00:43:36.900 --> 00:43:47.200
You can think of these multiplying my p but I already done the division for you.
00:43:47.200 --> 00:43:52.900
And we get about 1212.
00:43:52.900 --> 00:44:03.900
If we had looked at this in a larger with more decimal point we would see the exact number.
00:44:03.900 --> 00:44:12.600
Why not, it works, our shortcuts work and also the regular old formula for variance also works.
00:44:12.600 --> 00:44:26.300
Example 2, suppose you buy three tickets from fish for cash what is expected value of your total winnings?
00:44:26.300 --> 00:44:37.700
What about the standard deviation and which standard deviation is higher playing the game three times by tripling the value of one play.
00:44:37.700 --> 00:44:47.000
We know that this is the situation where we get three independent events and then we add them together.
00:44:47.000 --> 00:44:53.600
That is like estimating the first x we estimate that to be expected value.
00:44:53.600 --> 00:44:56.800
The second x we estimate that to be the expected value.
00:44:56.800 --> 00:45:00.300
The third x, we expect that to be the value.
00:45:00.300 --> 00:45:18.900
That is going to be the expected value, the μ (x1 + x2 + x3).
00:45:18.900 --> 00:45:23.600
I'm just going to shorten that to be μ(sum), whatever the sum is.
00:45:23.600 --> 00:45:30.800
It going to be n times the old expected value.
00:45:30.800 --> 00:45:45.200
Previously our expected value was $.60 and our n is 3, this is $1.80 and that is the same as before.
00:45:45.200 --> 00:45:51.300
We have established that already these two situations have very similar expected value.
00:45:51.300 --> 00:45:54.000
What about standard deviation.
00:45:54.000 --> 00:46:14.100
Well, the standard deviation of sum that is going to be my μ(x) is the square root of n times whatever the standard deviation was before.
00:46:14.100 --> 00:46:30.100
That is going to be the square root of 3 times and let us look up what our standard deviation would be $4.04.
00:46:30.100 --> 00:46:58.000
Let me just use the line of my Excel here just to calculate that the square root of 3, you could feel free to use a calculator times 4.04 and that is going to be 6.98.
00:46:58.000 --> 00:47:17.400
We saw that in the previous it is tripling the value on, that standard deviation of 3x that was $12.12.
00:47:17.400 --> 00:47:20.200
Which standard deviation is higher?
00:47:20.200 --> 00:47:21.900
This one or this one?
00:47:21.900 --> 00:47:24.600
Well, it is certainly the one.
00:47:24.600 --> 00:47:40.900
Why is that? We expanded the values right of the x now you win up to $2700 in one play and the chance of that has not changed.
00:47:40.900 --> 00:47:51.500
Whereas here if you pick out three cards there is a very slim chance you get 3 900 cards.
00:47:51.500 --> 00:47:57.800
That probability way out there, it is not likely in this case it.
00:47:57.800 --> 00:48:05.400
It is more likely than in the situation, so it makes sense that here we would stretched out the values.
00:48:05.400 --> 00:48:17.300
We have a stretch of values as much, but notably we have increased the standard deviation from the original game.
00:48:17.300 --> 00:48:26.600
Example 3, these are two booths own by Amos and body with similar games to the fish for cash game.
00:48:26.600 --> 00:48:32.700
Amos booth has an expected value of .50 with the standard deviation of .25.
00:48:32.700 --> 00:48:43.000
Bobbie’s booth has an expected value of .75 and a standard deviation of .32, not counting the cost of the ticket, which I presume is the dollar.
00:48:43.000 --> 00:48:48.500
What are your total expected winnings and what is the standard deviation?
00:48:48.500 --> 00:49:05.200
I am going to say where your total expected winnings if you play each game ones so that you have to add together those 2.
00:49:05.200 --> 00:49:15.800
Let me make sure I have the Excel handy for later.
00:49:15.800 --> 00:49:19.100
Let us think about this first.
00:49:19.100 --> 00:49:30.300
What we want as we have bodies that Amos game and Bobbie’s game and we trigger winnings from both of them and add them together.
00:49:30.300 --> 00:49:36.800
We have A + B and we want to know what is expected value of A + B.
00:49:36.800 --> 00:49:45.400
We know the μ (A+ B) = μ(A) + μ(B).
00:49:45.400 --> 00:49:47.400
We have μ(A and B).
00:49:47.400 --> 00:50:04.600
Expected value of Amos booth is 50% and expected value of Bonnie’s booth is .75 and we add that together the new μ is $1.25.
00:50:04.600 --> 00:50:15.200
That is good news only if you just count the fact that you spent $2 to win $1.25.
00:50:15.200 --> 00:50:17.200
Not good for you.
00:50:17.200 --> 00:50:19.100
It is good for Amos and Bobby.
00:50:19.100 --> 00:50:22.500
What is the standard deviation of this?
00:50:22.500 --> 00:50:31.600
We actually do not know directly the standard deviation formula .
00:50:31.600 --> 00:50:33.200
We could actually derive it from what we do know.
00:50:33.200 --> 00:50:34.700
We do know variance.
00:50:34.700 --> 00:50:45.700
We know the variance if we add together the variance of A, if we want the variance of A and B
00:50:45.700 --> 00:50:52.000
added together then all we do is add the variance of A to the variance of B.
00:50:52.000 --> 00:51:00.200
Keep writing A instead of sigma.
00:51:00.200 --> 00:51:01.900
It is very similar.
00:51:01.900 --> 00:51:10.400
This is our formula for variance, but it is asking for standard deviation.
00:51:10.400 --> 00:51:16.700
We might just square root these sides and we know these values already.
00:51:16.700 --> 00:51:24.000
We do not know standard deviation and we do not know variance.
00:51:24.000 --> 00:51:27.200
As we only know the standard deviation but we know how to get variance.
00:51:27.200 --> 00:51:35.700
You will have to take the square root of Amos standard deviation.
00:51:35.700 --> 00:51:44.100
In order to find variance and I have to square that.
00:51:44.100 --> 00:51:50.900
I do not need this parenthesis anymore.
00:51:50.900 --> 00:52:04.300
I will just square that first and add that to Bobby's standard deviation² in order to get variance.
00:52:04.300 --> 00:52:14.500
The reason we have to do this first is that the square root of this sum is not going to be .25 +.32.
00:52:14.500 --> 00:52:17.300
There is order of operations.
00:52:17.300 --> 00:52:25.900
We have to do the squares first before adding them together and if you do not that is going to change the value.
00:52:25.900 --> 00:52:28.900
Let us see what we get.
00:52:28.900 --> 00:52:34.200
I am just going to use one of these rows to help me out here.
00:52:34.200 --> 00:52:36.500
Just calculate something.
00:52:36.500 --> 00:52:55.900
Here I am going to write square root of .25² + .32² and the nice thing is that Excel knows order of operations.
00:52:55.900 --> 00:53:15.500
Excel know that it need to do the exponents first and then add them together then square root of all of that sum.
00:53:15.500 --> 00:53:27.200
We get .406 that is our new standard deviation.
00:53:27.200 --> 00:53:41.000
It is larger than the old one and that makes sense because we are increasing variance because we are adding things together.