Expected Value: E(X)

WEBVTT
Kind: captions
Language: en

00:00:00.710 --> 00:00:04.150
When we first started talking
about central tendencies and

00:00:04.150 --> 00:00:07.180
how we measure average, we
talked about the arithmetic

00:00:07.180 --> 00:00:09.360
mean and there you just added
up the numbers and you

00:00:09.360 --> 00:00:11.320
divided by the number
of numbers there were.

00:00:11.320 --> 00:00:16.040
So let's say our population
of numbers is-- we have a 3.

00:00:16.040 --> 00:00:20.110
Let's say we have three
3's, a 4, and a 5.

00:00:20.110 --> 00:00:21.480
That's our population.

00:00:21.480 --> 00:00:24.990
And if we wanted the population
mean here we were just

00:00:24.990 --> 00:00:25.990
add all the numbers up.

00:00:25.990 --> 00:00:32.140
We'd say 3 plus 3 plus
3 plus 4 plus 5.

00:00:32.140 --> 00:00:34.630
And then we would divide
that sum by the number

00:00:34.630 --> 00:00:36.750
of numbers we have.

00:00:36.750 --> 00:00:40.250
We would divide that by 5.

00:00:40.250 --> 00:00:41.200
And we would come--let's see.

00:00:41.200 --> 00:00:42.170
What would this be?

00:00:42.170 --> 00:00:46.160
This would be 9 plus
9; it'd be 18/5.

00:00:46.160 --> 00:00:51.650
That would be 18/5,
which would be what?

00:00:51.650 --> 00:00:55.180
3 and 3/5, which is 3.6.

00:00:55.180 --> 00:00:57.980
It's a population mean for
this population of numbers.

00:00:57.980 --> 00:01:00.270
If we just rearranged the math
here a little bit we could view

00:01:00.270 --> 00:01:02.200
it a slightly different way.

00:01:02.200 --> 00:01:03.460
How many 3's do we have?

00:01:03.460 --> 00:01:09.410
We have three 3's, so we could
view this as 3 times 3.

00:01:09.410 --> 00:01:10.760
How many 4's do we have?

00:01:10.760 --> 00:01:15.470
We have one 4, so
it's plus 1 times 4.

00:01:15.470 --> 00:01:16.950
Plus 1 time 5.

00:01:19.710 --> 00:01:22.610
All of that divided by 5.

00:01:22.610 --> 00:01:24.820
And then what we could do
is, this is the same thing.

00:01:24.820 --> 00:01:27.840
And I'm just doing a little
bit of basic really,

00:01:27.840 --> 00:01:28.790
number manipulation here.

00:01:28.790 --> 00:01:36.130
This is the same thing as
1/5 times 3 times 3 plus

00:01:36.130 --> 00:01:40.570
1 times 4 plus 1 times 5.

00:01:40.570 --> 00:01:44.110
And if we distribute this
1/5 this is equal to what?

00:01:44.110 --> 00:01:49.970
3/5 times 3 plus 1/5 times 1.

00:01:49.970 --> 00:01:56.310
So it's plus 1/5 times
4 plus 1/5 times 5.

00:01:59.320 --> 00:02:01.010
And this we can see in a
bunch of different ways.

00:02:01.010 --> 00:02:03.860
Let me express
these as decimals.

00:02:03.860 --> 00:02:05.170
So 3/5.

00:02:05.170 --> 00:02:17.160
So it's 0.6 times 3 plus 0.2
times 4 plus 0.2 times 5.

00:02:17.160 --> 00:02:19.800
Or we could express these
decimals as percentage.

00:02:19.800 --> 00:02:29.050
We could say 60% times 3, plus
20%-- sorry, 20% times 4.

00:02:29.050 --> 00:02:33.250
Plus 20% times 5.

00:02:33.250 --> 00:02:36.570
This is identical to adding up
the numbers and then dividing

00:02:36.570 --> 00:02:39.280
by the total number of
numbers there are.

00:02:39.280 --> 00:02:42.860
But this is interesting because
here we had to know how many

00:02:42.860 --> 00:02:44.720
total numbers there are.

00:02:44.720 --> 00:02:48.350
We have to say, OK, we added up
5 numbers, we divided by 5.

00:02:48.350 --> 00:02:51.750
All I did is I played
around with the

00:02:51.750 --> 00:02:53.470
arithmetic a little bit.

00:02:53.470 --> 00:02:55.340
And I got to this expression.

00:02:55.340 --> 00:02:57.480
But this expression's more
interesting, or at least

00:02:57.480 --> 00:02:58.860
it's-- well, it's different.

00:02:58.860 --> 00:03:00.110
It's not necessarily
more interesting.

00:03:00.110 --> 00:03:02.370
I don't want to make any
value judgment about it.

00:03:02.370 --> 00:03:04.570
But here I don't know how
many numbers there are.

00:03:04.570 --> 00:03:07.100
I'm just telling you about the
frequency of the numbers.

00:03:07.100 --> 00:03:10.810
I'm telling you that 60% of
the numbers are 3, 20% of

00:03:10.810 --> 00:03:14.450
the numbers are 4, and then
20% of the numbers are 5.

00:03:14.450 --> 00:03:16.570
And then if I were to calculate
this out I would get

00:03:16.570 --> 00:03:19.750
60% times 3 is 1.8.

00:03:19.750 --> 00:03:23.350
Plus 20% times 4 is 0.8.

00:03:23.350 --> 00:03:26.450
Plus 20% times 5
is-- let's see.

00:03:26.450 --> 00:03:30.290
20% plus 1, which would
be equal to 2.6, plus

00:03:30.290 --> 00:03:31.680
1 is equal to 3.6.

00:03:31.680 --> 00:03:34.360
So we would get the exact same
number, but what's interesting

00:03:34.360 --> 00:03:36.780
here is that this tells you
just the frequencies-- really

00:03:36.780 --> 00:03:40.030
the relative frequencies of the
3's, the 4's, and the 5's.

00:03:40.030 --> 00:03:42.310
What percentage of this
population is 3's?

00:03:42.310 --> 00:03:44.480
60%.

00:03:44.480 --> 00:03:45.940
What percentage is 4's?

00:03:45.940 --> 00:03:46.550
20%.

00:03:46.550 --> 00:03:48.320
And what population is 5's?

00:03:48.320 --> 00:03:50.870
And I'm doing that because we
just talked about random

00:03:50.870 --> 00:03:52.880
variables and all of that.

00:03:52.880 --> 00:03:55.410
In the beginning we started our
statistics discussion about

00:03:55.410 --> 00:03:57.070
populations and samples.

00:03:57.070 --> 00:04:01.950
But if you think about it,
every time you do one of your

00:04:01.950 --> 00:04:08.580
experiments and you get a new
value for a random variable--

00:04:08.580 --> 00:04:09.660
let's do our classic example.

00:04:09.660 --> 00:04:14.630
We have our random variable, x,
is equal to-- I don't know--

00:04:14.630 --> 00:04:27.040
it's equal to the number of
heads after 6 tosses

00:04:27.040 --> 00:04:27.840
of a fair coin.

00:04:27.840 --> 00:04:30.120
So that's our random variable.

00:04:30.120 --> 00:04:32.910
Hopefully now, we can kind of
connect what we thought about

00:04:32.910 --> 00:04:37.190
in terms of just arithmetic
mean and central tendency and

00:04:37.190 --> 00:04:40.330
population versus sample, and
then connect that to the

00:04:40.330 --> 00:04:41.770
notion of a random variable.

00:04:41.770 --> 00:04:44.380
So when we first started
talking about statistics we

00:04:44.380 --> 00:04:48.480
said, OK, you have this
notion of a population.

00:04:48.480 --> 00:04:50.300
And that you would
sample the population.

00:04:50.300 --> 00:04:51.890
And we gave a couple
of examples.

00:04:51.890 --> 00:04:55.070
You know, the most common one
is you wanted up predict

00:04:55.070 --> 00:04:58.100
the outcome of a
presidential election.

00:04:58.100 --> 00:05:00.310
The population is everyone
who's going to vote

00:05:00.310 --> 00:05:00.830
in the election.

00:05:00.830 --> 00:05:05.125
You can't survey all 50 million
people or whatever's going

00:05:05.125 --> 00:05:05.930
to vote for the election.

00:05:05.930 --> 00:05:10.120
So what you do is you survey
a random sample of that

00:05:10.120 --> 00:05:12.780
population and then you can
calculate statistics on that

00:05:12.780 --> 00:05:16.210
sample that hopefully can
estimate the population

00:05:16.210 --> 00:05:17.470
as a whole.

00:05:17.470 --> 00:05:21.340
But what happens if the
population is not finite?

00:05:21.340 --> 00:05:24.360
And just to go back, if the
population is finite you can

00:05:24.360 --> 00:05:26.460
calculate things like
the population mean.

00:05:26.460 --> 00:05:29.900
We learned the population
mean was that mu letter.

00:05:29.900 --> 00:05:33.350
And that was you just literally
take up all of the items in the

00:05:33.350 --> 00:05:35.620
population, add them together,
and you divide by the

00:05:35.620 --> 00:05:37.660
number of items there are.

00:05:37.660 --> 00:05:38.980
That's what we did up here.

00:05:38.980 --> 00:05:41.610
If this was a whole population
of numbers, we've figured

00:05:41.610 --> 00:05:43.480
out that this was mu.

00:05:43.480 --> 00:05:45.610
If this was a sample from a
population then this would

00:05:45.610 --> 00:05:48.020
be the sample mean, but we
learned all about that.

00:05:48.020 --> 00:05:49.830
But that's not what I
want to get at now.

00:05:49.830 --> 00:05:54.980
But what happens if this
population is infinite?

00:05:54.980 --> 00:05:56.510
If it's infinite and you're
like, oh, Sal, that

00:05:56.510 --> 00:05:57.210
doesn't make any sense.

00:05:57.210 --> 00:06:01.910
But if you think about it,
well, a random variable really

00:06:01.910 --> 00:06:07.160
is-- you can kind of view it as
each instance of a

00:06:07.160 --> 00:06:07.960
random variable.

00:06:07.960 --> 00:06:10.900
Or every time you performed
the experiment you're taking

00:06:10.900 --> 00:06:14.120
out an instance of an
infinite population.

00:06:14.120 --> 00:06:18.350
You can perform this experiment
an infinite number of times.

00:06:18.350 --> 00:06:19.530
You can just keep doing it.

00:06:19.530 --> 00:06:21.780
It's not like, after doing it a
thousand times you're like, oh,

00:06:21.780 --> 00:06:25.240
you can't toss a coin six times
anymore and count the

00:06:25.240 --> 00:06:25.690
number of heads.

00:06:25.690 --> 00:06:28.810
You can perform
this indefinitely.

00:06:28.810 --> 00:06:31.850
So every specific result from a
random variable-- and those are

00:06:31.850 --> 00:06:38.880
usually lowercase results,
lowercase x1 or x2 or x3.

00:06:38.880 --> 00:06:41.680
These are just specific
instances of a random variable.

00:06:41.680 --> 00:06:46.970
You can view these as samples
from an infinite population.

00:06:46.970 --> 00:06:49.170
So I'll try to draw an
infinite population;

00:06:49.170 --> 00:06:50.220
it's kind of harder.

00:06:50.220 --> 00:06:53.390
Maybe I'll draw arrows that
go off in every direction.

00:06:53.390 --> 00:06:54.610
This population never ends.

00:06:54.610 --> 00:06:56.850
You can keep performing the
experiment and keep getting

00:06:56.850 --> 00:06:59.920
samples, but you're sample
is usually finite.

00:07:03.600 --> 00:07:06.260
You know, let's say we
performed this experiment.

00:07:06.260 --> 00:07:10.180
We toss a fair coin six times
and we do that experiment--

00:07:10.180 --> 00:07:11.680
I don't know-- we do
it a hundred times.

00:07:11.680 --> 00:07:16.300
So then we would have a hundred
samples, x2 and it would

00:07:16.300 --> 00:07:19.650
go all the way to x100.

00:07:19.650 --> 00:07:22.330
And the reason why I'm doing
this connection is one, to make

00:07:22.330 --> 00:07:25.520
you see the connection between
the random variable and the

00:07:25.520 --> 00:07:28.840
probability, and the statistics
that we talked about earlier.

00:07:28.840 --> 00:07:31.630
And in this video, I'm going to
introduce you to the concept of

00:07:31.630 --> 00:07:34.530
the expected value of
a random variable.

00:07:34.530 --> 00:07:36.110
And it's nothing else.

00:07:36.110 --> 00:07:40.890
So the expected value of a
random variable, the expected

00:07:40.890 --> 00:07:45.000
value of a random variable is
the exact same thing as

00:07:45.000 --> 00:07:46.100
the population mean.

00:07:46.100 --> 00:07:48.520
In fact, sometimes it's
called a population mean.

00:07:48.520 --> 00:07:51.330
But what makes it interesting
is in this situation, you

00:07:51.330 --> 00:07:53.730
have an infinite population.

00:07:53.730 --> 00:07:56.310
So you can't just add up all
the numbers and divide by the

00:07:56.310 --> 00:07:58.780
number of numbers you have
because you have an infinite

00:07:58.780 --> 00:07:59.810
number of numbers.

00:07:59.810 --> 00:08:02.430
But what you can do is if
you said wow, I know the

00:08:02.430 --> 00:08:05.400
frequency of the numbers.

00:08:05.400 --> 00:08:09.890
I know that 3 shows up 60%
of the time, 4 shows up

00:08:09.890 --> 00:08:13.070
20% of the time, 5 shows
up 20% of the time.

00:08:13.070 --> 00:08:15.290
Then, even if you have an
infinite number of numbers,

00:08:15.290 --> 00:08:16.980
you can actually still
calculate a mean.

00:08:16.980 --> 00:08:19.470
And that's how you do it
for an expected value

00:08:19.470 --> 00:08:20.860
of a random variable.

00:08:20.860 --> 00:08:22.810
So how do you figure out
the frequencies that

00:08:22.810 --> 00:08:23.980
numbers show up?

00:08:23.980 --> 00:08:27.850
Well, you can look at the
probability distribution,

00:08:27.850 --> 00:08:29.570
the discreet probability
distribution.

00:08:29.570 --> 00:08:33.350
So in that example that we did
last time, I forgot the exact

00:08:33.350 --> 00:08:35.990
numbers, but actually let
me just take what we

00:08:35.990 --> 00:08:38.050
did-- our Excel out.

00:08:38.050 --> 00:08:42.940
Let me just quickly, I want to
make n 6 trials, probability

00:08:42.940 --> 00:08:45.990
of heads, tails-- OK, 0.5.

00:08:45.990 --> 00:08:49.790
And then I need to change
what this chart-- just

00:08:49.790 --> 00:08:51.580
give me one second.

00:08:51.580 --> 00:08:55.775
Change what the inputs
of this chart are.

00:08:55.775 --> 00:08:57.520
I'm off the screen right now.

00:09:06.920 --> 00:09:08.090
OK, there you go.

00:09:08.090 --> 00:09:10.970
So this is the probability
distribution for what

00:09:10.970 --> 00:09:11.880
I just described.

00:09:11.880 --> 00:09:15.880
I have a fair toss of a coin
and I want to know how many

00:09:15.880 --> 00:09:18.620
heads I have after 6 tosses.

00:09:18.620 --> 00:09:20.760
So you can perform this
experiment a bunch of times,

00:09:20.760 --> 00:09:23.480
but this tells you the
frequency, the frequency

00:09:23.480 --> 00:09:26.090
of that random variables.

00:09:26.090 --> 00:09:29.480
So when you perform that
experiment-- let's see,

00:09:29.480 --> 00:09:32.090
whatever this is--
0.09% of the time.

00:09:32.090 --> 00:09:34.910
No, actually, 9% of the
time you're going to

00:09:34.910 --> 00:09:37.500
get exactly 1 head.

00:09:37.500 --> 00:09:41.060
23% of the time you're
going to get 2 heads.

00:09:41.060 --> 00:09:44.050
31% of the time you're
going to get 3 heads.

00:09:44.050 --> 00:09:48.120
23% of the time you're
going to get 4 heads.

00:09:48.120 --> 00:09:50.626
And then, you know 9% of
the time you're going

00:09:50.626 --> 00:09:52.910
to get 5 heads.

00:09:52.910 --> 00:09:55.330
And then 2% of the time
you're going to get 6 heads.

00:09:55.330 --> 00:09:57.840
So if you have that information
you can then actually figure

00:09:57.840 --> 00:10:01.530
out the population mean for
this population that's

00:10:01.530 --> 00:10:04.490
described by this probability
distribution, or the

00:10:04.490 --> 00:10:05.780
expected value.

00:10:05.780 --> 00:10:06.800
And let's do that right here.

00:10:06.800 --> 00:10:08.330
I'll put this over to the side.

00:10:11.320 --> 00:10:14.660
So I'm looking at that chart
I just did while I do this.

00:10:17.240 --> 00:10:19.090
We just looked at the
probability distribution for

00:10:19.090 --> 00:10:21.160
this random variable, the
number of heads after 6

00:10:21.160 --> 00:10:23.670
tosses of a fair coin.

00:10:23.670 --> 00:10:29.910
So the expected value of our
random variable is going

00:10:29.910 --> 00:10:32.050
to be each outcome.

00:10:32.050 --> 00:10:37.210
So the first outcome is that
we had 0 heads times the

00:10:37.210 --> 00:10:39.720
frequency that 0 shows up.

00:10:39.720 --> 00:10:42.640
So we figured out before that
the frequency-- now, it's a

00:10:42.640 --> 00:10:44.390
little inexact because I don't
have-- actually, I have

00:10:44.390 --> 00:10:45.250
the exact numbers.

00:10:52.950 --> 00:10:58.920
0 will show up in our random
variable 0.01563% of the time.

00:10:58.920 --> 00:11:02.020
So let me write that.

00:11:02.020 --> 00:11:04.350
So we're going to say, well,
this happens and I can

00:11:04.350 --> 00:11:10.270
write it as a percentage
1.563% of the time.

00:11:10.270 --> 00:11:19.230
Plus 1 happens
9.375% of the time.

00:11:19.230 --> 00:11:26.920
And then plus 2 happens
23.438% of the time.

00:11:26.920 --> 00:11:35.170
Plus 3 happens-- let's see,
it says 31.25% of the time.

00:11:35.170 --> 00:11:36.340
Almost there.

00:11:36.340 --> 00:11:41.730
4, I get 4 heads out of 6
tosses 23% percent of the time.

00:11:41.730 --> 00:11:46.520
So times 23.438%.

00:11:46.520 --> 00:11:53.130
I get 5 heads after 6
tosses 9.375% of the time.

00:11:53.130 --> 00:12:00.730
And finally, I get all heads
let's see-- no, I get all

00:12:00.730 --> 00:12:05.370
heads 1.563% of the time.

00:12:05.370 --> 00:12:09.060
And that makes sense again
because all heads should be

00:12:09.060 --> 00:12:10.810
just as likely as all tails.

00:12:10.810 --> 00:12:12.730
All tails is the same
thing is no heads.

00:12:12.730 --> 00:12:19.610
So what we did here is
exactly what we did up here.

00:12:19.610 --> 00:12:22.070
We took the relative frequency
of each of the numbers in the

00:12:22.070 --> 00:12:26.050
population and we multiply that
outcome times its relative

00:12:26.050 --> 00:12:27.420
frequency, and we're
adding it up.

00:12:27.420 --> 00:12:29.640
But this is the exact same
thing mathematically

00:12:29.640 --> 00:12:30.810
as we did up here.

00:12:30.810 --> 00:12:34.860
But what's useful now is we can
apply the same principles, but

00:12:34.860 --> 00:12:38.880
we're finding the arithmetic
mean of an infinite population,

00:12:38.880 --> 00:12:41.060
or the expected value of a
random variable, which is the

00:12:41.060 --> 00:12:44.690
same thing as the arithmetic
mean of the population of

00:12:44.690 --> 00:12:47.000
this random variable.

00:12:47.000 --> 00:12:52.030
So this value would be equal
to-- actually, let me just

00:12:52.030 --> 00:12:55.040
use Excel to calculate it.

00:12:55.040 --> 00:12:59.440
So the expected value of
getting-- the number of heads

00:12:59.440 --> 00:13:02.960
you get after 6 tosses.

00:13:02.960 --> 00:13:08.673
So this is 0 times its
frequency, and then I'm going

00:13:08.673 --> 00:13:11.590
to add them all up and then
just will just do that

00:13:11.590 --> 00:13:12.400
same thing in all of it.

00:13:12.400 --> 00:13:16.100
So this says this will be 1
times its frequency, 2 times

00:13:16.100 --> 00:13:18.920
its frequency, and then if I
were to take the sum of all of

00:13:18.920 --> 00:13:30.140
them-- equals sum of all of
these-- I get exactly 3.

00:13:30.140 --> 00:13:32.570
And that's actually kind of
an expected outcome, right?

00:13:32.570 --> 00:13:35.030
I shouldn't use the word
expected too much.

00:13:35.030 --> 00:13:39.260
That the central tendency or
you could say, the population

00:13:39.260 --> 00:13:42.480
mean, of this random variable,
or you could say the expected

00:13:42.480 --> 00:13:45.400
value of this random
variable is exactly 3.

00:13:45.400 --> 00:13:49.290
And in this example it turned
out that 3 is also in kind of

00:13:49.290 --> 00:13:52.330
the colloquial sense, it's
the most expected value.

00:13:52.330 --> 00:13:53.920
It's the most probable value.

00:13:53.920 --> 00:13:56.130
But we'll see in the future
that the expected value

00:13:56.130 --> 00:13:58.540
doesn't have to be the
most probable value.

00:13:58.540 --> 00:14:01.900
You could have a very high
probability of having no heads

00:14:01.900 --> 00:14:04.120
and a very high probability
of having 6 heads.

00:14:04.120 --> 00:14:06.690
And then you'd still have an
expected value of 3, even if

00:14:06.690 --> 00:14:09.170
6 or 0 were more probable.

00:14:09.170 --> 00:14:10.820
And I'll show you more
examples of that.

00:14:10.820 --> 00:14:15.810
But the purpose of this video
is to really show you that the

00:14:15.810 --> 00:14:19.790
expected value calculation
is the same thing as the

00:14:19.790 --> 00:14:23.670
population mean calculation,
but we do it this way because

00:14:23.670 --> 00:14:27.360
you can't add up an infinite
number of data points and

00:14:27.360 --> 00:14:28.650
divide by an infinite number.

00:14:28.650 --> 00:14:30.880
Instead you want to know the
frequencies of each of the

00:14:30.880 --> 00:14:34.500
outcomes and then you just add
up all the outcomes weighted

00:14:34.500 --> 00:14:35.450
by their frequencies.

00:14:35.450 --> 00:14:37.290
But that's no different than
what you did up there.

00:14:37.290 --> 00:14:39.000
And I really want to hit that
point home because sometimes in

00:14:39.000 --> 00:14:41.160
probability books they'll just
give you a formula-- oh, the

00:14:41.160 --> 00:14:43.590
expected value of a probability
distribution is each of the

00:14:43.590 --> 00:14:45.330
outcomes times their frequency.

00:14:45.330 --> 00:14:47.960
But I want to show you that
that is the same thing

00:14:47.960 --> 00:14:49.470
as the population mean.

00:14:49.470 --> 00:14:51.900
Anyway, see you in
the next video.


Binomial Distribution 3

WEBVTT
Kind: captions
Language: en

00:00:00.580 --> 00:00:03.760
Let's explore another example
of a binomial distribution.

00:00:03.760 --> 00:00:07.910
Let's say I'm playing
basketball and I know I'm going

00:00:07.910 --> 00:00:10.190
to take 10 shots in the game.

00:00:10.190 --> 00:00:11.650
So I'm going to take 10 shots.

00:00:11.650 --> 00:00:13.990
Let's say that n
is equal to 10.

00:00:13.990 --> 00:00:17.260
That's the number
of shots I take.

00:00:17.260 --> 00:00:19.690
Let's just say that every shot
I take they're independent

00:00:19.690 --> 00:00:23.920
events and that, in general,
I have a 30% chance of

00:00:23.920 --> 00:00:25.670
making any given basket.

00:00:25.670 --> 00:00:27.600
We're not going to get too
detailed of where I take

00:00:27.600 --> 00:00:29.620
the basket from or are
they three pointers?

00:00:29.620 --> 00:00:30.210
Or are they lay out?

00:00:30.210 --> 00:00:30.860
Whatever.

00:00:30.860 --> 00:00:33.760
Every time I take a shot I have
a 30% chance of making it.

00:00:33.760 --> 00:00:38.410
So let's say the probability
of success is equal to 30%.

00:00:38.410 --> 00:00:40.280
Probability is equal to 30%.

00:00:40.280 --> 00:00:42.850
I just made that definition.

00:00:42.850 --> 00:00:48.050
Let's define a random variable,
X, like we always do.

00:00:48.050 --> 00:00:54.900
X is equal to number
of shots I make.

00:00:54.900 --> 00:00:58.330
Number of shots/baskets I make.

00:00:58.330 --> 00:01:02.900
And this one's a little bit
more interesting than the

00:01:02.900 --> 00:01:06.110
flipping a coin example because
in the flipping a coin example,

00:01:06.110 --> 00:01:09.390
heads or tails both had an
equal probability of happening.

00:01:09.390 --> 00:01:12.570
In this situation, making
a shot is less likely

00:01:12.570 --> 00:01:14.430
than not making a shot.

00:01:14.430 --> 00:01:16.880
The not making a
shot-- let's say not.

00:01:16.880 --> 00:01:19.750
Not making a shot, that
is equal to 1 minus the

00:01:19.750 --> 00:01:23.130
probability of making a shot,
which is equal to 70%.

00:01:23.130 --> 00:01:25.300
So there's a slight twist on
what we did before, but in some

00:01:25.300 --> 00:01:27.220
ways this might be a more
interesting example to

00:01:27.220 --> 00:01:27.930
your everyday life.

00:01:27.930 --> 00:01:29.680
And let's see what the
distribution looks like.

00:01:29.680 --> 00:01:32.555
And also, I'm taking more
shots now than I did before.

00:01:32.555 --> 00:01:34.640
So it'll probably take a little
bit more time-- actually,

00:01:34.640 --> 00:01:36.750
this is too much.

00:01:36.750 --> 00:01:37.870
I don't want to waste
too much time.

00:01:37.870 --> 00:01:39.760
Let's say I take 6 shots.

00:01:39.760 --> 00:01:44.220
And the random variable, X, is
the number of shots I make.

00:01:44.220 --> 00:01:48.280
So let's think about how we
figure out this probability.

00:01:48.280 --> 00:01:53.030
What is the probability
that X is equal to 0?

00:01:53.030 --> 00:01:55.410
So I make no shots at all.

00:01:55.410 --> 00:01:58.770
So I take 6 shots and
every shot I take I miss.

00:01:58.770 --> 00:02:02.400
So in order for that to happen
this event has to happen

00:02:02.400 --> 00:02:04.340
six times in a row.

00:02:04.340 --> 00:02:07.630
So something with a 70%
probability has to happen six

00:02:07.630 --> 00:02:13.520
times in a row, the probability
of this is 0.7-- it's 705--

00:02:13.520 --> 00:02:20.130
times 0.7 times 0.7 times
0.7-- I'm getting confused.

00:02:20.130 --> 00:02:29.130
It's 0.7 times 0.7 times 0.7
times 0.7 times 0.7 times 0.7.

00:02:29.130 --> 00:02:32.410
Each of these are missing the
first shot, second shot, third

00:02:32.410 --> 00:02:33.870
shot, and so forth and so on.

00:02:33.870 --> 00:02:38.990
And this is equal to 0.7
to the sixth power.

00:02:38.990 --> 00:02:40.990
Whatever that might be.

00:02:40.990 --> 00:02:43.010
All right, and there's
only one way to do it.

00:02:43.010 --> 00:02:45.220
I literally have to miss
every shot in order for

00:02:45.220 --> 00:02:46.660
X to be equal to 0.

00:02:46.660 --> 00:02:51.390
What's the probability that
I make exactly 1 shot?

00:02:54.980 --> 00:02:57.110
I might make the first one and
then miss the other ones.

00:02:57.110 --> 00:02:58.890
I might miss all of
them but the second.

00:02:58.890 --> 00:03:00.810
I might miss all of
them, but the third.

00:03:00.810 --> 00:03:02.290
So let's think about, what's
the probability of each

00:03:02.290 --> 00:03:05.300
of those circumstances?

00:03:05.300 --> 00:03:06.580
Let's say I make it.

00:03:06.580 --> 00:03:08.780
I'll call that a make.

00:03:08.780 --> 00:03:10.765
Too bad make and miss
both start with m.

00:03:10.765 --> 00:03:15.910
Let's see, I'll call it
point-- point and miss.

00:03:15.910 --> 00:03:19.750
So it could be like a
point and then 5 misses.

00:03:23.300 --> 00:03:23.490
it?

00:03:23.490 --> 00:03:28.920
Could be a miss, a miss, a
miss, a point, a miss, a miss.

00:03:28.920 --> 00:03:32.490
Now you can imagine, there's
5 of these scenarios.

00:03:32.490 --> 00:03:35.330
There's actually 6
of these scenarios.

00:03:35.330 --> 00:03:38.630
The shot that I make would be
in 1 of these 6-- I don't want

00:03:38.630 --> 00:03:41.860
to use the word bucket because
we're already using a

00:03:41.860 --> 00:03:43.720
basketball analogy.

00:03:43.720 --> 00:03:45.750
But it can be in 1
of these 6 spots.

00:03:45.750 --> 00:03:48.670
In one of the six
shots that I take.

00:03:48.670 --> 00:03:49.790
So there's 6 of
these scenarios.

00:03:49.790 --> 00:03:52.490
What's the probability
of each of these?

00:03:52.490 --> 00:03:55.080
This is a 30% chance
of happening.

00:03:55.080 --> 00:03:59.070
And then each of these are
70% chance of happening.

00:03:59.070 --> 00:04:04.750
So it'd be 0.3 times 0.7
times 0.7 times 0.7

00:04:04.750 --> 00:04:06.520
times 0.7 times 0.7.

00:04:06.520 --> 00:04:08.540
This is 0.7 to the fifth.

00:04:08.540 --> 00:04:11.210
Times 0.7 to the fifth.

00:04:11.210 --> 00:04:12.580
That's the odds of
this happening.

00:04:12.580 --> 00:04:14.440
What are the odds of
this one happening?

00:04:14.440 --> 00:04:14.860
Well, let's see.

00:04:14.860 --> 00:04:18.820
You have 0.7 times 0.7
times 0.7 times 0.3

00:04:18.820 --> 00:04:21.570
times 0.7 times 0.7.

00:04:21.570 --> 00:04:23.910
But if you think about it,
you're still taking 0.7

00:04:23.910 --> 00:04:25.490
times itself five times.

00:04:25.490 --> 00:04:29.380
0.7, 0.7, 0.7, 0.7, 0.7.

00:04:29.380 --> 00:04:32.310
You're taking 0.7 to the fifth
power and you have to multiply

00:04:32.310 --> 00:04:35.830
by 0.3 once as well.

00:04:35.830 --> 00:04:39.760
So no matter where you make the
shot, the chances of any of

00:04:39.760 --> 00:04:42.320
these permutations
independently are 0.3 times

00:04:42.320 --> 00:04:44.660
0.7 to the fifth--
whatever that is.

00:04:44.660 --> 00:04:46.690
And then how many ways
are there to do this?

00:04:46.690 --> 00:04:47.700
Well, we just figured out.

00:04:47.700 --> 00:04:49.640
There are 6 ways to do this.

00:04:49.640 --> 00:04:51.160
You might make only
the first shot.

00:04:51.160 --> 00:04:53.910
You might make only the second
shot, only the third shot,

00:04:53.910 --> 00:04:55.240
and so forth and so on.

00:04:55.240 --> 00:04:59.280
So the probability that X is
equal to 1-- the probability

00:04:59.280 --> 00:05:05.350
that our random variable is
equal to 1 is equal to 6 times

00:05:05.350 --> 00:05:09.450
0.3 times 0.7 to the fifth.

00:05:09.450 --> 00:05:11.980
And just so that we make it
clear and connect it all to the

00:05:11.980 --> 00:05:17.160
binomial distribution, if we
were to have done the n

00:05:17.160 --> 00:05:20.110
choose 0 here, what's the
binomial coefficient?

00:05:20.110 --> 00:05:24.215
So in our example n is 6,
so what's 6 choose 0?

00:05:26.770 --> 00:05:38.720
That's 6 factorial over
0 factorial, times 6

00:05:38.720 --> 00:05:40.070
minus 0 factorial.

00:05:44.050 --> 00:05:45.460
6 minus 0 is just 6.

00:05:45.460 --> 00:05:48.440
So 6 factorial divided by 6
factorial, those cancel out.

00:05:48.440 --> 00:05:49.295
You're left with 1.

00:05:49.295 --> 00:05:50.880
But what's 0 factorial?

00:05:50.880 --> 00:05:53.390
And this is one of those
bizarre definitional things in

00:05:53.390 --> 00:05:55.150
mathematics, and I'll leave
you to think about it.

00:05:55.150 --> 00:05:57.120
And I've addressed this
is previous videos.

00:05:57.120 --> 00:06:01.420
But 0 factorial is actually--
so that it works out properly

00:06:01.420 --> 00:06:03.720
is defined to be equal to 1.

00:06:03.720 --> 00:06:06.740
And I did that to just show
you that this is the binomial

00:06:06.740 --> 00:06:08.890
coefficient on this term.

00:06:08.890 --> 00:06:09.900
So we just multiply it by 1.

00:06:09.900 --> 00:06:11.580
That's why I never
even brought it up.

00:06:11.580 --> 00:06:14.610
The probability of this
happening is 0.7 to the sixth.

00:06:14.610 --> 00:06:17.270
And then you multiply it times
the binomial coefficient.

00:06:17.270 --> 00:06:19.030
But there's only one way that
this can happen and that's

00:06:19.030 --> 00:06:21.030
why this turned out to be 1.

00:06:21.030 --> 00:06:22.970
I didn't want to confuse you so
I didn't bring all that up.

00:06:22.970 --> 00:06:25.920
But we did still use the
binomial coefficient.

00:06:25.920 --> 00:06:27.550
Let's think about
it in this one.

00:06:27.550 --> 00:06:33.750
In this situation we're taking
6 shots, and we're choosing

00:06:33.750 --> 00:06:35.740
only 1 of them to be made.

00:06:35.740 --> 00:06:37.820
What's 6 choose 1?

00:06:37.820 --> 00:06:44.580
That's 6 factorial over
1 factorial, divided by

00:06:44.580 --> 00:06:46.100
6 minus 1 factorial.

00:06:48.890 --> 00:06:51.650
That's 6 factorial divided
by-- well, 1 factorial

00:06:51.650 --> 00:06:52.520
can be ignored.

00:06:52.520 --> 00:06:53.140
That's just one.

00:06:53.140 --> 00:06:54.230
Divided by 5 factorial.

00:06:54.230 --> 00:06:56.320
Well, what's that?

00:06:56.320 --> 00:06:59.230
That's 6 times 5 times 4
times 3 times 1 divided by

00:06:59.230 --> 00:07:00.830
5 times 4 times 3 times 1.

00:07:00.830 --> 00:07:02.890
So everything else cancels
out except for just

00:07:02.890 --> 00:07:04.180
four of the 6's.

00:07:04.180 --> 00:07:06.430
And so that's where
we got our 6 from.

00:07:06.430 --> 00:07:08.220
We got it by reasoning,
which actually I think is

00:07:08.220 --> 00:07:09.430
a better way to get it.

00:07:09.430 --> 00:07:11.310
But I just wanted to show you
that we're still using the

00:07:11.310 --> 00:07:12.450
binomial coefficients.

00:07:12.450 --> 00:07:13.960
This is 6 choose 1.

00:07:13.960 --> 00:07:17.120
And then we multiply that times
the probability of any of

00:07:17.120 --> 00:07:18.430
these permutations happening.

00:07:18.430 --> 00:07:21.580
And we figure that out
by we make 1 shot and

00:07:21.580 --> 00:07:23.200
we miss the rest.

00:07:23.200 --> 00:07:24.850
Let's keep going.

00:07:24.850 --> 00:07:29.300
I think you'll get the hang
on this sooner than later.

00:07:29.300 --> 00:07:33.410
What's the probability that
you make exactly two shots?

00:07:33.410 --> 00:07:38.750
So what's the probability for
any given-- let's say I miss,

00:07:38.750 --> 00:07:43.560
miss, miss, miss, and
then I get 2 points.

00:07:43.560 --> 00:07:44.750
Or two shots.

00:07:44.750 --> 00:07:45.860
I don't want to
get too confused.

00:07:45.860 --> 00:07:48.400
Let's say they're all worth
1 point in this version of

00:07:48.400 --> 00:07:49.360
basketball we're playing.

00:07:49.360 --> 00:07:50.850
So here, what's
the probability?

00:07:50.850 --> 00:07:57.540
If 0.7 times 0.7 times 0.7
times 0.7 times 0.3 times 0.3.

00:07:57.540 --> 00:08:02.050
So this is 0.7 to the--
1, 2, 3, fourth power--

00:08:02.050 --> 00:08:07.500
times 0.3 squared.

00:08:07.500 --> 00:08:08.970
That's each of these
circumstances.

00:08:08.970 --> 00:08:13.620
But this isn't the only way
that I can make 2 shots.

00:08:13.620 --> 00:08:17.930
essentially I can choose any
two of these shots I take to

00:08:17.930 --> 00:08:19.470
be the ones that I make.

00:08:19.470 --> 00:08:22.280
I'm not picking it, but
the god's of probability

00:08:22.280 --> 00:08:24.040
will pick it.

00:08:24.040 --> 00:08:25.880
So this isn't the
only circumstance.

00:08:25.880 --> 00:08:28.200
The probability of just this
circumstance, where I miss

00:08:28.200 --> 00:08:30.700
exactly the last
2 shots is this.

00:08:30.700 --> 00:08:34.390
But if I wanted to figure out
all of the different ways that

00:08:34.390 --> 00:08:37.350
I can make exactly 2 shots, I
would essentially say, well,

00:08:37.350 --> 00:08:41.450
I'm taking 6 shots and I'm
choosing 2 of them to be made.

00:08:41.450 --> 00:08:42.980
So how many does
that result in?

00:08:42.980 --> 00:08:43.300
Let's see.

00:08:43.300 --> 00:08:50.460
6 factorial over 2 factorial
6 minus 2 factorial.

00:08:50.460 --> 00:08:52.480
That is equal to-- I like
to multiply it out.

00:08:52.480 --> 00:08:59.030
That's 6 times 5 times 4 times
2 times 1 over 2 times 1.

00:08:59.030 --> 00:09:02.370
This is 4 factorial, 6
minus 2 is 4 factorial.

00:09:02.370 --> 00:09:04.725
4 times 3 times 2 times 1.

00:09:04.725 --> 00:09:06.450
And actually, I forgot
to write a 4 up here.

00:09:06.450 --> 00:09:10.040
6 times 5 times 3 times
3 times 2 times 1.

00:09:10.040 --> 00:09:13.700
Anyway, this cancels
out with that.

00:09:13.700 --> 00:09:17.840
The 2 and the 6 is a
3, so it becomes 15.

00:09:17.840 --> 00:09:22.700
So there are 15 possible ways
to make exactly two shots,

00:09:22.700 --> 00:09:25.780
especially if you don't care
about the order in which-- I'm

00:09:25.780 --> 00:09:29.380
not saying that this point and
this point, if they were

00:09:29.380 --> 00:09:31.390
to happen the other way
around, it doesn't matter.

00:09:31.390 --> 00:09:34.290
It's kind of the
same circumstance.

00:09:34.290 --> 00:09:36.190
I made the last two shots.

00:09:36.190 --> 00:09:38.640
It doesn't say I made the
second to last shot in one

00:09:38.640 --> 00:09:40.340
way and I made the last
shot in the other way.

00:09:40.340 --> 00:09:41.900
We're not differentiating
between, we're just saying

00:09:41.900 --> 00:09:44.250
that we made them.

00:09:44.250 --> 00:09:47.380
So that's why there's 15
different ways to make

00:09:47.380 --> 00:09:49.040
2 shots out of 6.

00:09:49.040 --> 00:09:51.800
And the probability of each
of those is 0.7 to the

00:09:51.800 --> 00:09:55.000
fourth times 0.3 squared.

00:09:55.000 --> 00:10:00.610
So the probability of making
exactly 2 shots is going to be

00:10:00.610 --> 00:10:10.710
6 choose 2 times 0.7 to the
fourth times 0.3 squared.

00:10:10.710 --> 00:10:12.060
And we can go on.

00:10:12.060 --> 00:10:13.650
Let's do them fast.

00:10:13.650 --> 00:10:18.650
The probability that I make
exactly 3 shots by the same

00:10:18.650 --> 00:10:20.710
logic-- well, what's the
probability that I make

00:10:20.710 --> 00:10:23.600
exactly-- in any one of the
circumstance-- well, how many

00:10:23.600 --> 00:10:25.320
ways can I make 3 shots?

00:10:25.320 --> 00:10:27.760
Well, I'm taking 6
and I'm choosing 3.

00:10:27.760 --> 00:10:31.080
And then the probability of
each of those ways is, in

00:10:31.080 --> 00:10:34.550
order to make 3 shots I'm
going to miss 3 shots.

00:10:34.550 --> 00:10:38.820
And then I'm going
to make 3 shots.

00:10:38.820 --> 00:10:40.550
That's straightforward enough
and we could calculate

00:10:40.550 --> 00:10:42.900
what that is.

00:10:42.900 --> 00:10:43.800
But hopefully you know it.

00:10:43.800 --> 00:10:44.370
Let me just do it.

00:10:44.370 --> 00:10:51.700
So that's 6 factorial over 3
factorial times 6 minus 3

00:10:51.700 --> 00:10:59.520
factorial times this part--
0.7 third time's 0.3 squared.

00:10:59.520 --> 00:11:02.400
Let's keep going and this
should actually get faster once

00:11:02.400 --> 00:11:06.040
you-- see probability that
I make exactly 4 shots.

00:11:06.040 --> 00:11:09.230
Well, I'm taking 6 and I'm
going to make 4 of them.

00:11:09.230 --> 00:11:12.090
So I have to choose 4 out of 6.

00:11:12.090 --> 00:11:16.170
So if I'm making 4 shots
I missing 2 shots, so

00:11:16.170 --> 00:11:17.900
there's going to be
2 shots that I miss.

00:11:17.900 --> 00:11:19.110
0.7 times 0.7.

00:11:19.110 --> 00:11:21.360
That's the probability
of a miss-- 0.7.

00:11:21.360 --> 00:11:23.320
And then I making 4 of them.

00:11:23.320 --> 00:11:26.900
So 0.3-- there's a 30% chance
of making each of them.

00:11:26.900 --> 00:11:29.940
So to make 4 it's
0.3 to the fourth.

00:11:29.940 --> 00:11:32.600
So in any one of these ways
where I make 4 shots, this

00:11:32.600 --> 00:11:33.590
is their probability.

00:11:33.590 --> 00:11:36.080
And there are this many
ways of doing it.

00:11:36.080 --> 00:11:44.330
And that's equal to 6 factorial
over 4 factorial times

00:11:44.330 --> 00:11:47.210
6 minus 4 factorial.

00:11:47.210 --> 00:11:52.460
And then times 0.7 squared
times 0.3 to the fourth.

00:11:52.460 --> 00:11:55.970
And if you think,
this is 2 factorial.

00:11:55.970 --> 00:11:58.850
We figured out what
that was up here.

00:11:58.850 --> 00:12:00.790
6 choose 2 was the same thing.

00:12:00.790 --> 00:12:03.040
It was 6 factorial over
2 factorial divided

00:12:03.040 --> 00:12:05.680
by 4 factorial.

00:12:05.680 --> 00:12:07.990
It's the same thing as
this, we just switched

00:12:07.990 --> 00:12:09.400
the 4's and the 2's.

00:12:09.400 --> 00:12:12.030
So this would also
be equal to 15.

00:12:12.030 --> 00:12:13.260
Anyway, I'll probably do
that in the next video,

00:12:13.260 --> 00:12:16.000
but let's just calculate
these really fast.

00:12:16.000 --> 00:12:18.370
The probability that
X is equal to 5?

00:12:18.370 --> 00:12:19.470
I make 5 shots.

00:12:19.470 --> 00:12:25.110
That's 6 choose 5 times 0.7.

00:12:25.110 --> 00:12:27.640
So I'm only missing
1 shot, right?

00:12:27.640 --> 00:12:31.070
So the probability of missing 1
is 0.7 and then I have to make

00:12:31.070 --> 00:12:34.960
5, not necessarily in a
row-- 0.3 to the fifth.

00:12:34.960 --> 00:12:40.120
But you see, any given way
that I make exactly 5 shots,

00:12:40.120 --> 00:12:42.240
this is the probability.

00:12:42.240 --> 00:12:46.880
And there are this many
ways, 6 choose 5 ways of

00:12:46.880 --> 00:12:48.310
making exactly 5 shots.

00:12:48.310 --> 00:12:50.650
I could get the first 5
shots, miss the sixth.

00:12:50.650 --> 00:12:52.780
I could get the last 5 shots.

00:12:52.780 --> 00:12:54.335
I could make the first,
miss the second, et

00:12:54.335 --> 00:12:55.850
cetera and so forth.

00:12:55.850 --> 00:12:58.030
And then finally, the
probability that

00:12:58.030 --> 00:12:59.290
X is equal to 6?

00:12:59.290 --> 00:13:01.440
I make all of the shots.

00:13:01.440 --> 00:13:03.590
That's 6 choose 6.

00:13:03.590 --> 00:13:07.210
How many ways can I pick 6
things out of 6 choices?

00:13:07.210 --> 00:13:08.260
And there's really
only one way.

00:13:08.260 --> 00:13:10.640
You could calculate it
by calculating that.

00:13:10.640 --> 00:13:14.380
Once again, you'll have to know
that 0 factorial is equal to 1.

00:13:14.380 --> 00:13:16.100
I have to make all 6 shots.

00:13:16.100 --> 00:13:18.370
So 0.3 to the sixth.

00:13:18.370 --> 00:13:22.020
0.3 times 0.3 times 0.3
times 0.3-- anyway, I'm

00:13:22.020 --> 00:13:23.070
all out of time again.

00:13:23.070 --> 00:13:25.750
In the next video we're
going to graph this.


Binomial Distribution 2

WEBVTT
Kind: captions
Language: en

00:00:00.650 --> 00:00:03.940
In the last video we defined
our random variable x as the

00:00:03.940 --> 00:00:07.710
number of heads we get after
flipping a coin five times,

00:00:07.710 --> 00:00:09.690
and it's a fair coin.

00:00:09.690 --> 00:00:12.160
And then we figured out the
different probabilities that

00:00:12.160 --> 00:00:13.980
the random variable could
take on different values.

00:00:13.980 --> 00:00:15.570
Let me rewrite them all here.

00:00:15.570 --> 00:00:19.650
The probability that we
get exactly one head or

00:00:19.650 --> 00:00:21.175
zero heads-- actually,
let's start there.

00:00:21.175 --> 00:00:23.300
The probability we get zero
heads, and that's the same

00:00:23.300 --> 00:00:27.800
thing as getting five tails--
we figured out was 1 out of 32.

00:00:27.800 --> 00:00:32.960
The probability of getting
1 head we figured

00:00:32.960 --> 00:00:36.350
out was 5 over 32.

00:00:36.350 --> 00:00:41.540
The probability of getting 2
heads-- probability that our

00:00:41.540 --> 00:00:43.320
random variable is equal
to 2, what was that?

00:00:43.320 --> 00:00:46.300
I think it was 10/32.

00:00:46.300 --> 00:00:50.250
Yeah, it was 10/32 or 5/16.

00:00:50.250 --> 00:00:54.730
10/32 which is equal to 5/16.

00:00:54.730 --> 00:00:59.360
The probability that we get
three heads, that was actually

00:00:59.360 --> 00:01:03.830
equal to the same thing, 10/32
which is equal to 5/16 .

00:01:03.830 --> 00:01:07.640
And that made sense because
the probability of getting 3

00:01:07.640 --> 00:01:10.700
heads is the same thing as a
probability of getting 2 tails.

00:01:10.700 --> 00:01:12.890
And the probability of getting
2 tails should really be the

00:01:12.890 --> 00:01:15.760
same thing as the probability
of getting 2 heads.

00:01:15.760 --> 00:01:19.220
And then finally, or almost
finally, the probability that

00:01:19.220 --> 00:01:25.990
we get 4 heads, that was equal
to 5/32, which also makes sense

00:01:25.990 --> 00:01:28.460
because the probability of
getting 4 heads is the same

00:01:28.460 --> 00:01:32.760
thing as the probability
of getting 1 tail, right?

00:01:32.760 --> 00:01:35.190
And 1 tail should be the same
thing as 1 head, so that's why

00:01:35.190 --> 00:01:36.430
these numbers are the same.

00:01:36.430 --> 00:01:39.810
And then finally, the
probability that we get all 5

00:01:39.810 --> 00:01:45.750
heads, which is the same thing
as getting no tails, is 1/32.

00:01:45.750 --> 00:01:48.620
The probability of no tails
is the same thing as the

00:01:48.620 --> 00:01:51.060
probability as no heads.

00:01:51.060 --> 00:01:52.210
So let's draw this.

00:01:52.210 --> 00:01:56.190
Let's draw our probability
distribution.

00:01:56.190 --> 00:01:59.610
OK, let me draw the x-axis.

00:02:02.920 --> 00:02:05.700
That's not thick enough.

00:02:05.700 --> 00:02:10.230
I'll do it a different color.

00:02:10.230 --> 00:02:15.130
All right, and just let
me try draw the y-axis.

00:02:15.130 --> 00:02:17.130
Almost there.

00:02:17.130 --> 00:02:22.310
All right, so what are the
different values that we care

00:02:22.310 --> 00:02:23.500
about for our random variable?

00:02:23.500 --> 00:02:25.020
Notice, these are all
discreet values.

00:02:25.020 --> 00:02:29.930
They're all particular finite
numbers that we care that our

00:02:29.930 --> 00:02:30.970
random variable can take on.

00:02:30.970 --> 00:02:32.680
And that was actually a
function of our definition of

00:02:32.680 --> 00:02:34.100
the random variable, right?

00:02:34.100 --> 00:02:36.720
This random variable, number of
heads after 5 flips-- you can't

00:02:36.720 --> 00:02:39.010
have an infinite number
of values here.

00:02:39.010 --> 00:02:42.070
Your value can either be 0
through 5, and it can't

00:02:42.070 --> 00:02:44.450
be a non-integer even.

00:02:44.450 --> 00:02:47.800
But the important thing to
realize that there's a finite

00:02:47.800 --> 00:02:50.460
number of values that this
random variable can take on and

00:02:50.460 --> 00:02:55.890
that's why we have a discreet
probably distribution.

00:02:55.890 --> 00:03:00.520
All right, so the probability
that it takes on-- let me just

00:03:00.520 --> 00:03:11.050
draw 0, 1, 2, 3, 4, and 5.

00:03:11.050 --> 00:03:13.130
This is for our
random variable, x.

00:03:13.130 --> 00:03:16.710
So this is the number
of heads in 5 trials.

00:03:16.710 --> 00:03:19.510
Let me draw the
high points first.

00:03:19.510 --> 00:03:25.250
So let's see, the high points
are-- they're all right there.

00:03:25.250 --> 00:03:26.000
10/32.

00:03:26.000 --> 00:03:28.560
That's the probability of 2
and 3 and they're the same.

00:03:28.560 --> 00:03:31.260
Let me draw little bar graph.

00:03:31.260 --> 00:03:35.520
So 2 and 3; let's just say that
this is 10/32 right there.

00:03:35.520 --> 00:03:37.100
I'll draw them the highest
because those are

00:03:37.100 --> 00:03:39.040
the highest values.

00:03:39.040 --> 00:03:46.120
2 and 3 both hit 10/32.

00:03:46.120 --> 00:03:48.110
Actually, let me draw it
a little differently.

00:03:48.110 --> 00:03:51.890
Let me make it so they
touch each other.

00:03:51.890 --> 00:03:57.920
So let's say 2 is there,
and then we draw 3.

00:03:57.920 --> 00:03:59.295
And 3 is also there.

00:04:02.430 --> 00:04:03.330
There you go.

00:04:03.330 --> 00:04:05.070
All right, what's the
probability that you get 1?

00:04:05.070 --> 00:04:07.130
That was 5/32, so
that's 1/2 of these.

00:04:07.130 --> 00:04:08.280
These two should be
the same height.

00:04:08.280 --> 00:04:09.420
So that's 5/32.

00:04:09.420 --> 00:04:11.350
Should be like that.

00:04:11.350 --> 00:04:13.200
That's the same thing
as getting 4 heads,

00:04:13.200 --> 00:04:14.740
so that's like that.

00:04:17.430 --> 00:04:18.680
Let's assume that
this 4 is down here.

00:04:18.680 --> 00:04:20.510
The probability of
getting either 0 or

00:04:20.510 --> 00:04:21.710
5 is the same thing.

00:04:21.710 --> 00:04:22.330
That's 1.

00:04:22.330 --> 00:04:24.870
So that's going to be
1/5 of this height.

00:04:24.870 --> 00:04:28.650
So it's going to look
something like that.

00:04:28.650 --> 00:04:31.485
Let's say this last
one is for 5.

00:04:31.485 --> 00:04:34.690
The drawing is the
hardest part.

00:04:34.690 --> 00:04:36.930
That's going to look
something like that.

00:04:36.930 --> 00:04:41.470
All right, and so this is for 5
and this is for 4 right here.

00:04:41.470 --> 00:04:47.150
And this right here
is 10/32 or 5/16.

00:04:47.150 --> 00:04:49.870
This is 5/32.

00:04:49.870 --> 00:04:52.820
And this right here is 1/32.

00:04:52.820 --> 00:04:56.850
What I have just drawn is
a binomial probability

00:04:56.850 --> 00:04:59.710
distribution.

00:04:59.710 --> 00:05:02.010
It's a particular
instance of the binomial

00:05:02.010 --> 00:05:03.420
probability distribution.

00:05:03.420 --> 00:05:06.180
And actually, as you get to
kind of an infinite number of

00:05:06.180 --> 00:05:09.210
values, and once we get to the
continuous, this'll approach

00:05:09.210 --> 00:05:12.510
the famous bell curve that
you hear about where

00:05:12.510 --> 00:05:17.580
things actually start
looking like a bell.

00:05:17.580 --> 00:05:19.260
Or it'll start
looking like that.

00:05:19.260 --> 00:05:22.500
And we'll do some-- maybe I'll
get Excel out and I'll do it

00:05:22.500 --> 00:05:25.090
where I start saying-- instead
of saying, the number

00:05:25.090 --> 00:05:27.470
of heads in 5 trials.

00:05:27.470 --> 00:05:33.040
If I did this as the number of
heads in 5 million trials,

00:05:33.040 --> 00:05:35.630
these bars would get very, very
close together and you'd start

00:05:35.630 --> 00:05:39.500
seeing them approach this thing
that looks like a bell curve.

00:05:39.500 --> 00:05:41.800
And this is a very
important distribution.

00:05:41.800 --> 00:05:44.600
One, because it actually
describes a lot of

00:05:44.600 --> 00:05:45.820
random processes.

00:05:45.820 --> 00:05:47.610
But it's actually very
important to statistics

00:05:47.610 --> 00:05:50.190
generally because a lot of
times in statistics you don't

00:05:50.190 --> 00:05:53.630
know the underlying mechanism
that's generating your results

00:05:53.630 --> 00:05:55.470
and you just assume that
there's just a bunch of

00:05:55.470 --> 00:05:58.270
random stuff going on.

00:05:58.270 --> 00:06:00.340
You just add up a bunch
of random events.

00:06:00.340 --> 00:06:02.440
When you're adding up random
events that's like counting

00:06:02.440 --> 00:06:04.550
the number of heads.

00:06:04.550 --> 00:06:08.470
So you assume that a lot
of things have-- well,

00:06:08.470 --> 00:06:10.900
in the discreet case, a
binomial distribution.

00:06:10.900 --> 00:06:12.920
And then, in a few videos
from now I'll show you the

00:06:12.920 --> 00:06:16.350
continuous cases, which is
the normal distribution.

00:06:16.350 --> 00:06:19.430
And this is really important
to realize because sometimes

00:06:19.430 --> 00:06:22.550
people make that assumption
about certain things and the

00:06:22.550 --> 00:06:24.960
biggest one-- and this is
probably the most negative

00:06:24.960 --> 00:06:27.540
repercussions, especially in
this type of financial

00:06:27.540 --> 00:06:27.940
environment.

00:06:27.940 --> 00:06:31.160
Well, they'll assume that some
process has a binomial or a

00:06:31.160 --> 00:06:34.220
normal distribution where
it really doesn't.

00:06:34.220 --> 00:06:36.140
Because if you assume that
something has a distribution

00:06:36.140 --> 00:06:38.340
like this you start saying,
oh, well the probabilities at

00:06:38.340 --> 00:06:39.745
these ends are really low.

00:06:39.745 --> 00:06:42.810
But what if the distribution
is something like this?

00:06:42.810 --> 00:06:43.920
And I'll do more work on this.

00:06:43.920 --> 00:06:46.340
I don't want to get too
advanced too fast.

00:06:46.340 --> 00:06:49.360
But the general idea, it's
really important to understand

00:06:49.360 --> 00:06:51.520
the assumption you're making
when someone says, oh, we

00:06:51.520 --> 00:06:52.680
assume it's a normal
distribution.

00:06:52.680 --> 00:06:54.970
We assume it's a
binomial distribution.

00:06:54.970 --> 00:06:57.650
But with that said, that's
a little bit of a nugget

00:06:57.650 --> 00:07:00.360
of why this is important
going into the future.

00:07:00.360 --> 00:07:02.820
But just to kind of review
a little more what we've

00:07:02.820 --> 00:07:04.270
already studied, let's
think about this.

00:07:04.270 --> 00:07:06.940
Why is this called a
binomial distribution?

00:07:06.940 --> 00:07:11.820
Well, if you think about it,
when you flipped 5 coins or

00:07:11.820 --> 00:07:15.320
when you had 5 flips of the
same coin-- each arrangement,

00:07:15.320 --> 00:07:19.075
I'll pick an arbitrary
arrangement of heads and tails.

00:07:19.075 --> 00:07:22.530
Each circumstance of heads and
tails, I guess I could call it.

00:07:22.530 --> 00:07:24.290
You know, that's one
of them, 5 flips.

00:07:24.290 --> 00:07:28.480
Each of these have exactly
a 1 in 32 probability.

00:07:28.480 --> 00:07:30.710
In fact, there's exactly
32 ways I can draw some

00:07:30.710 --> 00:07:32.800
combination of heads
and tails here.

00:07:32.800 --> 00:07:35.580
So each of those have a
1 in 32 probability.

00:07:35.580 --> 00:07:38.840
And what we essentially did in
the last video when we said,

00:07:38.840 --> 00:07:41.650
OK, what was the probability
of getting exactly two heads?

00:07:41.650 --> 00:07:45.290
We essentially said, OK, how
many of these circumstances, or

00:07:45.290 --> 00:07:47.810
how many of these-- I guess we
could call it-- how many of

00:07:47.810 --> 00:07:52.130
these permutations had 2 heads?

00:07:52.130 --> 00:07:55.600
And we counted them up and we
said, 10 of them have 2 heads

00:07:55.600 --> 00:07:58.010
and that's why the probability
was 10 out of 32.

00:07:58.010 --> 00:08:00.630
And the way we figured
that out is for example,

00:08:00.630 --> 00:08:01.760
if we said, 2 heads.

00:08:01.760 --> 00:08:07.920
We said, OK, 1 of 5 flips could
be the first head, and then 1

00:08:07.920 --> 00:08:09.910
of 4 flips could be
the second head.

00:08:09.910 --> 00:08:13.440
And then we don't care about
order, so we don't care if flip

00:08:13.440 --> 00:08:15.770
1 was a first head and flip two
was a second head or was

00:08:15.770 --> 00:08:16.510
the other way around.

00:08:16.510 --> 00:08:19.380
So we divide by 2, and we
said that this was the

00:08:19.380 --> 00:08:21.900
same thing as 5 factorial.

00:08:21.900 --> 00:08:23.570
Actually, let me do
it color coded.

00:08:23.570 --> 00:08:31.130
This part is the same thing as
5 factorial over 3 factorial.

00:08:31.130 --> 00:08:33.520
And then, that's actually the
same thing as 2 factorial

00:08:33.520 --> 00:08:37.290
because 2 factorial
is 2 times 1.

00:08:37.290 --> 00:08:40.890
So in general, let
me write this down.

00:08:40.890 --> 00:08:45.540
The probability that x
equaled n-- and this is

00:08:45.540 --> 00:08:46.820
for the x that I defined.

00:08:46.820 --> 00:08:50.130
The random variable, the number
of heads I get in 5 flips of

00:08:50.130 --> 00:09:02.100
the coin-- it was equal to 5
factorial divided

00:09:02.100 --> 00:09:05.430
by n factorial.

00:09:05.430 --> 00:09:07.050
In this case it was 2, 2 was n.

00:09:07.050 --> 00:09:10.730
We said was the probability
that we get exactly 2 heads.

00:09:10.730 --> 00:09:14.430
Times 5 minus 2 factorial.

00:09:17.870 --> 00:09:21.990
And I encourage you to review
because it really is important

00:09:21.990 --> 00:09:23.400
to get an intuitive
feel of this.

00:09:23.400 --> 00:09:26.890
I encourage you to review
the videos I made in the

00:09:26.890 --> 00:09:31.680
probability playlist on
binomial coefficients, and on

00:09:31.680 --> 00:09:34.720
this flipping of coins type of
probability problems because I

00:09:34.720 --> 00:09:37.140
go a little more in detail in
the actual intuition of this.

00:09:37.140 --> 00:09:39.580
But if you watch those or if
you have a little bit of

00:09:39.580 --> 00:09:41.490
experience with this, you
would recognize that this is

00:09:41.490 --> 00:09:43.980
the binomial coefficient.

00:09:43.980 --> 00:09:46.340
And actually, I even have a
video why it's called the

00:09:46.340 --> 00:09:48.830
binomial because these
coefficients show up when you

00:09:48.830 --> 00:09:50.380
actually multiply binomials.

00:09:50.380 --> 00:09:54.600
Binomials are just things like
if I just have x plus why and I

00:09:54.600 --> 00:09:57.450
start multiplying it by itself,
take it to different powers,

00:09:57.450 --> 00:10:00.380
the coefficients of these tend
to be-- well, they are

00:10:00.380 --> 00:10:01.080
the same as these.

00:10:01.080 --> 00:10:03.270
And I give you a whole
video on why that-- well,

00:10:03.270 --> 00:10:04.420
that's why that works.

00:10:04.420 --> 00:10:06.180
And so this is why
it's even called the

00:10:06.180 --> 00:10:07.990
binomial coefficient.

00:10:07.990 --> 00:10:10.210
And why this is called the
binomial distribution.

00:10:10.210 --> 00:10:13.060
But another way of writing
this, the shorthand

00:10:13.060 --> 00:10:16.250
is 5 choose n.

00:10:16.250 --> 00:10:18.340
And they say that because
what were we doing?

00:10:18.340 --> 00:10:21.810
We said we had 5 flips and
we were choosing 2 of

00:10:21.810 --> 00:10:23.510
the flips to be heads.

00:10:23.510 --> 00:10:26.830
Or, in this case, we have 5
flips and we're choosing n

00:10:26.830 --> 00:10:28.870
of the flips to be heads.

00:10:28.870 --> 00:10:32.110
So this will tell you how many
of the different permutations

00:10:32.110 --> 00:10:33.820
satisfy our condition.

00:10:33.820 --> 00:10:35.570
And then we say, well,
what's the probability

00:10:35.570 --> 00:10:36.230
of each of those?

00:10:36.230 --> 00:10:39.020
It's times 1 out of 32.

00:10:39.020 --> 00:10:42.340
So this is why it's called
a binomial distribution.

00:10:42.340 --> 00:10:45.790
Each of the values of
probabilities for each of the

00:10:45.790 --> 00:10:50.720
random variable values-- you
can figure them out by using

00:10:50.720 --> 00:10:52.200
your binomial coefficients.

00:10:52.200 --> 00:10:54.420
Anyway, I just realized
I'm out of time again.

00:10:54.420 --> 00:10:56.340
And don't worry, I'm going to
do a couple of more examples

00:10:56.340 --> 00:10:58.690
with this because I really want
you to get the hang of the

00:10:58.690 --> 00:11:01.330
binomial distribution before we
move into the normal

00:11:01.330 --> 00:11:01.980
distribution.

00:11:01.980 --> 00:11:03.631
See you soon.


Binomial Distribution 4

WEBVTT
Kind: captions
Language: en

00:00:00.640 --> 00:00:03.510
In the last video we talked
about the situation where I'm

00:00:03.510 --> 00:00:05.390
taking 9 shots on a goal.

00:00:05.390 --> 00:00:08.570
We knew my probability of
making any given shot, and what

00:00:08.570 --> 00:00:11.510
we wanted to do is figure out
the probability distribution of

00:00:11.510 --> 00:00:13.550
me making k shots, in general.

00:00:13.550 --> 00:00:16.410
We defined our random
variable, x, as the number

00:00:16.410 --> 00:00:17.690
of shots I make out of 6.

00:00:17.690 --> 00:00:20.280
So I realized in that last
example and that example is

00:00:20.280 --> 00:00:24.100
right back here, that the
math gets a little hairy.

00:00:24.100 --> 00:00:27.260
You're dealing with 0.7 then
times 0.3 to the fifth

00:00:27.260 --> 00:00:28.000
and all of that.

00:00:28.000 --> 00:00:30.630
So it got a little complicated
and what better thing to do if

00:00:30.630 --> 00:00:32.240
you have numbers like this,
even better than the

00:00:32.240 --> 00:00:33.550
calculator than to use Excel.

00:00:33.550 --> 00:00:40.330
And you'll see that Excel is
a fairly powerful tool for

00:00:40.330 --> 00:00:41.430
probability and statistics.

00:00:41.430 --> 00:00:43.620
And in general, for a lot
of types of simulations.

00:00:43.620 --> 00:00:47.130
If you don't want to actually
write serious code you can

00:00:47.130 --> 00:00:50.770
actually do fairly serious
things with something as

00:00:50.770 --> 00:00:53.400
seemingly not so simple, or
not so serious as Excel.

00:00:53.400 --> 00:00:54.480
But it's actually
quite serious.

00:00:54.480 --> 00:00:55.370
So let's see.

00:00:55.370 --> 00:00:58.280
So let's say that I'm going
to take-- let's define n.

00:00:58.280 --> 00:01:01.840
I'm going to say that that is,
I'm going to take 6 shots.

00:01:01.840 --> 00:01:06.150
The probability of me making
any shot I'll say is 0.3.

00:01:06.150 --> 00:01:08.440
That's what we did
in the last video.

00:01:08.440 --> 00:01:14.450
The probability of a miss,
let me actually write it a

00:01:14.450 --> 00:01:15.310
little bit more explicitly.

00:01:15.310 --> 00:01:20.990
Probability of a make is equal
to 0.3 and the probability of a

00:01:20.990 --> 00:01:24.640
miss I'm going to write-- and
instead of just writing 0.7

00:01:24.640 --> 00:01:27.110
there because we know it is,
let's just it a little bit

00:01:27.110 --> 00:01:28.070
dependent on the first one.

00:01:28.070 --> 00:01:32.080
So write out the formula, we'll
say that's equal to 1 minus--

00:01:32.080 --> 00:01:34.510
and then we'll select
this cell right here.

00:01:34.510 --> 00:01:36.880
It's equal to 1 minus the
probability that I make a

00:01:36.880 --> 00:01:39.950
shot, And notice it just
calculated it for us, 0.7.

00:01:39.950 --> 00:01:42.570
Let me zoom in a little bit.

00:01:42.570 --> 00:01:43.060
There you go.

00:01:43.060 --> 00:01:44.950
That might be easier
for you to read.

00:01:44.950 --> 00:01:48.140
Because I know it gets
really small on YouTube.

00:01:48.140 --> 00:01:50.830
And this is neat because now if
we wanted to see what happens

00:01:50.830 --> 00:01:52.490
when this becomes 0.2
that automatically

00:01:52.490 --> 00:01:53.510
calculates to 0.8.

00:01:53.510 --> 00:01:53.900
So that's neat.

00:01:53.900 --> 00:01:55.870
Let's just put it back to 0.3.

00:01:55.870 --> 00:01:58.440
And now let's do a bunch of
rows so that we can calculate

00:01:58.440 --> 00:02:02.500
the probability that our random
variable, x, could be 0

00:02:02.500 --> 00:02:05.870
shots or 1 shot or whatever.

00:02:05.870 --> 00:02:09.860
So let's say that k-- let
me make a row called k.

00:02:09.860 --> 00:02:11.590
So that's the number of
shots we need to make.

00:02:11.590 --> 00:02:16.995
So 0, 1, 2, 3, 4, 5, 6.

00:02:16.995 --> 00:02:20.260
You can't see the sixth one
right now, let me just go

00:02:20.260 --> 00:02:23.650
up here and now you
can see everything.

00:02:23.650 --> 00:02:25.430
And then we need to figure out
the binomial coefficient.

00:02:28.330 --> 00:02:29.210
Well actually,
let's do it first.

00:02:29.210 --> 00:02:32.780
Let's say the probability of
making any one of those,

00:02:32.780 --> 00:02:36.170
any one way of getting no
shots, or any one way of

00:02:36.170 --> 00:02:38.170
getting exactly 3 shots.

00:02:38.170 --> 00:02:44.210
So that's going to be the
probability of a make.

00:02:44.210 --> 00:02:45.530
So you're going to make it.

00:02:45.530 --> 00:02:50.530
You're going to make k shots
times the probability

00:02:50.530 --> 00:02:51.980
of a miss.

00:02:51.980 --> 00:02:54.820
So if you make k shots,
how many do you miss?

00:02:54.820 --> 00:02:57.100
You miss n minus k.

00:02:57.100 --> 00:02:58.990
And I'm not doing anything
fancy in Excel right here.

00:02:58.990 --> 00:03:01.210
I'm just kind of writing a
label that hopefully is a

00:03:01.210 --> 00:03:02.190
little intuitive for you.

00:03:02.190 --> 00:03:06.880
So this is the probability--
this column is going to be-- in

00:03:06.880 --> 00:03:11.070
this cell right here is going
to be the probability that any

00:03:11.070 --> 00:03:14.820
one particular way of making
3 shots and missing 3 shots.

00:03:14.820 --> 00:03:16.860
It's going to go in
that cell eventually.

00:03:16.860 --> 00:03:18.920
And then you need to know
that you needed the

00:03:18.920 --> 00:03:20.940
binomial coefficient.

00:03:20.940 --> 00:03:23.960
It's going to look a
little bit messy now.

00:03:23.960 --> 00:03:30.370
So you want n choose k.

00:03:30.370 --> 00:03:32.220
So essentially this row is
going to say, what's the

00:03:32.220 --> 00:03:36.560
probability for example, in
this cell right here we'll have

00:03:36.560 --> 00:03:40.780
the probability of making the
first and missing the next 5,

00:03:40.780 --> 00:03:43.170
or missing the first 5
and making the last 1.

00:03:43.170 --> 00:03:44.270
They're all going to be
the same probability.

00:03:44.270 --> 00:03:47.460
You're going to have
1 make and 5 misses.

00:03:47.460 --> 00:03:49.250
And then, this cell we're
going to say, well, how

00:03:49.250 --> 00:03:52.840
many different ways can
I make just 1 out of 6?

00:03:52.840 --> 00:03:55.850
And that's why I'm going
to choose 1 out of 6.

00:03:55.850 --> 00:03:57.840
k is 1 and n is 6.

00:03:57.840 --> 00:04:00.530
That's going to go there.

00:04:00.530 --> 00:04:03.090
And then we can calculate what
the probability that our random

00:04:03.090 --> 00:04:07.870
variable is equal to k,
is equal to this value.

00:04:07.870 --> 00:04:09.910
And it looks all fancy, but
it's exactly what we did in

00:04:09.910 --> 00:04:15.860
the last video with my little
doodle tool that I use.

00:04:15.860 --> 00:04:17.850
Which is actually just
Microsoft Paint for those of

00:04:17.850 --> 00:04:20.540
you wondering because I get a
lot of e-mails and I'm tired

00:04:20.540 --> 00:04:22.690
of saying it's just
Microsoft Paint.

00:04:22.690 --> 00:04:26.270
All right, so what's the
probability that I make 0

00:04:26.270 --> 00:04:30.310
and I miss 6 because that's
what they're saying here.

00:04:30.310 --> 00:04:33.900
So this is going to be the
probability of me making a

00:04:33.900 --> 00:04:37.380
shot-- and I'll put
those dollar signs.

00:04:37.380 --> 00:04:39.330
That kind of fixes
it on this cell.

00:04:39.330 --> 00:04:44.950
The probability that I make
a shot to the kth power.

00:04:44.950 --> 00:04:51.220
So I make 0 shots times the
probability that I miss a shot.

00:04:53.900 --> 00:04:58.240
Put those dollar signs there so
that it fixes on that cell--

00:04:58.240 --> 00:05:01.100
to the n minus k power.

00:05:01.100 --> 00:05:02.820
In this case it would
be the sixth power.

00:05:02.820 --> 00:05:05.260
I miss 6 six shots, so
to the-- let me put it

00:05:05.260 --> 00:05:06.600
in parentheses-- n.

00:05:06.600 --> 00:05:08.200
Let me fix on that cell.

00:05:08.200 --> 00:05:13.850
n minus k power.

00:05:13.850 --> 00:05:14.650
And there you go there.

00:05:14.650 --> 00:05:17.070
That's the probability for
example, of me making the

00:05:17.070 --> 00:05:19.280
first and missing the next 5.

00:05:19.280 --> 00:05:23.140
Or this could be the
probability of me getting the

00:05:23.140 --> 00:05:24.790
first shot, then missing the
second, and getting

00:05:24.790 --> 00:05:26.820
the last 4 missed.

00:05:26.820 --> 00:05:28.540
So any of one of
those situations.

00:05:28.540 --> 00:05:30.820
And how many of those
situations are there?

00:05:30.820 --> 00:05:33.950
Well that's n choose k.

00:05:33.950 --> 00:05:37.280
So that's equal to-- n
choose k-- that's the

00:05:37.280 --> 00:05:38.800
same thing we did before.

00:05:38.800 --> 00:05:40.530
That's all this
factorial stuff here.

00:05:40.530 --> 00:05:42.210
That's n choose k.

00:05:42.210 --> 00:05:47.790
So I'm just going to express
the binomial coefficient

00:05:47.790 --> 00:05:49.300
expression in Excel.

00:05:49.300 --> 00:05:52.280
So it's a factorial of how many
we're choosing from, how many

00:05:52.280 --> 00:05:54.640
shots we're taking, and the
Excel function for

00:05:54.640 --> 00:05:55.910
that is fact.

00:05:55.910 --> 00:05:59.460
So we'll take the factorial of
6 and we'll divide it by--

00:05:59.460 --> 00:06:00.890
put a parentheses here.

00:06:00.890 --> 00:06:16.020
The factorial of k times
the factorial of n.

00:06:16.020 --> 00:06:17.910
Let me fix that n.

00:06:17.910 --> 00:06:19.555
Minus k.

00:06:19.555 --> 00:06:22.610
And I know it fell off.

00:06:22.610 --> 00:06:25.240
n minus k.

00:06:25.240 --> 00:06:27.970
You put some parentheses there,
so the parentheses match up.

00:06:27.970 --> 00:06:29.890
Actually, this what fixes
on this cell Let me

00:06:29.890 --> 00:06:32.450
put an F4 there.

00:06:32.450 --> 00:06:33.630
And then there you go.

00:06:33.630 --> 00:06:38.030
There's only one way to choose
0 things out of 6 things.

00:06:38.030 --> 00:06:39.350
That's what that tells us.

00:06:39.350 --> 00:06:43.350
And then the probability that
my random variable is equal to

00:06:43.350 --> 00:06:47.780
k, or in this case, that I make
exactly 0 shots is equal to the

00:06:47.780 --> 00:06:51.490
probability of any of the
specific ways of making 0 shots

00:06:51.490 --> 00:06:55.210
times the number of those
ways there are times that.

00:06:55.210 --> 00:06:57.600
So that's the probability
of making 0 shots.

00:06:57.600 --> 00:06:59.920
And this is a cool thing
about Excel, we can now

00:06:59.920 --> 00:07:01.860
select these cells.

00:07:01.860 --> 00:07:03.970
And just go into this right
hand corner, just drag it

00:07:03.970 --> 00:07:06.555
down, and it'll do that
calculation for all of them.

00:07:06.555 --> 00:07:08.540
And this is neat because
it calculated the

00:07:08.540 --> 00:07:10.160
binomial coefficients.

00:07:10.160 --> 00:07:13.110
This is 6 choose 3.

00:07:13.110 --> 00:07:14.950
n is 6, k is 3.

00:07:14.950 --> 00:07:16.440
This is 6 choose 3 is 20.

00:07:16.440 --> 00:07:17.990
It's nice and symmetric
like you would expect.

00:07:17.990 --> 00:07:20.270
But the probabilities aren't
that symmetric because

00:07:20.270 --> 00:07:21.690
we have 0.3 and 0.7.

00:07:21.690 --> 00:07:24.490
So it's not like the flipping
a coin example that was

00:07:24.490 --> 00:07:27.100
0.5 on either side.

00:07:27.100 --> 00:07:29.310
Sorry, these aren't symmetric
and then when you multiply

00:07:29.310 --> 00:07:30.880
these, of course, these
don't looks symmetric.

00:07:30.880 --> 00:07:32.580
But it's hard to look at these
numbers, so actually, let's

00:07:32.580 --> 00:07:36.160
just use the powers of Excel to
graph this probability

00:07:36.160 --> 00:07:36.505
distribution.

00:07:36.505 --> 00:07:39.100
So let's say insert chart.

00:07:39.100 --> 00:07:42.040
I'm always, I'm clumsy
at inserting charts,

00:07:42.040 --> 00:07:43.640
so let me see.

00:07:43.640 --> 00:07:45.390
The data-- I think
this is how I do it.

00:07:45.390 --> 00:07:48.670
I select the data.

00:07:48.670 --> 00:07:49.240
There you go.

00:07:49.240 --> 00:07:54.780
And then I need to select the
label, the category x labels.

00:07:54.780 --> 00:07:58.310
OK, that's going to
be that right there.

00:07:58.310 --> 00:08:00.500
And then let's see.

00:08:00.500 --> 00:08:02.630
Next, that looks good.

00:08:06.190 --> 00:08:07.470
I don't want to have anything.

00:08:07.470 --> 00:08:09.990
I don't need a legend.

00:08:09.990 --> 00:08:11.330
I don't want to show a legend.

00:08:11.330 --> 00:08:12.550
There you go.

00:08:12.550 --> 00:08:13.400
All right.

00:08:13.400 --> 00:08:16.160
Now I think I'm finished.

00:08:16.160 --> 00:08:18.250
Data labels-- yeah,
that's fine.

00:08:18.250 --> 00:08:18.720
OK, finish.

00:08:18.720 --> 00:08:20.500
I don't want to get too fancy.

00:08:20.500 --> 00:08:21.360
Don't want the
letters [INAUDIBLE].

00:08:21.360 --> 00:08:22.750
Let me make this
bigger for you.

00:08:26.130 --> 00:08:28.380
So this is neat and I wish
they didn't make the font so

00:08:28.380 --> 00:08:29.890
big, but you get the point.

00:08:29.890 --> 00:08:34.850
This is a discreet probability
distribution of me making, in

00:08:34.850 --> 00:08:36.990
this case, k shots out of 6.

00:08:36.990 --> 00:08:39.190
And this was based on the fact
that my probability of making

00:08:39.190 --> 00:08:41.520
any given shot was 0.3.

00:08:41.520 --> 00:08:44.280
Let me see if it'll actually--
and I'm not making any promises

00:08:44.280 --> 00:08:47.060
here-- let me see if I can
actually make it so

00:08:47.060 --> 00:08:48.800
that it changes.

00:08:48.800 --> 00:08:50.800
If I make it 0.2
does it change?

00:08:50.800 --> 00:08:51.740
Oh, it changed!

00:08:51.740 --> 00:08:52.480
Look at that.

00:08:52.480 --> 00:08:53.940
That was neat.

00:08:53.940 --> 00:08:57.090
Let me bring this
up a little bit.

00:08:57.090 --> 00:09:00.860
So what's neat is if I have a
30% chance of making a free

00:09:00.860 --> 00:09:04.180
throw, that is my probability
distribution, my discrete

00:09:04.180 --> 00:09:07.520
probability distribution
of making k shots.

00:09:07.520 --> 00:09:09.170
This is my probability
of making no shots.

00:09:09.170 --> 00:09:11.680
I think it was like roughly--
oh, it even gives us it.

00:09:11.680 --> 00:09:16.690
Tell us it's 0.12% or it's 12%
chance of making no shots.

00:09:16.690 --> 00:09:20.080
My probability of making
4 shots is only 6%.

00:09:20.080 --> 00:09:21.610
I know you can't see it but
that little window that

00:09:21.610 --> 00:09:24.260
shows up right under
my pointer says 0.06.

00:09:24.260 --> 00:09:25.130
So this is neat.

00:09:25.130 --> 00:09:27.700
And since the way we set it up
we can actually change it,

00:09:27.700 --> 00:09:31.680
so that if I have a higher
probability of making a shot,

00:09:31.680 --> 00:09:33.080
now it looks pretty symmetric.

00:09:33.080 --> 00:09:36.050
Now my chances of making 4
shots is the same as my

00:09:36.050 --> 00:09:37.340
chances of making 2 shots.

00:09:37.340 --> 00:09:42.250
And if I'm really good at
making baskets, I have

00:09:42.250 --> 00:09:45.370
an 80% probability of
making any given shot.

00:09:45.370 --> 00:09:47.550
Now, all of a sudden, the
whole distribution has

00:09:47.550 --> 00:09:48.620
shifted to the right.

00:09:48.620 --> 00:09:50.340
But I just wanted to show you
one, this is, I think, a

00:09:50.340 --> 00:09:52.030
pretty neat way to use Excel.

00:09:52.030 --> 00:09:54.380
And hopefully, it's
not too daunting.

00:09:54.380 --> 00:09:56.570
The other thing is, these are
all examples of binomial

00:09:56.570 --> 00:09:59.110
distributions and I wanted to
give you an example that might

00:09:59.110 --> 00:10:01.280
be a little bit more relevant
to your everyday life.

00:10:05.930 --> 00:10:08.390
The probabilities of making
and missing aren't the

00:10:08.390 --> 00:10:09.680
same, they change.

00:10:09.680 --> 00:10:11.060
If they are the same
then you end up with a

00:10:11.060 --> 00:10:12.430
situation like that.

00:10:12.430 --> 00:10:15.070
Let's say you're a horrible
basketball player and you

00:10:15.070 --> 00:10:17.430
only have a 10% chance of
making any given shot.

00:10:17.430 --> 00:10:19.810
So there's a very high
probability that

00:10:19.810 --> 00:10:22.960
you make no shots.

00:10:22.960 --> 00:10:27.160
There's a 53% chance you make
no shots and then there's a

00:10:27.160 --> 00:10:30.820
35% chance you make one shot,
and so forth and so on.

00:10:30.820 --> 00:10:31.610
But this is pretty neat.

00:10:31.610 --> 00:10:35.500
This by itself is kind of a fun
little toy and hopefully you

00:10:35.500 --> 00:10:38.200
have enough information to do
it yourself, or maybe

00:10:38.200 --> 00:10:38.980
experiment with more.

00:10:38.980 --> 00:10:42.010
What happens if you
have more than n?

00:10:42.010 --> 00:10:43.420
Actually, maybe I'll do
that in the next video.

00:10:43.420 --> 00:10:45.332
Anyway, see you soon.


Binomial Distribution 1

WEBVTT
Kind: captions
Language: en

00:00:00.590 --> 00:00:03.850
We now know what a
probability distribution is.

00:00:03.850 --> 00:00:05.960
It could be a discrete
probability distribution or a

00:00:05.960 --> 00:00:08.080
continuous one, and we learned
that that's a probability

00:00:08.080 --> 00:00:09.200
density function.

00:00:09.200 --> 00:00:11.890
Now let's study a couple
of the more common ones.

00:00:11.890 --> 00:00:15.810
So let's say I have a coin,
and it's a fair coin, and I'm

00:00:15.810 --> 00:00:17.190
going to flip it five times.

00:00:22.880 --> 00:00:25.800
And I'm going to define
my random variable,

00:00:25.800 --> 00:00:27.272
X, I'll define it.

00:00:27.272 --> 00:00:29.390
I'll make it a capital X.

00:00:29.390 --> 00:00:39.540
It equals the number of
heads I get after 5 flips.

00:00:39.540 --> 00:00:40.640
Maybe I flip them all at once.

00:00:40.640 --> 00:00:42.395
Maybe I have 5 coins and I
flip them all at once and

00:00:42.395 --> 00:00:43.270
I just count the heads.

00:00:43.270 --> 00:00:45.820
Or I could have one coin and I
could flip it five times and

00:00:45.820 --> 00:00:46.520
see the number of heads.

00:00:46.520 --> 00:00:48.740
It actually doesn't matter.

00:00:48.740 --> 00:00:51.900
But let's say I have 1 coin and
I flip it five times, just

00:00:51.900 --> 00:00:53.120
so we have no ambiguity.

00:00:53.120 --> 00:00:55.310
So this is my definition
of my random variable.

00:00:55.310 --> 00:00:57.186
As we know, a random variable,
it's a little different than a

00:00:57.186 --> 00:00:58.740
regular variable, it's
more of a function.

00:00:58.740 --> 00:01:01.740
It assigns a number with
an experiment and this

00:01:01.740 --> 00:01:02.480
one's pretty easy.

00:01:02.480 --> 00:01:05.580
We just count the number of
heads we got after 5 flips and

00:01:05.580 --> 00:01:08.690
that's our random variable, X.

00:01:08.690 --> 00:01:10.930
Let's think a little bit of
what are the different

00:01:10.930 --> 00:01:14.050
probabilities of getting
different numbers here?

00:01:14.050 --> 00:01:21.820
So what is the probability
that X, big capital

00:01:21.820 --> 00:01:24.670
X, is equal to 0?

00:01:24.670 --> 00:01:28.880
So what's the probability that
you get no heads after 5 flips?

00:01:28.880 --> 00:01:31.020
Well, that's essentially the
same thing as the probability

00:01:31.020 --> 00:01:33.690
of getting all tails.

00:01:33.690 --> 00:01:36.750
This is a bit of a
review of probability.

00:01:36.750 --> 00:01:38.630
You have to get all tails.

00:01:38.630 --> 00:01:40.460
And what's the probably
of each of these tails?

00:01:40.460 --> 00:01:41.275
Well, it's 1/2.

00:01:41.275 --> 00:01:43.710
So it'd have to be 1/2
times 1/2 times 1/2

00:01:43.710 --> 00:01:45.180
times 1/2 times 1/2.

00:01:45.180 --> 00:01:47.520
So it'd have to be 1/2
to the fifth power.

00:01:51.930 --> 00:01:56.750
1 to the fifth is 1 over
2 to the fifth is 32.

00:01:56.750 --> 00:01:57.920
Fair enough.

00:01:57.920 --> 00:02:02.680
Now what's the probability--
I'm going through a little

00:02:02.680 --> 00:02:03.730
bit of a probability review.

00:02:03.730 --> 00:02:04.810
Just because I think it's
important just to get the

00:02:04.810 --> 00:02:08.240
intuition of where we're going
now and how you actually form a

00:02:08.240 --> 00:02:09.810
discrete probably distribution.

00:02:09.810 --> 00:02:16.430
Now what's the probability
that you get exactly 1 head?

00:02:16.430 --> 00:02:22.170
Well, that could just
be the first head.

00:02:22.170 --> 00:02:25.290
It could be heads, then tails,
tails, tails, tails, tails.

00:02:25.290 --> 00:02:26.790
Or it could be the second head.

00:02:26.790 --> 00:02:31.510
It could be the probability of
tails, heads, tail, tails,

00:02:31.510 --> 00:02:33.810
tails and so forth.

00:02:33.810 --> 00:02:38.350
This one head that you get, it
could be in any of the 5 spots.

00:02:38.350 --> 00:02:41.710
So what's the probability of
each of these situations?

00:02:41.710 --> 00:02:44.570
Well the probability that
you get a head is 1/2.

00:02:44.570 --> 00:02:47.220
Then the probability you
get tails is 1/2 times

00:02:47.220 --> 00:02:48.870
1/2 times 1/2 times 1/2.

00:02:48.870 --> 00:02:54.250
So the probability of each of
these situations is 1/32.

00:02:54.250 --> 00:02:56.730
Just like the probability of
this particular situation.

00:02:56.730 --> 00:03:00.460
In fact, the probability of any
particular order of heads and

00:03:00.460 --> 00:03:02.760
tails is going to
be 1 out of 32.

00:03:02.760 --> 00:03:07.420
There's actually 32
possible scenarios.

00:03:07.420 --> 00:03:10.590
So the probability of
this is 1 out of 32.

00:03:10.590 --> 00:03:13.100
The probability of
this is 1 out of 32.

00:03:13.100 --> 00:03:15.600
And there's situations like
this because the heads could

00:03:15.600 --> 00:03:17.420
be in any of the 5 spots.

00:03:17.420 --> 00:03:22.230
So the probability that we have
exactly one head is equal to 5

00:03:22.230 --> 00:03:28.300
times 1/32, which
is equal to 5/32.

00:03:28.300 --> 00:03:28.880
Fair enough.

00:03:28.880 --> 00:03:30.330
Now it gets interesting.

00:03:30.330 --> 00:03:32.590
What is the probability--
I'll do each of these

00:03:32.590 --> 00:03:34.620
in a different color.

00:03:34.620 --> 00:03:39.400
What is the probability that my
random variable is equal to 2?

00:03:39.400 --> 00:03:42.970
So I flip the coin five times,
what is the probability

00:03:42.970 --> 00:03:44.960
that I get exactly 2 heads?

00:03:44.960 --> 00:03:46.910
Now it becomes a little
bit interesting.

00:03:46.910 --> 00:03:47.700
So what are all the situations?

00:03:47.700 --> 00:03:52.370
I could have heads, heads,
tails, tails, tails.

00:03:52.370 --> 00:03:57.350
I could have a head, tails,
heads, tails, tails.

00:03:57.350 --> 00:03:59.060
And if you think about it
there's these two heads and

00:03:59.060 --> 00:04:00.720
they can go in a bunch of
different places, and it starts

00:04:00.720 --> 00:04:01.750
to get a little bit confusing.

00:04:01.750 --> 00:04:04.950
You can't just think of it
in kind of the scenario

00:04:04.950 --> 00:04:05.920
analysis like we did here.

00:04:05.920 --> 00:04:08.640
You can, but it becomes
a little bit confusing.

00:04:08.640 --> 00:04:09.700
You have to realize one thing.

00:04:09.700 --> 00:04:14.120
Each of the scenarios, there's
a 1 out of 32 probability.

00:04:14.120 --> 00:04:17.880
1/2 times 1/2 times 1/2
times 1/2 times 1/2.

00:04:17.880 --> 00:04:22.240
So that's a 1 out of 32
probability-- each of those.

00:04:22.240 --> 00:04:26.310
And we have to think about, how
many of these scenarios satisfy

00:04:26.310 --> 00:04:28.420
our condition-- 2 heads?

00:04:28.420 --> 00:04:31.810
So essentially you could
imagine we have 5 flips

00:04:31.810 --> 00:04:35.340
and we're going to choose
2 of them to be heads.

00:04:35.340 --> 00:04:37.850
So you could almost imagine if
you had all the flips sitting

00:04:37.850 --> 00:04:40.440
around, and we had two chairs,
and we said, OK, whichever

00:04:40.440 --> 00:04:44.240
flips sit in these chairs, they
get to be the heads chair.

00:04:44.240 --> 00:04:45.770
Or they get to be
the heads flips.

00:04:45.770 --> 00:04:48.450
And we don't care of
what order they sit in.

00:04:48.450 --> 00:04:50.800
I'm going some place with this,
just so you get hopefully,

00:04:50.800 --> 00:04:51.710
a little intuition.

00:04:51.710 --> 00:04:53.700
And you might want to watch
some of the probability videos

00:04:53.700 --> 00:04:56.320
on this when I talk about the
binomial theorem and all that.

00:04:56.320 --> 00:04:58.680
Because I go into this in
a little bit more detail.

00:04:58.680 --> 00:05:01.990
But if you think about it that
way, the binomial coefficient

00:05:01.990 --> 00:05:03.690
kind of starts to make sense.

00:05:03.690 --> 00:05:08.290
Because if you think about,
OK, I have 5 heads-- I

00:05:08.290 --> 00:05:10.590
have five flips, sorry.

00:05:10.590 --> 00:05:13.010
Which flip is going to
be the first heads?

00:05:13.010 --> 00:05:15.920
Well, there's 5 possibilities.

00:05:15.920 --> 00:05:18.970
Let me do this in a
different color.

00:05:18.970 --> 00:05:23.020
There's 5 possibilities for
which of the positions or

00:05:23.020 --> 00:05:25.650
which of the flips is going
to be the first head.

00:05:25.650 --> 00:05:29.100
Now how many possibilities are
there for the second head?

00:05:29.100 --> 00:05:34.240
Well, the first flip that
we used, used up one

00:05:34.240 --> 00:05:35.590
of the heads chairs.

00:05:35.590 --> 00:05:38.920
Or sorry, the first heads
chair, the first heads spot was

00:05:38.920 --> 00:05:40.650
used up by one of the flips.

00:05:40.650 --> 00:05:44.140
Now there's only 4 flips left,
so there's only 1 out of 4

00:05:44.140 --> 00:05:45.700
flips that the second
head could be in.

00:05:45.700 --> 00:05:46.760
And you saw that here.

00:05:46.760 --> 00:05:49.590
I picked the first one to be a
heads here and then we said,

00:05:49.590 --> 00:05:51.850
OK, 1 of these 4 also
have to be a head.

00:05:51.850 --> 00:05:54.670
Or if I said, OK, this is the
first head, then either this

00:05:54.670 --> 00:05:56.650
one, this one, this one, or
this one has to be heads.

00:05:56.650 --> 00:05:58.850
So there's only 4
possibilities.

00:05:58.850 --> 00:06:04.050
So all I'm saying is the first
time around you have 5

00:06:04.050 --> 00:06:07.840
different possibilities for
where the first heads could be.

00:06:07.840 --> 00:06:09.540
And then the second
time around you have 4

00:06:09.540 --> 00:06:11.280
different possibilities.

00:06:11.280 --> 00:06:13.200
You have to think about it.

00:06:13.200 --> 00:06:17.360
When we count it just like this
we're being dependent on order.

00:06:17.360 --> 00:06:21.650
But we don't care which
flip is in which heads.

00:06:21.650 --> 00:06:25.610
We're not saying that this is a
heads 1 or this is a heads 2.

00:06:25.610 --> 00:06:26.740
These are both heads.

00:06:26.740 --> 00:06:27.380
It doesn't matter.

00:06:27.380 --> 00:06:32.150
We could have this being
the head seat 1, this

00:06:32.150 --> 00:06:33.370
could be head seat 2.

00:06:33.370 --> 00:06:34.600
Or, it could be the
other way around.

00:06:34.600 --> 00:06:37.450
This could be the second head
spot, and this could be

00:06:37.450 --> 00:06:38.330
the first head spot.

00:06:38.330 --> 00:06:40.100
And I'm saying that just
because it's important to

00:06:40.100 --> 00:06:42.450
realize the distribution of
permutation and a combination.

00:06:42.450 --> 00:06:44.170
We don't care about order.

00:06:44.170 --> 00:06:45.930
So there's actually two
different ways that

00:06:45.930 --> 00:06:46.850
this can happen.

00:06:46.850 --> 00:06:48.730
So we divide it by 2.

00:06:48.730 --> 00:06:50.490
And as you'll see it's
actually 2 factorial

00:06:50.490 --> 00:06:51.830
ways that it can happen.

00:06:51.830 --> 00:06:54.110
If this had 3 we would do 3
factorial, and I'll show

00:06:54.110 --> 00:06:55.910
you how that can happen.

00:06:55.910 --> 00:07:01.470
And so this will be equal to--
5 times 4 is 20, divided by

00:07:01.470 --> 00:07:03.160
2, which is equal to 10.

00:07:03.160 --> 00:07:06.090
So there's 10 different
combinations out of the 32

00:07:06.090 --> 00:07:08.240
where you have exactly 2 heads.

00:07:08.240 --> 00:07:13.330
So 10 times 1 out of 32
equal to 10/32, which

00:07:13.330 --> 00:07:13.820
is equal to what?

00:07:13.820 --> 00:07:20.040
5/16.

00:07:20.040 --> 00:07:21.390
And actually, let me
write this in terms of

00:07:21.390 --> 00:07:22.410
a binomial coefficient.

00:07:22.410 --> 00:07:25.620
This up here, that number right
there, if you think about it--

00:07:25.620 --> 00:07:30.640
that's the same thing as
5 factorial over,

00:07:30.640 --> 00:07:32.410
what's 5 times 4?

00:07:32.410 --> 00:07:35.310
5 factorial is 5 times 4
times 3 times 2 times 1.

00:07:35.310 --> 00:07:38.690
So if I just want 5 times 4
what I can do is I divide 5

00:07:38.690 --> 00:07:41.550
factorial divided
by 3 factorial.

00:07:41.550 --> 00:07:46.890
This is equal to 5 times 4
times 3 times 2 times 1

00:07:46.890 --> 00:07:49.700
divided by 3 times 2 times 1.

00:07:49.700 --> 00:07:51.870
And you're just left
with the 5 times 4.

00:07:51.870 --> 00:07:54.150
So this is the same
thing as that.

00:07:54.150 --> 00:07:56.220
And then, since we didn't
care about order, we

00:07:56.220 --> 00:07:57.400
wanted the 2 here.

00:07:57.400 --> 00:07:59.290
And actually, it turns out
that it's 2 factorial.

00:07:59.290 --> 00:08:01.430
I'll show you that
in a little bit.

00:08:01.430 --> 00:08:04.920
It's two factorial times 1/32.

00:08:04.920 --> 00:08:07.510
This was the probability that
our random variable-- that

00:08:07.510 --> 00:08:10.200
we have exactly 2 heads.

00:08:10.200 --> 00:08:13.870
Now what's the probability
that we have exactly 3 heads?

00:08:13.870 --> 00:08:17.970
The probability that
x is equal to 3.

00:08:17.970 --> 00:08:23.080
So by the same logic, the
first head spot can be

00:08:23.080 --> 00:08:26.170
taken by 1 of the 5 flips.

00:08:26.170 --> 00:08:28.580
Then the second head spot
can be taken by 1 of the

00:08:28.580 --> 00:08:30.490
4 left remaining flips.

00:08:30.490 --> 00:08:33.170
And then the third head spot
could be taken by 1 of

00:08:33.170 --> 00:08:35.670
the 3 remaining flips.

00:08:35.670 --> 00:08:40.030
And then, how many different
ways can I arrange 3 flips?

00:08:40.030 --> 00:08:42.410
In general, how many ways
can you arrange 3 things?

00:08:42.410 --> 00:08:45.060
And it's 3 factorial.

00:08:45.060 --> 00:08:46.740
And you could work that out or
you might want to watch the

00:08:46.740 --> 00:08:49.070
probability videos where I work
that a little bit better.

00:08:49.070 --> 00:08:54.400
But actually, If if you just
take the letters A, B, and C

00:08:54.400 --> 00:08:56.380
there's 6 ways that you
can arrange these.

00:08:56.380 --> 00:08:58.040
You can view these
as the head spots.

00:08:58.040 --> 00:09:03.530
And we don't care about order,
so it could be ACB, CAB.

00:09:03.530 --> 00:09:10.290
It could be BAC, BCA, and
then what's the last one

00:09:10.290 --> 00:09:11.110
that I haven't done?

00:09:11.110 --> 00:09:13.310
It's CBA.

00:09:13.310 --> 00:09:15.980
There are 6 ways to arrange
3 distinct things.

00:09:15.980 --> 00:09:18.710
We're dividing by it because we
don't want to double count

00:09:18.710 --> 00:09:21.010
these 6 different ways because
we're viewing them all

00:09:21.010 --> 00:09:21.870
as the same thing.

00:09:21.870 --> 00:09:24.900
Not in this case, but in the
case of we don't care which

00:09:24.900 --> 00:09:26.740
flip is sitting in
which head spot.

00:09:26.740 --> 00:09:28.860
So that's why I got
the 3 factorial.

00:09:28.860 --> 00:09:30.280
And this is the same thing.

00:09:30.280 --> 00:09:33.670
5 times 4 times 3-- this could
be written as 5 factorial

00:09:33.670 --> 00:09:36.150
divided by 3 factorial.

00:09:36.150 --> 00:09:38.370
Then this is divided
by 3 factorial.

00:09:38.370 --> 00:09:40.070
This one is this one.

00:09:40.070 --> 00:09:44.340
And so this is equal to-- I
don't know-- 3 factorial is

00:09:44.340 --> 00:09:47.460
equal to 3 times 2 times 1.

00:09:47.460 --> 00:09:48.910
The 3's cancel out.

00:09:48.910 --> 00:09:50.570
This becomes a 2.

00:09:50.570 --> 00:09:51.790
This becomes a 1.

00:09:51.790 --> 00:09:53.910
Once again, 5 times
2, so it's 10.

00:09:58.340 --> 00:10:01.570
Each situation has a 1 in
32 probability, so once

00:10:01.570 --> 00:10:04.310
again it's equal to 5/16.

00:10:04.310 --> 00:10:05.030
And that's interesting.

00:10:05.030 --> 00:10:07.890
The probability that you get
3 heads is the same as the

00:10:07.890 --> 00:10:09.500
probability you get 2 heads.

00:10:09.500 --> 00:10:11.440
And the reason that-- well,
there's a lot of reasons

00:10:11.440 --> 00:10:12.060
why that's the case.

00:10:12.060 --> 00:10:14.200
But if you think about the
probability of getting 3 heads

00:10:14.200 --> 00:10:18.580
is the same thing as the
probability of getting 2 tails.

00:10:18.580 --> 00:10:21.370
And the probability of getting
2 tails should be the same

00:10:21.370 --> 00:10:23.390
thing as the probability
of getting 2 heads.

00:10:23.390 --> 00:10:25.650
And so it's nice that the
numbers work out that way.

00:10:28.810 --> 00:10:30.610
All right, so we're
almost there.

00:10:33.180 --> 00:10:36.660
What's the probability
that x is equal to 4?

00:10:36.660 --> 00:10:39.170
Well, we could use the same
kind of formula now that

00:10:39.170 --> 00:10:40.650
we were using before.

00:10:40.650 --> 00:10:44.370
You know, it could be 5
times 4 times 3 times 2.

00:10:44.370 --> 00:10:49.450
So that's 5 times 4 times 3
times 2-- all the way, how many

00:10:49.450 --> 00:10:51.260
ways can you arrange 4 things?

00:10:51.260 --> 00:10:53.370
It's 4 factorial.

00:10:53.370 --> 00:10:56.750
4 factorial is essentially
this thing right here.

00:10:56.750 --> 00:11:02.490
4 times 3 times 2 times-- this
is 4 times 3 times 2 times 1.

00:11:02.490 --> 00:11:06.330
So these cancel out, so it's 5
and then each of the scenarios

00:11:06.330 --> 00:11:07.650
has a 1 in 32 chance.

00:11:07.650 --> 00:11:10.500
So it's equal to 5/32.

00:11:10.500 --> 00:11:13.710
And once again, notice, the
probability of getting 4 heads

00:11:13.710 --> 00:11:16.290
is the same thing as the
probability of getting

00:11:16.290 --> 00:11:17.670
exactly 1 head.

00:11:17.670 --> 00:11:21.250
And that makes sense because
4 heads is the same thing

00:11:21.250 --> 00:11:23.580
as getting exactly 1 tail.

00:11:23.580 --> 00:11:24.985
And you say, oh, where's
that one tail going

00:11:24.985 --> 00:11:25.630
to be showing up?

00:11:25.630 --> 00:11:27.210
Oh, there's 5 different
spot for it.

00:11:27.210 --> 00:11:30.790
And each of the scenarios
has a 1 in 32 possibility.

00:11:30.790 --> 00:11:33.320
And then finally, what's
the probability that

00:11:33.320 --> 00:11:35.180
x is equal to 5?

00:11:35.180 --> 00:11:36.545
You get all 5 heads.

00:11:39.050 --> 00:11:41.040
You know, it's going
to be heads, heads,

00:11:41.040 --> 00:11:42.850
heads, heads, heads.

00:11:42.850 --> 00:11:44.440
Each of these have
a 1/2 probability.

00:11:44.440 --> 00:11:46.820
You multiply them,
you get 1 out of 32.

00:11:46.820 --> 00:11:48.880
Or another way to think about
it, if you think about it, the

00:11:48.880 --> 00:11:52.660
32 different ways that you can
have heads and tails in these

00:11:52.660 --> 00:11:56.920
experiments-- this is only
one of those circumstances.

00:11:56.920 --> 00:11:59.180
This was 5 of the
circumstances.

00:11:59.180 --> 00:12:02.410
This was 10 of the
circumstances.

00:12:02.410 --> 00:12:04.960
Anyway, we've done the work,
now we're ready to draw a

00:12:04.960 --> 00:12:07.540
probability distribution.

00:12:07.540 --> 00:12:08.650
I'm running out of time.

00:12:08.650 --> 00:12:10.320
Actually, let me continue
that in the next video.

00:12:10.320 --> 00:12:12.270
And if you're in the mood,
maybe you draw it before

00:12:12.270 --> 00:12:13.490
you watch the next video.

00:12:13.490 --> 00:12:15.010
See you soon.