1
00:00:00,090 --> 00:00:03,420
We've been starting to look at how to answer probability questions.

2
00:00:03,420 --> 00:00:08,790
And at this point we want to make sure that we understand how to calculate probability for discrete

3
00:00:08,790 --> 00:00:09,910
random variables.

4
00:00:09,930 --> 00:00:14,970
Now, we want to distinguish here between discrete and continuous random variables.

5
00:00:14,970 --> 00:00:22,410
So continuous random variables are variables representing data sets that we can think of as being continuous.

6
00:00:22,410 --> 00:00:29,640
So think about, for instance, dimensions like length, width and height, or maybe even area or volume.

7
00:00:29,670 --> 00:00:36,330
One common example is the height of people we would call the height of people a continuous random variable,

8
00:00:36,360 --> 00:00:42,480
because in theory people can take on any height, at least maybe within a particular range.

9
00:00:42,480 --> 00:00:49,050
So we might say that somebody measures five feet six inches tall and then another person measures five

10
00:00:49,050 --> 00:00:51,570
feet seven inches tall.

11
00:00:51,600 --> 00:00:58,230
But we also recognize that there are many people who have some height in between five, six and five

12
00:00:58,230 --> 00:00:58,680
seven.

13
00:00:58,680 --> 00:01:03,720
We might have somebody who measures exactly five, six and a half or somebody who measures exactly five,

14
00:01:03,720 --> 00:01:04,709
six and a quarter.

15
00:01:04,739 --> 00:01:10,920
And if we go even more granular in our measurement, in theory, we could measure an infinite number

16
00:01:10,920 --> 00:01:13,560
of different heights between five, six and five seven.

17
00:01:13,590 --> 00:01:18,030
The only thing that's holding us back here is how granular we can get with our measurement.

18
00:01:18,030 --> 00:01:24,240
But the concept is that if we had the ability to measure with more and more and more accurate precision,

19
00:01:24,240 --> 00:01:30,480
we could find many different heights and infinite number of heights between five, six and five seven.

20
00:01:30,480 --> 00:01:34,700
And so we can define the height of people as a continuous random variable.

21
00:01:34,710 --> 00:01:38,070
The same would be true for time in normal life.

22
00:01:38,070 --> 00:01:42,990
We might only be interested in measuring time in terms of maybe seconds, minutes or hours.

23
00:01:42,990 --> 00:01:49,620
But at the Olympics, when we're talking about athletes who race down to the 10th of a second or 100th

24
00:01:49,620 --> 00:01:54,840
of a second or even thousandth of a second, as long as we could continue measuring at a more and more

25
00:01:54,840 --> 00:01:59,550
granular level, we can continue to distinguish between lengths of time.

26
00:01:59,550 --> 00:02:02,460
And so time would be considered a continuous random variable.

27
00:02:02,490 --> 00:02:06,090
Contrast this with the idea of discrete random variables.

28
00:02:06,090 --> 00:02:09,720
The key here we want to think about is things that are countable.

29
00:02:09,720 --> 00:02:12,960
For instance, number of children in a family.

30
00:02:12,960 --> 00:02:18,450
It's impossible for a family to have 2.7 children or 4.2 children.

31
00:02:18,450 --> 00:02:25,650
That family is always going to have zero one, two, three, etc. Number of children.

32
00:02:25,650 --> 00:02:28,320
The number of children in the family are countable.

33
00:02:28,350 --> 00:02:32,430
Or we could think about something like flipping a coin.

34
00:02:32,430 --> 00:02:39,660
So coin flips and the number of heads that we get in those coin flips is always going to be zero one,

35
00:02:39,660 --> 00:02:47,820
two, three, etc. It's impossible if we flip a coin two times to get half of a head or one and a half

36
00:02:47,820 --> 00:02:54,780
heads, we're always going to get zero one or two heads in two coin flips and there's no in between.

37
00:02:54,780 --> 00:03:00,330
Even if we could get more granular with our measurement, it doesn't make sense to say that we get one

38
00:03:00,330 --> 00:03:02,700
and one half heads on two coin flips.

39
00:03:02,700 --> 00:03:06,780
There's only these discrete values and nothing in between those values.

40
00:03:06,780 --> 00:03:13,110
So just think about discrete random variables as countable variables with no logical in between values.

41
00:03:13,110 --> 00:03:19,650
Whereas with continuous random variables we have in theory an infinite number of in between values.

42
00:03:19,650 --> 00:03:25,170
And as long as we can get specific enough in our measurements, we could continue finding more and more

43
00:03:25,170 --> 00:03:26,730
in between values.

44
00:03:26,730 --> 00:03:32,340
So with that in mind, what we want to do now is make sure we understand how to do probability calculations

45
00:03:32,340 --> 00:03:35,400
when we have a discrete random variable.

46
00:03:35,700 --> 00:03:42,090
So let's go back to this idea of the coin flip and let's say that we flip a coin one time.

47
00:03:42,390 --> 00:03:44,370
There are only two possible outcomes.

48
00:03:44,370 --> 00:03:49,530
When we flip the coin one time, we can either flip heads or we can flip tails.

49
00:03:49,530 --> 00:03:55,530
If we think about that in terms of probability, we could build ourselves a little table here and we

50
00:03:55,530 --> 00:04:00,600
could say that the discrete random variable modeling, the number of heads that we get when we flip

51
00:04:00,600 --> 00:04:02,250
that coin is x.

52
00:04:02,250 --> 00:04:06,600
So this variable X here models the number of heads we get when we flip a coin.

53
00:04:06,600 --> 00:04:11,340
And if we flip the coin one time, there are only two possible outcomes.

54
00:04:11,340 --> 00:04:16,440
One is we flip heads zero times, The other is we flip heads one time.

55
00:04:16,440 --> 00:04:21,899
Since we're only flipping the coin one time, there's no way to flip heads twice or three times.

56
00:04:21,899 --> 00:04:24,360
And obviously negative numbers don't apply here.

57
00:04:24,360 --> 00:04:25,650
So only two outcomes.

58
00:04:25,650 --> 00:04:31,440
We flip heads zero times or we flip heads one time and then we can think about the probability of each

59
00:04:31,440 --> 00:04:34,620
of these outcomes for this discrete random variable X.

60
00:04:34,620 --> 00:04:37,860
Well, we would indicate that as the probability of X.

61
00:04:37,860 --> 00:04:44,910
And so this value here in our table is the probability that we flip heads zero times when we flip the

62
00:04:44,910 --> 00:04:46,230
coin one time.

63
00:04:46,230 --> 00:04:52,560
Well, the probability of flipping heads zero times when we flip a coin once is equivalent to the probability

64
00:04:52,560 --> 00:04:54,630
of flipping tails on that coin flip.

65
00:04:54,630 --> 00:04:59,820
So that probability is one half the probability that we flip heads once when we flip the.

66
00:05:00,260 --> 00:05:03,220
One time is also, of course, one half.

67
00:05:03,230 --> 00:05:08,960
So we have a little table here with our discrete random variable x and the probability that we find

68
00:05:08,960 --> 00:05:11,190
this particular value of x.

69
00:05:11,210 --> 00:05:17,300
Now, if we want to represent that in a probability distribution, here's what that looks like.

70
00:05:17,300 --> 00:05:19,820
We could make a probability distribution here.

71
00:05:19,820 --> 00:05:26,210
We'll have the values that X can take on along the horizontal axis and along the vertical axis.

72
00:05:26,210 --> 00:05:30,620
We'll have the probability that that particular value of x occurs.

73
00:05:30,620 --> 00:05:32,960
So here's what the distribution would look like.

74
00:05:32,960 --> 00:05:34,700
For one coin flip.

75
00:05:35,000 --> 00:05:41,630
It's this distribution Here we see along the horizontal axis that in one coin flip x, the number of

76
00:05:41,630 --> 00:05:45,740
heads that we get when we flip a coin one time can only take on the values.

77
00:05:45,740 --> 00:05:51,680
Zero or one with one coin flip is only possible to flip heads zero times or one time.

78
00:05:51,680 --> 00:05:54,710
So these are the only values we have along our horizontal axis.

79
00:05:54,710 --> 00:06:02,330
We've put our vertical axis in units of sixteenths so that we can expand on this graph as we add more

80
00:06:02,330 --> 00:06:03,920
flips to our table here.

81
00:06:03,920 --> 00:06:10,460
So if we think about each unit here along the vertical axis as being out of 16, then eight divided

82
00:06:10,460 --> 00:06:12,860
by 16 is the same as one half.

83
00:06:12,860 --> 00:06:17,120
So our probability right here is one half.

84
00:06:17,120 --> 00:06:25,370
Our probability at four over 16 is one fourth, our probability at two over 16 is one eighth.

85
00:06:25,400 --> 00:06:31,100
So since we know from our little probability distribution table here that the probability of flipping

86
00:06:31,100 --> 00:06:38,540
zero heads is one half, we've indicated that here with this bar that extends up to eight over 16 or

87
00:06:38,540 --> 00:06:39,290
one half.

88
00:06:39,290 --> 00:06:45,260
And then same thing here, the probability of flipping heads one time is also one half.

89
00:06:45,260 --> 00:06:48,260
So we have that represented with this bar here.

90
00:06:48,290 --> 00:06:54,830
This is what probability looks like for a single coin flip with the discrete random variable x representing

91
00:06:54,830 --> 00:06:57,800
the number of heads that we flip on that coin flip.

92
00:06:57,830 --> 00:07:05,720
If we now add a second coin flip to this scenario, now we're going to say that we flip a coin two times.

93
00:07:05,720 --> 00:07:09,980
Well, we have to now account for all of these possibilities.

94
00:07:09,980 --> 00:07:15,710
Notice what we did here is that we started with our original single coin flip, and we said that on

95
00:07:15,710 --> 00:07:18,350
our first coin flip, we're either going to get heads or tails.

96
00:07:18,350 --> 00:07:24,380
Now, on our second coin flip, we could get heads after flipping heads on the first flip, or we could

97
00:07:24,380 --> 00:07:26,960
get heads after flipping tails on the first flip.

98
00:07:27,110 --> 00:07:32,690
But we can also have the scenario where we flipped heads and tails on the first flip, but then tails

99
00:07:32,690 --> 00:07:34,070
on the second flip.

100
00:07:34,070 --> 00:07:40,790
So what was two possible outcomes with one coin flip is now four possible outcomes with two coin flips.

101
00:07:40,790 --> 00:07:45,650
And if we express that probability in a table, here's what the table looks like.

102
00:07:45,650 --> 00:07:52,430
So again, we still have the same discrete random variable here where x is the number of times that

103
00:07:52,430 --> 00:07:53,600
we flip heads.

104
00:07:53,630 --> 00:07:59,600
Now that we're flipping the coin, two times we can flip heads zero times one time or two times.

105
00:07:59,600 --> 00:08:05,090
And the probability that each of these outcomes occurs is given here by the probability of X.

106
00:08:05,090 --> 00:08:11,540
We see that flipping heads zero times only occurs in this scenario here where we get tails tails.

107
00:08:11,540 --> 00:08:17,780
So there's a one in four chance that we flip heads zero times The probability that we flip heads two

108
00:08:17,780 --> 00:08:22,040
times occurs one out of four total possible outcomes.

109
00:08:22,040 --> 00:08:26,210
And that's here in this first scenario where we flip heads and then heads again.

110
00:08:26,210 --> 00:08:32,000
And there are two different ways that we could flip heads one time out of four possible outcomes.

111
00:08:32,000 --> 00:08:35,059
That's when we flip tails, then heads or heads than tails.

112
00:08:35,059 --> 00:08:42,140
So the probability of flipping heads one time is two matching outcomes out of four total equally likely

113
00:08:42,140 --> 00:08:42,770
outcomes.

114
00:08:42,770 --> 00:08:45,710
So we have here our probability distribution.

115
00:08:45,710 --> 00:08:49,550
And if we graph that, here's what that looks like.

116
00:08:49,550 --> 00:08:54,110
Now in our graph, we can flip heads zero one or two times.

117
00:08:54,110 --> 00:08:57,980
We can see that the probability of flipping heads zero times is one fourth.

118
00:08:57,980 --> 00:08:59,450
So we've sketched that in.

119
00:08:59,450 --> 00:09:02,720
The probability of flipping heads two times is also one fourth.

120
00:09:02,720 --> 00:09:09,800
So we sketch that in and the probability of flipping heads one time is two out of four or one half.

121
00:09:09,800 --> 00:09:15,350
So we sketch that in here and now this is the probability distribution for the discrete random variable

122
00:09:15,350 --> 00:09:20,420
x, where x is the number of heads that we flip when we flip a coin two times.

123
00:09:20,420 --> 00:09:22,580
So we're starting to get an idea here.

124
00:09:22,580 --> 00:09:28,040
Let's look quickly at what happens when we expand this to three coin flips and then four coin flips.

125
00:09:28,280 --> 00:09:32,630
So if we expand to three coin flips, here's what our table looks like now.

126
00:09:32,630 --> 00:09:34,520
We kept everything we had before.

127
00:09:34,520 --> 00:09:41,030
We said that this was our first coin flip in white, in blue was our second coin flip, and now in red

128
00:09:41,030 --> 00:09:43,970
we've attached an extra flip to those first two.

129
00:09:43,970 --> 00:09:47,960
And we've said that on this third flip, we flip heads every single time.

130
00:09:47,960 --> 00:09:53,840
But of course, we also have to account for the same set of the first two flips, but where on the third

131
00:09:53,840 --> 00:09:56,630
flip we flip tails every time.

132
00:09:56,630 --> 00:09:59,270
So now with three coin flips our.

133
00:09:59,540 --> 00:10:06,110
Were possible outcomes expands to eight possible outcomes, which means that our probability distribution

134
00:10:06,110 --> 00:10:12,410
table, if we're flipping the coin three times, we can flip heads 012 or three times.

135
00:10:12,410 --> 00:10:16,010
There are four different possible outcomes here.

136
00:10:16,010 --> 00:10:20,660
And if we just count up here, the number of times that each of those can occur.

137
00:10:20,690 --> 00:10:26,870
For instance, here, the only time that we flip heads zero times, it's when we get tails, tails,

138
00:10:26,870 --> 00:10:27,320
tails.

139
00:10:27,320 --> 00:10:32,780
So out of these eight possible outcomes, only one of them is flipping heads zero times.

140
00:10:32,780 --> 00:10:35,930
And so the probability there is one eighth same thing here.

141
00:10:35,930 --> 00:10:41,210
The probability of flipping heads three times is when we get heads, heads, heads, no tails.

142
00:10:41,210 --> 00:10:42,290
We see that here.

143
00:10:42,290 --> 00:10:45,440
That's one out of all eight of these outcomes.

144
00:10:45,440 --> 00:10:47,630
So the probability there is one eight.

145
00:10:47,630 --> 00:10:55,280
So we build out this table and now if we sketch this distribution in our graph, we see that it looks

146
00:10:55,280 --> 00:10:56,090
like this.

147
00:10:56,090 --> 00:11:02,210
What we're hopefully noticing at this point is that the distribution is always higher in the middle

148
00:11:02,210 --> 00:11:04,070
and lower around the edges.

149
00:11:04,070 --> 00:11:09,380
For all three of these scenarios where we were flipping a coin one time, two times, three times,

150
00:11:09,380 --> 00:11:12,740
the distribution has roughly the same shape every time.

151
00:11:12,860 --> 00:11:18,890
And if we flip a coin four times, so we add to this, we had our first flip, second flip, third flip,

152
00:11:18,890 --> 00:11:20,780
Now we add a fourth flip.

153
00:11:20,780 --> 00:11:26,960
So for all these scenarios here, we say that the fourth flip comes up as heads, and then we duplicate

154
00:11:26,960 --> 00:11:32,900
this whole set and say that the fourth flip this time comes up as tails every time.

155
00:11:32,900 --> 00:11:40,010
So our eight possible outcomes has now doubled to 16 possible outcomes, and our little probability

156
00:11:40,010 --> 00:11:42,500
distribution table looks like this.

157
00:11:42,500 --> 00:11:48,290
When we flip a coin four times, we can get zero one, two, three or four heads if we just count out

158
00:11:48,290 --> 00:11:54,500
of all 16 outcomes here, the number of times that we get zero heads one, two, three or four heads

159
00:11:54,500 --> 00:12:01,280
out of the 16, we can fill out here the probability of this specific number of heads.

160
00:12:01,280 --> 00:12:06,800
And if we sketch this distribution into our graph, it looks like this.

161
00:12:06,800 --> 00:12:13,490
And now we're really starting to see this sort of triangular shape of the probability distribution of

162
00:12:13,490 --> 00:12:15,290
this discrete random variable.

163
00:12:15,290 --> 00:12:20,750
And of course, if we kept going, this distribution would get more and more and more fine, more and

164
00:12:20,750 --> 00:12:25,670
more accurate, and we would see that the general shape of the distribution would look something like

165
00:12:25,670 --> 00:12:31,970
this, and it would approximate this curve more and more accurately as we add additional coin flips

166
00:12:31,970 --> 00:12:33,830
to our distribution.

167
00:12:33,830 --> 00:12:40,250
Now, all of that to say with this idea of a discrete random variable and its probability distribution,

168
00:12:40,250 --> 00:12:46,340
we want to recognize that discrete probability is just like any other probability in the sense that

169
00:12:46,340 --> 00:12:52,820
the probability of the discrete random variable is always going to sum to one or 100%.

170
00:12:52,820 --> 00:12:57,800
Remember earlier we said that probability was always defined between zero and one.

171
00:12:57,800 --> 00:13:03,320
And we can see here that all of these probabilities, all of these right hand columns in each of our

172
00:13:03,320 --> 00:13:13,190
four tables here for one coin flip, two coin flips, three coin flips and four coin flips, all of

173
00:13:13,190 --> 00:13:16,040
these probabilities are between zero and one.

174
00:13:16,040 --> 00:13:23,360
We have our smallest probability here at 116, all the way up to our highest probability of one half.

175
00:13:23,360 --> 00:13:30,770
All those values are between zero and one, and each of these right hand columns sums to one one half

176
00:13:30,770 --> 00:13:35,030
plus one half is one, which we could also call 100%.

177
00:13:35,030 --> 00:13:37,820
We could call each of these one half values 50%.

178
00:13:37,820 --> 00:13:40,940
So 50% plus 50% is 100%.

179
00:13:41,120 --> 00:13:48,170
Same thing here, one fourth plus two fourths plus one fourth is one or 100%.

180
00:13:48,170 --> 00:13:51,830
If we add up 25%, 50% and 25%.

181
00:13:51,830 --> 00:13:53,990
And that's going to be true for all of these.

182
00:13:53,990 --> 00:14:01,310
You'll see here that this adds up to eight over eight or one and that this adds up to 16 over 16 or

183
00:14:01,310 --> 00:14:02,000
one.

184
00:14:02,000 --> 00:14:06,320
So that concept still holds with discrete random variables.

185
00:14:06,320 --> 00:14:12,680
What we want to be able to do now is talk about how to calculate the expected value of a discrete random

186
00:14:12,680 --> 00:14:13,340
variable.

187
00:14:13,340 --> 00:14:19,250
And we also want to be able to look at variance and standard deviation for a variable X like we've been

188
00:14:19,250 --> 00:14:20,150
talking about.

189
00:14:20,150 --> 00:14:26,900
So expected value or that long term average is like what we talked about before when we looked at experimental

190
00:14:26,900 --> 00:14:32,240
versus expected probability and to calculate it here for a discrete random variable.

191
00:14:32,240 --> 00:14:35,750
So let's take this scenario where we have just one coin flip.

192
00:14:35,750 --> 00:14:41,510
When we have a discrete random variable, we have to take what's essentially a weighted average.

193
00:14:41,510 --> 00:14:45,980
So we look at here these different countable outcomes.

194
00:14:45,980 --> 00:14:51,770
X, we say that when we flip a coin one time, we can either flip heads zero times or one time, and

195
00:14:51,770 --> 00:14:54,920
the probability that each of those things occurs is one half.

196
00:14:54,920 --> 00:14:59,150
So we take the possible outcomes here zero and one and we.

197
00:14:59,250 --> 00:15:02,430
Wait each of them by their probability, one half.

198
00:15:02,430 --> 00:15:07,600
And when we do the math here, we get zero plus one half or one half.

199
00:15:07,620 --> 00:15:14,520
And what this tells us then, is that when we flip a coin one time, the expected value for the number

200
00:15:14,520 --> 00:15:17,420
of times that we flip heads is one half.

201
00:15:17,430 --> 00:15:25,380
So it's almost saying that we can expect half heads on our one coin flip, which of course doesn't make

202
00:15:25,380 --> 00:15:32,160
sense when we flip a coin one time, we know that we can only flip heads zero times or one time we can

203
00:15:32,160 --> 00:15:34,140
never flip it half of a time.

204
00:15:34,140 --> 00:15:37,140
But this is what the expected value is saying.

205
00:15:37,140 --> 00:15:42,990
And of course, in a way that makes sense because if we're trying to represent the number of times we

206
00:15:42,990 --> 00:15:49,950
should expect heads on one coin flip, even though we know the only outcomes are zero or one, it would

207
00:15:49,950 --> 00:15:56,340
be wrong to say that our expectation on one coin flip is always zero heads, or that our expectation

208
00:15:56,340 --> 00:15:58,650
on one coin flip is always one heads.

209
00:15:58,650 --> 00:16:01,200
We can't really use either one of these values.

210
00:16:01,200 --> 00:16:06,510
We have to go in the middle because as we already know, we've looked at it already when we talked about

211
00:16:06,510 --> 00:16:07,350
probability.

212
00:16:07,350 --> 00:16:09,930
And we also should just know this intuitively.

213
00:16:09,930 --> 00:16:12,930
We should expect to flip heads about 50% of the time.

214
00:16:12,930 --> 00:16:19,110
And so if we're flipping a coin only one time in this theoretical world here, we should expect half

215
00:16:19,110 --> 00:16:21,780
of a heads on that one flip.

216
00:16:21,780 --> 00:16:26,430
Let's look at what happens, though, when we flip a coin two times, three times, four times to our

217
00:16:26,430 --> 00:16:27,450
expected value.

218
00:16:27,660 --> 00:16:30,960
So when we flip a coin, twice are expected.

219
00:16:30,960 --> 00:16:38,220
Value is this We have all of our different outcomes zero one or two heads, and we wait them with their

220
00:16:38,220 --> 00:16:39,990
associated probabilities.

221
00:16:39,990 --> 00:16:47,340
And so when we do the math here, the result is zero plus one half plus one half or one.

222
00:16:47,580 --> 00:16:53,130
And this then should make a lot more sense to us because we're saying if we flip a coin two times,

223
00:16:53,130 --> 00:16:55,770
we expect to flip heads one time.

224
00:16:55,770 --> 00:16:57,570
That is our long term average.

225
00:16:57,570 --> 00:17:01,620
That is our expected value for this discrete random variable.

226
00:17:01,620 --> 00:17:04,020
And of course, that makes sense to us.

227
00:17:04,020 --> 00:17:11,190
What happens, though, when we flip a coin three times, this time we can flip heads zero times once,

228
00:17:11,190 --> 00:17:12,630
twice or three times.

229
00:17:12,630 --> 00:17:20,250
We weight these values with their associated probabilities and we get zero plus three over eight plus

230
00:17:20,250 --> 00:17:26,069
six over eight plus three over eight, and we get 12 over eight or three halves.

231
00:17:27,359 --> 00:17:27,990
Three halves.

232
00:17:27,990 --> 00:17:30,200
Or we could think about this as one and a half.

233
00:17:30,210 --> 00:17:35,730
So what this is saying is that if we flip a coin three times, we should expect one and a half heads,

234
00:17:35,730 --> 00:17:40,830
which of course in the context of the discrete random variable where we know it can only take on the

235
00:17:40,830 --> 00:17:46,710
values zero one, two and three one and one half heads doesn't make sense.

236
00:17:46,710 --> 00:17:53,610
But as a long term average, of course it does make sense because we know that flipping a coin, we

237
00:17:53,610 --> 00:17:58,800
should always get 50% heads, 50% tails as long as we're taking a big enough sample, as long as we're

238
00:17:58,800 --> 00:18:02,790
flipping the coin enough times to get a good long term average.

239
00:18:02,790 --> 00:18:07,590
And so if we're flipping the coin three times, of course, we should expect one and one half heads.

240
00:18:07,590 --> 00:18:13,410
And then the last one, hopefully you can already guess by now, when we flip the coin four times,

241
00:18:13,410 --> 00:18:20,340
we see that we have all the possible outcomes zero one, two, three or four head flips and we weight

242
00:18:20,340 --> 00:18:27,930
them with their associated probabilities and we get zero plus four over 16, plus 12 over 16 plus 12

243
00:18:27,930 --> 00:18:35,130
or 16 plus four over 16, and we end up with 32 over 16 or just two.

244
00:18:35,130 --> 00:18:40,770
And that makes sense because when we flip a coin four times, we should expect long term on average

245
00:18:40,800 --> 00:18:43,020
heads to come up two times.

246
00:18:43,020 --> 00:18:46,140
So in a way, all of this should make sense.

247
00:18:46,140 --> 00:18:53,430
But the real unlock here shows up in these odd values where we're flipping a coin one time or we're

248
00:18:53,430 --> 00:18:59,280
flipping a coin three times the even values or flipping a coin two times, four times, six times,

249
00:18:59,280 --> 00:19:01,350
etc. Those make sense to us.

250
00:19:01,530 --> 00:19:08,220
We get these nice whole round numbers where the expected value is one, two, etc. But what these odd

251
00:19:08,220 --> 00:19:15,450
values show us is that we can get an expected value, which is in fact our mean.

252
00:19:15,450 --> 00:19:23,460
We call this the mean of the discrete random variable x, this is mu sub x and it represents the mean

253
00:19:23,460 --> 00:19:26,580
and in the case of a discrete random variable, it's the expected value.

254
00:19:26,580 --> 00:19:34,110
But these odd values show us that the mean of a discrete random variable can turn out to be a value

255
00:19:34,110 --> 00:19:38,820
that is in between the discrete values that the variable can actually take on.

256
00:19:38,820 --> 00:19:45,210
So even though here this variable can only take on values of zero or one, we find a long term average

257
00:19:45,210 --> 00:19:51,810
of one half, even though here with three coin flips, the discrete random variable can only take values

258
00:19:51,810 --> 00:19:53,760
of zero one, two or three.

259
00:19:54,000 --> 00:19:55,620
This expected value formula.

260
00:19:55,620 --> 00:20:02,790
This idea shows us that we can still calculate a mean even for a discrete variable where that mean ends

261
00:20:02,790 --> 00:20:07,710
up being a value in between the values that the variable can actually assume.

262
00:20:07,710 --> 00:20:13,860
So even though here we can only find values of zero one, two or three, the mean is three halves.

263
00:20:13,860 --> 00:20:15,420
The mean is one and one half.

264
00:20:15,420 --> 00:20:18,060
Not any of these values at all.

265
00:20:18,450 --> 00:20:25,140
So we understand now the idea of the probability that a discrete random variable takes on a particular

266
00:20:25,140 --> 00:20:25,770
value.

267
00:20:25,800 --> 00:20:30,960
We've seen what that looks like in terms of the distribution, the probability distribution of that

268
00:20:30,960 --> 00:20:32,280
discrete random variable.

269
00:20:32,280 --> 00:20:38,670
And we understand now how to find the expected value or the mean of that discrete random variable.

270
00:20:38,670 --> 00:20:45,420
And that the mean may be a value that is between some of the values that the discrete random variable

271
00:20:45,420 --> 00:20:47,070
can actually assume.

272
00:20:47,250 --> 00:20:53,760
So now that we have this mean, this expected value, we want to just talk about the variance and standard

273
00:20:53,760 --> 00:20:56,850
deviation of a discrete random variable.

274
00:20:56,850 --> 00:21:01,140
And this is going to be our variance formula for a discrete random variable.

275
00:21:01,170 --> 00:21:06,510
These x sub values are just the individual values of the discrete random variable.

276
00:21:06,510 --> 00:21:10,320
In this case, with four coin flips, that's zero one, two, three and four.

277
00:21:10,320 --> 00:21:14,370
And then you'll see here the probability of each of those values.

278
00:21:14,370 --> 00:21:20,250
So this little probability distribution table gives us all the information we need to substitute for

279
00:21:20,250 --> 00:21:24,600
x abi and the probability of x sub i and then mu.

280
00:21:24,630 --> 00:21:28,110
Here is the expected value that we looked at earlier.

281
00:21:28,110 --> 00:21:28,980
It's the mean.

282
00:21:28,980 --> 00:21:34,950
And so you can see what we're doing is just finding the difference between the value of the discrete

283
00:21:34,950 --> 00:21:36,930
random variable and the mean.

284
00:21:36,930 --> 00:21:38,970
And then we're squaring that distance.

285
00:21:38,970 --> 00:21:45,780
Squaring the distance is going to guarantee that we get a positive outcome here for this x sub I minus

286
00:21:45,780 --> 00:21:47,070
mu quantity squared.

287
00:21:47,070 --> 00:21:52,080
So this value is always going to be positive and then we're going to multiply that by the probability

288
00:21:52,080 --> 00:21:59,490
over here P of X and we're going to do that for each one of the possible values of X, and then we're

289
00:21:59,490 --> 00:22:01,890
just going to add them all together.

290
00:22:01,890 --> 00:22:05,730
That will give us the variance of this particular discrete random variable.

291
00:22:05,730 --> 00:22:11,340
So let's do that for the discrete random variable x here where x models the number of times we flip

292
00:22:11,340 --> 00:22:13,890
heads when we flip a coin four times.

293
00:22:13,890 --> 00:22:20,730
So if we substitute, our variance here will be our first value of x, which is zero.

294
00:22:20,730 --> 00:22:23,790
So we'll say zero minus the mean.

295
00:22:23,790 --> 00:22:26,790
We calculated the mean down here and we said that that was.

296
00:22:26,900 --> 00:22:27,310
Two.

297
00:22:27,310 --> 00:22:33,760
So we get zero minus two quantity squared times the probability of getting zero heads when we flip the

298
00:22:33,760 --> 00:22:36,520
coin four times, which we know is one out of 16.

299
00:22:36,520 --> 00:22:44,800
So we multiply this by one over 16 and then we keep going until we get to the bottom of our probability

300
00:22:44,800 --> 00:22:47,770
distribution chart here with x equals four.

301
00:22:48,100 --> 00:22:56,500
So here our next row where X is one, we flip heads one time we get one minus two quantity squared times

302
00:22:56,500 --> 00:22:58,060
four over 16.

303
00:22:59,610 --> 00:23:06,960
And then we add to that when X is two here, two minus two quantity squared times the probability,

304
00:23:06,960 --> 00:23:08,790
they're six over 16.

305
00:23:10,120 --> 00:23:18,220
And then we add to that three minus two quantity squared multiplied by four over 16.

306
00:23:18,220 --> 00:23:26,840
And then the last row here plus four minus two quantity squared times one over 16.

307
00:23:26,860 --> 00:23:30,550
And of course, we're doing this by hand just so we can see the math.

308
00:23:30,550 --> 00:23:37,930
But all modern scientific calculators and computer programs will calculate a variance for you based

309
00:23:37,930 --> 00:23:40,120
on this kind of probability distribution.

310
00:23:40,120 --> 00:23:45,820
So in reality, we're not ever doing this math by hand, but we just want to see what's actually going

311
00:23:45,820 --> 00:23:47,800
on behind the scenes so we understand what's happening.

312
00:23:47,800 --> 00:23:51,040
So this is the manual calculation.

313
00:23:51,040 --> 00:23:53,530
And when we actually do this here, we get negative two.

314
00:23:53,530 --> 00:24:02,440
Quantity squared is four, four times one over 16 is four over 16, one minus two is a negative one,

315
00:24:02,440 --> 00:24:04,300
quantity squared is positive one.

316
00:24:04,300 --> 00:24:09,190
So plus four over 16 two minus two is zero.

317
00:24:09,190 --> 00:24:10,990
So that whole term is going to drop away.

318
00:24:11,020 --> 00:24:19,300
Three minus two is one squared is one times four over 16 is four over 16 and then four minus two is

319
00:24:19,300 --> 00:24:19,750
two.

320
00:24:19,750 --> 00:24:24,820
Quantity squared is four times one over 16 is four over 16.

321
00:24:25,000 --> 00:24:28,870
We end up with four plus four plus four plus four is 16.

322
00:24:28,990 --> 00:24:33,430
So we get 16 over 16 or one.

323
00:24:33,550 --> 00:24:40,120
And so our variance for this particular discrete random variable, the number of heads we flip when

324
00:24:40,120 --> 00:24:42,790
we flip a coin four times is one.

325
00:24:42,790 --> 00:24:49,120
And as we already know, the standard deviation we can find by taking the square root of variance.

326
00:24:49,120 --> 00:24:56,080
So the standard deviation of this discrete random variable x will be the square root of variance or

327
00:24:56,080 --> 00:24:58,570
the square root of one or just one.

328
00:24:58,600 --> 00:25:02,770
Of course, these numbers worked out really cleanly for this particular variable.

329
00:25:02,770 --> 00:25:04,390
That won't always be the case.

330
00:25:04,390 --> 00:25:11,380
But now, even though we started with a discrete random variable, we can say that this particular discrete

331
00:25:11,380 --> 00:25:14,560
random variable x has an expected value.

332
00:25:15,440 --> 00:25:27,170
Or a mean of two, that it has a variance of one in a standard deviation of one.

333
00:25:27,170 --> 00:25:33,800
And now we can use all this information to answer probability questions about the discrete random variable,

334
00:25:33,800 --> 00:25:42,290
like what is the probability that we get more than 3.25 heads when we flip a coin four times, or the

335
00:25:42,290 --> 00:25:48,440
probability that we flip some number of heads between 1.5 heads and 2.7 heads.

336
00:25:48,440 --> 00:25:51,650
And we're not bound by these discrete values.

337
00:25:51,650 --> 00:25:57,440
We've sort of, with these calculations, transformed what would otherwise be a completely countable,

338
00:25:57,440 --> 00:26:02,150
discrete variable into something where we can examine the values in between.

