WEBVTT

00:00:00.000 --> 00:00:00.040 align:middle line:90%


00:00:00.040 --> 00:00:02.460 align:middle line:84%
The following content is
provided under a Creative

00:00:02.460 --> 00:00:03.870 align:middle line:90%
Commons license.

00:00:03.870 --> 00:00:06.910 align:middle line:84%
Your support will help MIT
OpenCourseWare continue to

00:00:06.910 --> 00:00:10.560 align:middle line:84%
offer high quality educational
resources for free.

00:00:10.560 --> 00:00:13.460 align:middle line:84%
To make a donation, or view
additional materials from

00:00:13.460 --> 00:00:19.290 align:middle line:84%
hundreds of MIT courses, visit
MIT OpenCourseWare at

00:00:19.290 --> 00:00:21.996 align:middle line:90%
ocw.mit.edu.

00:00:21.996 --> 00:00:22.490 align:middle line:90%
PROFESSOR: OK.

00:00:22.490 --> 00:00:26.380 align:middle line:84%
So today's lecture will be on
the subject of counting.

00:00:26.380 --> 00:00:29.620 align:middle line:84%
So counting, I guess, is
a pretty simple affair

00:00:29.620 --> 00:00:33.060 align:middle line:84%
conceptually, but it's a
topic that can also get

00:00:33.060 --> 00:00:34.410 align:middle line:90%
to be pretty tricky.

00:00:34.410 --> 00:00:37.840 align:middle line:84%
The reason we're going to talk
about counting is that there's

00:00:37.840 --> 00:00:41.000 align:middle line:84%
a lot of probability problems
whose solution actually

00:00:41.000 --> 00:00:45.050 align:middle line:84%
reduces to successfully counting
the cardinalities of

00:00:45.050 --> 00:00:46.110 align:middle line:90%
various sets.

00:00:46.110 --> 00:00:49.270 align:middle line:84%
So we're going to see the basic,
simplest methods that

00:00:49.270 --> 00:00:52.350 align:middle line:84%
one can use to count
systematically in various

00:00:52.350 --> 00:00:53.660 align:middle line:90%
situations.

00:00:53.660 --> 00:00:56.600 align:middle line:84%
So in contrast to previous
lectures, we're not going to

00:00:56.600 --> 00:00:59.700 align:middle line:84%
introduce any significant
new concepts of a

00:00:59.700 --> 00:01:01.460 align:middle line:90%
probabilistic nature.

00:01:01.460 --> 00:01:04.340 align:middle line:84%
We're just going to use the
probability tools that we

00:01:04.340 --> 00:01:05.680 align:middle line:90%
already know.

00:01:05.680 --> 00:01:08.460 align:middle line:84%
And we're going to apply them
in situations where there's

00:01:08.460 --> 00:01:10.840 align:middle line:90%
also some counting involved.

00:01:10.840 --> 00:01:13.000 align:middle line:84%
Now, today we're going
to just touch the

00:01:13.000 --> 00:01:14.490 align:middle line:90%
surface of this subject.

00:01:14.490 --> 00:01:16.650 align:middle line:84%
There's a whole field of
mathematics called

00:01:16.650 --> 00:01:19.920 align:middle line:84%
combinatorics who are people who
actually spend their whole

00:01:19.920 --> 00:01:24.220 align:middle line:84%
lives counting more and
more complicated sets.

00:01:24.220 --> 00:01:27.580 align:middle line:84%
We were not going to get
anywhere close to the full

00:01:27.580 --> 00:01:31.360 align:middle line:84%
complexity of the field, but
we'll get just enough tools

00:01:31.360 --> 00:01:36.260 align:middle line:84%
that allow us to address
problems of the type that one

00:01:36.260 --> 00:01:39.730 align:middle line:84%
encounters in most common
situations.

00:01:39.730 --> 00:01:43.250 align:middle line:84%
So the basic idea, the basic
principle is something that

00:01:43.250 --> 00:01:45.400 align:middle line:90%
we've already discussed.

00:01:45.400 --> 00:01:49.820 align:middle line:84%
So counting methods apply in
situations where we have

00:01:49.820 --> 00:01:53.660 align:middle line:84%
probabilistic experiments with
a finite number of outcomes

00:01:53.660 --> 00:01:56.070 align:middle line:90%
and where every outcome--

00:01:56.070 --> 00:01:57.770 align:middle line:90%
every possible outcome--

00:01:57.770 --> 00:02:00.260 align:middle line:84%
has the same probability
of occurring.

00:02:00.260 --> 00:02:04.440 align:middle line:84%
So we have our sample space,
omega, and it's got a bunch of

00:02:04.440 --> 00:02:06.520 align:middle line:90%
discrete points in there.

00:02:06.520 --> 00:02:10.539 align:middle line:84%
And the cardinality of the set
omega is some capital N. So,

00:02:10.539 --> 00:02:14.960 align:middle line:84%
in particular, we assume that
the sample points are equally

00:02:14.960 --> 00:02:18.490 align:middle line:84%
likely, which means that every
element of the sample space

00:02:18.490 --> 00:02:22.420 align:middle line:84%
has the same probability
equal to 1 over N.

00:02:22.420 --> 00:02:26.650 align:middle line:84%
And then we are interested in a
subset of the sample space,

00:02:26.650 --> 00:02:29.860 align:middle line:84%
call it A. And that
subset consists

00:02:29.860 --> 00:02:31.350 align:middle line:90%
of a number of elements.

00:02:31.350 --> 00:02:36.080 align:middle line:84%
Let the cardinality of that
subset be equal to little n.

00:02:36.080 --> 00:02:39.370 align:middle line:84%
And then to find the probability
of that set, all

00:02:39.370 --> 00:02:42.060 align:middle line:84%
we need to do is to add the
probabilities of the

00:02:42.060 --> 00:02:43.610 align:middle line:90%
individual elements.

00:02:43.610 --> 00:02:47.030 align:middle line:84%
There's little n elements, and
each one has probability one

00:02:47.030 --> 00:02:50.340 align:middle line:84%
over capital N. And
that's the answer.

00:02:50.340 --> 00:02:53.250 align:middle line:84%
So this means that to solve
problems in this context, all

00:02:53.250 --> 00:02:56.580 align:middle line:84%
that we need to be able to do
is to figure out the number

00:02:56.580 --> 00:03:00.800 align:middle line:84%
capital N and to figure out
the number little n.

00:03:00.800 --> 00:03:04.330 align:middle line:84%
Now, if somebody gives you a set
by just giving you a list

00:03:04.330 --> 00:03:07.660 align:middle line:84%
and gives you another set,
again, giving you a list, it's

00:03:07.660 --> 00:03:09.120 align:middle line:90%
easy to count there element.

00:03:09.120 --> 00:03:11.510 align:middle line:84%
You just count how much
there is on the list.

00:03:11.510 --> 00:03:15.030 align:middle line:84%
But sometimes the sets are
described in some more

00:03:15.030 --> 00:03:20.590 align:middle line:84%
implicit way, and we may have to
do a little bit more work.

00:03:20.590 --> 00:03:22.360 align:middle line:90%
There's various tricks that are

00:03:22.360 --> 00:03:24.410 align:middle line:90%
involved in counting properly.

00:03:24.410 --> 00:03:27.080 align:middle line:84%
And the most common
one is to--

00:03:27.080 --> 00:03:31.350 align:middle line:84%
when you consider a set of
possible outcomes, to describe

00:03:31.350 --> 00:03:33.800 align:middle line:84%
the construction of those
possible outcomes through a

00:03:33.800 --> 00:03:35.440 align:middle line:90%
sequential process.

00:03:35.440 --> 00:03:38.130 align:middle line:84%
So think of a probabilistic
experiment that involves a

00:03:38.130 --> 00:03:42.560 align:middle line:84%
number of stages, and in each
one of the stages there's a

00:03:42.560 --> 00:03:45.890 align:middle line:84%
number of possible choices
that there may be.

00:03:45.890 --> 00:03:48.630 align:middle line:84%
The overall experiment consists
of carrying out all

00:03:48.630 --> 00:03:49.930 align:middle line:90%
the stages to the end.

00:03:49.930 --> 00:03:52.855 align:middle line:90%


00:03:52.855 --> 00:03:55.830 align:middle line:84%
And the number of points in the
sample space is how many

00:03:55.830 --> 00:03:59.920 align:middle line:84%
final outcomes there can be in
this multi-stage experiment.

00:03:59.920 --> 00:04:02.910 align:middle line:84%
So in this picture we have an
experiment in which of the

00:04:02.910 --> 00:04:07.230 align:middle line:84%
first stage we have
four choices.

00:04:07.230 --> 00:04:11.640 align:middle line:84%
In the second stage, no matter
what happened in the first

00:04:11.640 --> 00:04:16.010 align:middle line:84%
stage, the way this is drawn
we have three choices.

00:04:16.010 --> 00:04:19.720 align:middle line:84%
No matter whether we ended up
here, there, or there, we have

00:04:19.720 --> 00:04:22.860 align:middle line:84%
three choices in the
second stage.

00:04:22.860 --> 00:04:27.830 align:middle line:84%
And then there's a third stage
and at least in this picture,

00:04:27.830 --> 00:04:31.520 align:middle line:84%
no matter what happened in the
first two stages, in the third

00:04:31.520 --> 00:04:35.930 align:middle line:84%
stage we're going to have
two possible choices.

00:04:35.930 --> 00:04:41.070 align:middle line:84%
So how many leaves are there
at the end of this tree?

00:04:41.070 --> 00:04:42.170 align:middle line:90%
That's simple.

00:04:42.170 --> 00:04:45.460 align:middle line:84%
It's just the product of
these three numbers.

00:04:45.460 --> 00:04:48.520 align:middle line:84%
The number of possible leaves
that we have out there is 4

00:04:48.520 --> 00:04:50.430 align:middle line:90%
times 3 times 2.

00:04:50.430 --> 00:04:54.030 align:middle line:84%
Number of choices at each stage
gets multiplied, and

00:04:54.030 --> 00:04:57.680 align:middle line:84%
that gives us the number
of overall choices.

00:04:57.680 --> 00:05:01.230 align:middle line:84%
So this is the general rule, the
general trick that we are

00:05:01.230 --> 00:05:03.520 align:middle line:90%
going to use over and over.

00:05:03.520 --> 00:05:07.660 align:middle line:84%
So let's apply it to some very
simple problems as a warm up.

00:05:07.660 --> 00:05:10.530 align:middle line:84%
How many license plates can you
make if you're allowed to

00:05:10.530 --> 00:05:17.140 align:middle line:84%
use three letters and then
followed by four digits?

00:05:17.140 --> 00:05:20.020 align:middle line:84%
At least if you're dealing with
the English alphabet, you

00:05:20.020 --> 00:05:23.460 align:middle line:84%
have 26 choices for
the first letter.

00:05:23.460 --> 00:05:27.100 align:middle line:84%
Then you have 26 choices
for the second letter.

00:05:27.100 --> 00:05:30.300 align:middle line:84%
And then 26 choices for
the third letter.

00:05:30.300 --> 00:05:31.750 align:middle line:90%
And then we start the digits.

00:05:31.750 --> 00:05:34.970 align:middle line:84%
We have 10 choices for the first
digit, 10 choices for

00:05:34.970 --> 00:05:37.780 align:middle line:84%
the second digit, 10 choices for
the third, 10 choices for

00:05:37.780 --> 00:05:40.030 align:middle line:90%
the last one.

00:05:40.030 --> 00:05:43.010 align:middle line:84%
Let's make it a little more
complicated, suppose that

00:05:43.010 --> 00:05:47.100 align:middle line:84%
we're interested in license
plates where no letter can be

00:05:47.100 --> 00:05:50.270 align:middle line:84%
repeated and no digit
can be repeated.

00:05:50.270 --> 00:05:53.040 align:middle line:84%
So you have to use different
letters, different digits.

00:05:53.040 --> 00:05:55.110 align:middle line:84%
How many license plates
can you make?

00:05:55.110 --> 00:05:56.780 align:middle line:84%
OK, let's choose the
first letter,

00:05:56.780 --> 00:05:59.130 align:middle line:90%
and we have 26 choices.

00:05:59.130 --> 00:06:02.350 align:middle line:84%
Now, I'm ready to choose my
second letter, how many

00:06:02.350 --> 00:06:04.610 align:middle line:90%
choices do I have?

00:06:04.610 --> 00:06:08.090 align:middle line:84%
I have 25, because I already
used one letter.

00:06:08.090 --> 00:06:11.900 align:middle line:84%
I have the 25 remaining letters
to choose from.

00:06:11.900 --> 00:06:14.330 align:middle line:84%
For the next letter,
how many choices?

00:06:14.330 --> 00:06:17.030 align:middle line:84%
Well, I used up two of
my letters, so I

00:06:17.030 --> 00:06:19.840 align:middle line:90%
only have 24 available.

00:06:19.840 --> 00:06:22.950 align:middle line:84%
And then we start with the
digits, 10 choices for the

00:06:22.950 --> 00:06:26.910 align:middle line:84%
first digit, 9 choices for the
second, 8 for the third, 7 for

00:06:26.910 --> 00:06:28.160 align:middle line:90%
the last one.

00:06:28.160 --> 00:06:30.480 align:middle line:90%


00:06:30.480 --> 00:06:31.730 align:middle line:90%
All right.

00:06:31.730 --> 00:06:38.710 align:middle line:84%
So, now, let's bring some
symbols in a related problem.

00:06:38.710 --> 00:06:44.190 align:middle line:84%
You are given a set that
consists of n elements and

00:06:44.190 --> 00:06:47.040 align:middle line:84%
you're supposed to take
those n elements and

00:06:47.040 --> 00:06:50.050 align:middle line:90%
put them in a sequence.

00:06:50.050 --> 00:06:52.290 align:middle line:90%
That is to order them.

00:06:52.290 --> 00:06:56.240 align:middle line:84%
Any possible ordering of those
elements is called a

00:06:56.240 --> 00:06:57.560 align:middle line:90%
permutation.

00:06:57.560 --> 00:07:02.630 align:middle line:84%
So for example, if we have the
set 1, 2, 3, 4, a possible

00:07:02.630 --> 00:07:05.105 align:middle line:84%
permutation is the
list 2, 3, 4, 1.

00:07:05.105 --> 00:07:08.560 align:middle line:90%


00:07:08.560 --> 00:07:10.680 align:middle line:84%
That's one possible
permutation.

00:07:10.680 --> 00:07:13.180 align:middle line:84%
And there's lots of possible
permutations, of course, the

00:07:13.180 --> 00:07:15.560 align:middle line:84%
question is how many
are there.

00:07:15.560 --> 00:07:20.390 align:middle line:84%
OK, let's think about building
this permutation by choosing

00:07:20.390 --> 00:07:21.460 align:middle line:90%
one at a time.

00:07:21.460 --> 00:07:26.330 align:middle line:84%
Which of these elements goes
into each one of these slots?

00:07:26.330 --> 00:07:28.740 align:middle line:84%
How many choices for the number
that goes into the

00:07:28.740 --> 00:07:31.160 align:middle line:90%
first slot or the elements?

00:07:31.160 --> 00:07:34.430 align:middle line:84%
Well, we can choose any one of
the available elements, so we

00:07:34.430 --> 00:07:35.680 align:middle line:90%
have n choices.

00:07:35.680 --> 00:07:38.650 align:middle line:90%


00:07:38.650 --> 00:07:42.220 align:middle line:84%
Let's say this element goes
here, having used up that

00:07:42.220 --> 00:07:45.730 align:middle line:84%
element, we're left with n minus
1 elements and we can

00:07:45.730 --> 00:07:49.530 align:middle line:84%
pick any one of these and bring
it into the second slot.

00:07:49.530 --> 00:07:52.340 align:middle line:84%
So here we have n choices, here
we're going to have n

00:07:52.340 --> 00:07:55.940 align:middle line:84%
minus 1 choices, then how
many we put there will

00:07:55.940 --> 00:07:58.060 align:middle line:90%
have n minus 2 choices.

00:07:58.060 --> 00:08:00.220 align:middle line:90%
And you go down until the end.

00:08:00.220 --> 00:08:02.160 align:middle line:84%
What happens at this point
when you are to

00:08:02.160 --> 00:08:03.880 align:middle line:90%
pick the last element?

00:08:03.880 --> 00:08:06.650 align:middle line:84%
Well, you've used n minus of
them, there's only one

00:08:06.650 --> 00:08:08.070 align:middle line:90%
left in your bag.

00:08:08.070 --> 00:08:09.520 align:middle line:90%
You're forced to use that one.

00:08:09.520 --> 00:08:13.920 align:middle line:84%
So the last stage, you're going
to have only one choice.

00:08:13.920 --> 00:08:18.050 align:middle line:84%
So, basically, the number of
possible permutations is the

00:08:18.050 --> 00:08:21.860 align:middle line:84%
product of all integers
from n down to one, or

00:08:21.860 --> 00:08:24.020 align:middle line:90%
from one up to n.

00:08:24.020 --> 00:08:26.550 align:middle line:84%
And there's a symbol that we
use for this number, it's

00:08:26.550 --> 00:08:29.210 align:middle line:90%
called n factorial.

00:08:29.210 --> 00:08:32.990 align:middle line:84%
So n factorial is the number of
permutations of n objects.

00:08:32.990 --> 00:08:37.320 align:middle line:84%
The number of ways that you can
order n objects that are

00:08:37.320 --> 00:08:39.100 align:middle line:90%
given to you.

00:08:39.100 --> 00:08:42.100 align:middle line:90%
Now, a different equation.

00:08:42.100 --> 00:08:44.310 align:middle line:90%
We have n elements.

00:08:44.310 --> 00:08:48.680 align:middle line:84%
Let's say the elements
are 1, 1,2, up to n.

00:08:48.680 --> 00:08:51.310 align:middle line:90%
And it's a set.

00:08:51.310 --> 00:08:54.490 align:middle line:84%
And we want to create
a subset.

00:08:54.490 --> 00:08:58.460 align:middle line:84%
How many possible subsets
are there?

00:08:58.460 --> 00:09:02.950 align:middle line:84%
So speaking of subsets means
looking at each one of the

00:09:02.950 --> 00:09:06.880 align:middle line:84%
elements and deciding whether
you're going to put it in to

00:09:06.880 --> 00:09:08.440 align:middle line:90%
subsets or not.

00:09:08.440 --> 00:09:13.240 align:middle line:84%
For example, I could choose
to put 1 in, but 2 I'm not

00:09:13.240 --> 00:09:17.100 align:middle line:84%
putting it in, 3 I'm not putting
it in, 4 I'm putting

00:09:17.100 --> 00:09:18.630 align:middle line:90%
it, and so on.

00:09:18.630 --> 00:09:21.200 align:middle line:84%
So that's how you
create a subset.

00:09:21.200 --> 00:09:23.660 align:middle line:84%
You look at each one of the
elements and you say, OK, I'm

00:09:23.660 --> 00:09:27.310 align:middle line:84%
going to put it in the subset,
or I'm not going to put it.

00:09:27.310 --> 00:09:30.900 align:middle line:84%
So think of these as consisting
of stages.

00:09:30.900 --> 00:09:33.240 align:middle line:84%
At each stage you look at
one element, and you

00:09:33.240 --> 00:09:35.090 align:middle line:90%
make a binary decision.

00:09:35.090 --> 00:09:38.410 align:middle line:84%
Do I put it in the
subset, or not?

00:09:38.410 --> 00:09:41.940 align:middle line:84%
So therefore, how many
subsets are there?

00:09:41.940 --> 00:09:45.060 align:middle line:84%
Well, I have two choices
for the first element.

00:09:45.060 --> 00:09:47.740 align:middle line:84%
Am I going to put in
the subset, or not?

00:09:47.740 --> 00:09:50.630 align:middle line:84%
I have two choices for the
next element, and so on.

00:09:50.630 --> 00:09:53.450 align:middle line:90%


00:09:53.450 --> 00:09:57.390 align:middle line:84%
For each one of the elements,
we have two choices.

00:09:57.390 --> 00:10:02.090 align:middle line:84%
So the overall number of choices
is 2 to the power n.

00:10:02.090 --> 00:10:03.710 align:middle line:90%
So, conclusion--

00:10:03.710 --> 00:10:10.150 align:middle line:84%
the number of subsets, often n
element set, is 2 to the n.

00:10:10.150 --> 00:10:15.050 align:middle line:90%


00:10:15.050 --> 00:10:20.430 align:middle line:84%
So in particular, if we take n
equal to 1, let's check that

00:10:20.430 --> 00:10:22.190 align:middle line:90%
our answer makes sense.

00:10:22.190 --> 00:10:26.420 align:middle line:84%
If we have n equal to one, how
many subsets does it have?

00:10:26.420 --> 00:10:29.675 align:middle line:84%
So we're dealing with
a set of just one.

00:10:29.675 --> 00:10:30.925 align:middle line:90%
What are the subsets?

00:10:30.925 --> 00:10:33.830 align:middle line:90%


00:10:33.830 --> 00:10:37.290 align:middle line:90%
One subset is this one.

00:10:37.290 --> 00:10:41.530 align:middle line:84%
Do we have other subsets
of the one element set?

00:10:41.530 --> 00:10:43.920 align:middle line:90%
Yes, we have the empty set.

00:10:43.920 --> 00:10:44.870 align:middle line:90%
That's the second one.

00:10:44.870 --> 00:10:48.860 align:middle line:84%
These are the two possible
subsets of

00:10:48.860 --> 00:10:50.850 align:middle line:90%
this particular set.

00:10:50.850 --> 00:10:56.790 align:middle line:84%
So 2 subsets when n is equal to
1, that checks the answer.

00:10:56.790 --> 00:10:58.040 align:middle line:90%
All right.

00:10:58.040 --> 00:11:00.290 align:middle line:90%


00:11:00.290 --> 00:11:07.590 align:middle line:84%
OK, so having gone so far, we
can do our first example now.

00:11:07.590 --> 00:11:12.990 align:middle line:84%
So we are given a die
and we're going

00:11:12.990 --> 00:11:16.620 align:middle line:90%
to roll it 6 times.

00:11:16.620 --> 00:11:20.030 align:middle line:84%
OK, let's make some assumptions
about the rolls.

00:11:20.030 --> 00:11:29.560 align:middle line:84%
Let's assume that the rolls are
independent, and that the

00:11:29.560 --> 00:11:30.985 align:middle line:90%
die is also fair.

00:11:30.985 --> 00:11:34.180 align:middle line:90%


00:11:34.180 --> 00:11:38.110 align:middle line:84%
So this means that the
probability of any particular

00:11:38.110 --> 00:11:40.350 align:middle line:90%
outcome of the die rolls--

00:11:40.350 --> 00:11:43.960 align:middle line:84%
for example, so we have 6 rolls,
one particular outcome

00:11:43.960 --> 00:11:48.760 align:middle line:90%
could be 3,3,1,6,5.

00:11:48.760 --> 00:11:51.220 align:middle line:84%
So that's one possible
outcome.

00:11:51.220 --> 00:11:54.060 align:middle line:84%
What's the probability
of this outcome?

00:11:54.060 --> 00:11:57.470 align:middle line:84%
There's probability 1/6 that
this happens, 1/6 that this

00:11:57.470 --> 00:12:00.530 align:middle line:84%
happens, 1/6 that this
happens, and so on.

00:12:00.530 --> 00:12:04.250 align:middle line:84%
So the probability that
the outcome is this

00:12:04.250 --> 00:12:07.540 align:middle line:90%
is 1/6 to the sixth.

00:12:07.540 --> 00:12:10.970 align:middle line:90%


00:12:10.970 --> 00:12:13.690 align:middle line:84%
What did I use to come
up with this answer?

00:12:13.690 --> 00:12:17.550 align:middle line:84%
I used independence, so I
multiplied the probability of

00:12:17.550 --> 00:12:20.360 align:middle line:84%
the first roll gives me a 2,
times the probability that the

00:12:20.360 --> 00:12:22.990 align:middle line:84%
second roll gives me
a 3, and so on.

00:12:22.990 --> 00:12:26.790 align:middle line:84%
And then I used the assumption
that the die is fair, so that

00:12:26.790 --> 00:12:30.300 align:middle line:84%
the probability of 2 is
1/6, the probably of 3

00:12:30.300 --> 00:12:32.240 align:middle line:90%
is 1/6, and so on.

00:12:32.240 --> 00:12:34.810 align:middle line:84%
So if I were to spell it out,
it's the probability that we

00:12:34.810 --> 00:12:37.740 align:middle line:84%
get the 2 in the first roll,
times the probability of 3 in

00:12:37.740 --> 00:12:40.850 align:middle line:84%
the second roll, times the
probability of the

00:12:40.850 --> 00:12:42.800 align:middle line:90%
5 in the last roll.

00:12:42.800 --> 00:12:46.455 align:middle line:84%
So by independence, I can
multiply probabilities.

00:12:46.455 --> 00:12:49.530 align:middle line:84%
And because the die is fair,
each one of these numbers is

00:12:49.530 --> 00:12:53.910 align:middle line:90%
1/6 to the sixth.

00:12:53.910 --> 00:12:58.170 align:middle line:84%
And so the same calculation
would apply no matter what

00:12:58.170 --> 00:13:00.610 align:middle line:90%
numbers I would put in here.

00:13:00.610 --> 00:13:03.920 align:middle line:84%
So all possible outcomes
are equally likely.

00:13:03.920 --> 00:13:06.630 align:middle line:90%


00:13:06.630 --> 00:13:08.400 align:middle line:90%
Let's start with this.

00:13:08.400 --> 00:13:12.650 align:middle line:84%
So since all possible outcomes
are equally likely to find an

00:13:12.650 --> 00:13:15.870 align:middle line:84%
answer to a probability
question, if we're dealing

00:13:15.870 --> 00:13:21.430 align:middle line:84%
with some particular event, so
the event is that all rolls

00:13:21.430 --> 00:13:22.900 align:middle line:90%
give different numbers.

00:13:22.900 --> 00:13:31.160 align:middle line:84%
That's our event A. And our
sample space is some set

00:13:31.160 --> 00:13:32.790 align:middle line:90%
capital omega.

00:13:32.790 --> 00:13:35.890 align:middle line:84%
We know that the answer is going
to be the cardinality of

00:13:35.890 --> 00:13:40.200 align:middle line:84%
the set A, divided by the
cardinality of the set omega.

00:13:40.200 --> 00:13:42.830 align:middle line:84%
So let's deal with the
easy one first.

00:13:42.830 --> 00:13:45.960 align:middle line:84%
How many elements are there
in the sample space?

00:13:45.960 --> 00:13:48.880 align:middle line:84%
How many possible outcomes
are there when you

00:13:48.880 --> 00:13:51.570 align:middle line:90%
roll a dice 6 times?

00:13:51.570 --> 00:13:54.600 align:middle line:84%
You have 6 choices for
the first roll.

00:13:54.600 --> 00:13:57.840 align:middle line:84%
You have 6 choices for the
second roll and so on.

00:13:57.840 --> 00:14:00.330 align:middle line:84%
So the overall number
of outcomes is going

00:14:00.330 --> 00:14:03.950 align:middle line:90%
to be 6 to the sixth.

00:14:03.950 --> 00:14:08.200 align:middle line:84%
So number of elements in
the sample space is 6

00:14:08.200 --> 00:14:10.470 align:middle line:90%
to the sixth power.

00:14:10.470 --> 00:14:14.820 align:middle line:84%
And I guess this checks
with this.

00:14:14.820 --> 00:14:18.480 align:middle line:84%
We have 6 to the sixth outcomes,
each one has this

00:14:18.480 --> 00:14:20.570 align:middle line:84%
much probability,
so the overall

00:14:20.570 --> 00:14:23.230 align:middle line:90%
probability is equal to one.

00:14:23.230 --> 00:14:24.460 align:middle line:90%
Right?

00:14:24.460 --> 00:14:28.690 align:middle line:84%
So the probability of an
individual outcome is one over

00:14:28.690 --> 00:14:32.400 align:middle line:84%
how many possible outcomes
we have, which is this.

00:14:32.400 --> 00:14:33.810 align:middle line:90%
All right.

00:14:33.810 --> 00:14:36.620 align:middle line:90%
So how about the numerator?

00:14:36.620 --> 00:14:42.430 align:middle line:84%
We are interested in outcomes
in which the numbers that we

00:14:42.430 --> 00:14:44.585 align:middle line:90%
get are all different.

00:14:44.585 --> 00:14:48.770 align:middle line:90%


00:14:48.770 --> 00:14:54.080 align:middle line:84%
So what is an outcome in which
the numbers are all different?

00:14:54.080 --> 00:14:56.310 align:middle line:90%
So the die has 6 faces.

00:14:56.310 --> 00:14:58.200 align:middle line:90%
We roll it 6 times.

00:14:58.200 --> 00:15:00.340 align:middle line:84%
We're going to get 6
different numbers.

00:15:00.340 --> 00:15:03.780 align:middle line:84%
This means that we're going to
exhaust all the possible

00:15:03.780 --> 00:15:07.640 align:middle line:84%
numbers, but they can appear
in any possible sequence.

00:15:07.640 --> 00:15:13.190 align:middle line:84%
So an outcome that makes this
event happen is a list of the

00:15:13.190 --> 00:15:16.250 align:middle line:84%
numbers from 1 to 6,
but arranged in

00:15:16.250 --> 00:15:18.160 align:middle line:90%
some arbitrary order.

00:15:18.160 --> 00:15:23.200 align:middle line:84%
So the possible outcomes that
make event A happen are just

00:15:23.200 --> 00:15:25.990 align:middle line:84%
the permutations of the
numbers from 1 to 6.

00:15:25.990 --> 00:15:31.070 align:middle line:90%


00:15:31.070 --> 00:15:33.900 align:middle line:84%
One possible outcome that makes
our events to happen--

00:15:33.900 --> 00:15:35.440 align:middle line:90%
it would be this.

00:15:35.440 --> 00:15:39.000 align:middle line:90%


00:15:39.000 --> 00:15:42.050 align:middle line:84%
Here we have 6 possible numbers,
but any other list of

00:15:42.050 --> 00:15:44.070 align:middle line:84%
this kind in which none
of the numbers is

00:15:44.070 --> 00:15:46.650 align:middle line:90%
repeated would also do.

00:15:46.650 --> 00:15:51.660 align:middle line:84%
So number of outcomes that make
the event happen is the

00:15:51.660 --> 00:15:53.980 align:middle line:84%
number of permutations
of 6 elements.

00:15:53.980 --> 00:15:56.060 align:middle line:90%
So it's 6 factorial.

00:15:56.060 --> 00:15:59.340 align:middle line:84%
And so the final answer is
going to be 6 factorial

00:15:59.340 --> 00:16:02.830 align:middle line:90%
divided by 6 to the sixth.

00:16:02.830 --> 00:16:06.580 align:middle line:84%
All right, so that's a typical
way that's one solves problems

00:16:06.580 --> 00:16:07.800 align:middle line:90%
of this kind.

00:16:07.800 --> 00:16:10.660 align:middle line:84%
We know how to count
certain things.

00:16:10.660 --> 00:16:14.260 align:middle line:84%
For example, here we knew how to
count permutations, and we

00:16:14.260 --> 00:16:16.830 align:middle line:84%
used our knowledge to count the
elements of the set that

00:16:16.830 --> 00:16:18.080 align:middle line:90%
we need to deal with.

00:16:18.080 --> 00:16:24.380 align:middle line:90%


00:16:24.380 --> 00:16:30.970 align:middle line:84%
So now let's get to a slightly
more difficult problem.

00:16:30.970 --> 00:16:37.390 align:middle line:84%
We're given once more a
set with n elements.

00:16:37.390 --> 00:16:40.620 align:middle line:90%


00:16:40.620 --> 00:16:46.000 align:middle line:84%
We already know how many subsets
that set has, but now

00:16:46.000 --> 00:16:50.940 align:middle line:84%
we would be interested in
subsets that have exactly k

00:16:50.940 --> 00:16:54.480 align:middle line:90%
elements in them.

00:16:54.480 --> 00:17:05.819 align:middle line:84%
So we start with our big set
that has n elements, and we

00:17:05.819 --> 00:17:11.890 align:middle line:84%
want to construct a subset
that has k elements.

00:17:11.890 --> 00:17:14.200 align:middle line:84%
Out of those n I'm
going to choose k

00:17:14.200 --> 00:17:16.079 align:middle line:90%
and put them in there.

00:17:16.079 --> 00:17:18.180 align:middle line:84%
In how many ways
can I do this?

00:17:18.180 --> 00:17:20.710 align:middle line:84%
More concrete way of thinking
about this problem--

00:17:20.710 --> 00:17:24.960 align:middle line:84%
you have n people in some group
and you want to form a

00:17:24.960 --> 00:17:28.270 align:middle line:84%
committee by picking people from
that group, and you want

00:17:28.270 --> 00:17:31.020 align:middle line:84%
to form a committee
with k people.

00:17:31.020 --> 00:17:32.460 align:middle line:90%
Where k is a given number.

00:17:32.460 --> 00:17:34.670 align:middle line:84%
For example, a 5 person
committee.

00:17:34.670 --> 00:17:37.510 align:middle line:84%
How many 5 person committees
are possible if you're

00:17:37.510 --> 00:17:39.450 align:middle line:90%
starting with 100 people?

00:17:39.450 --> 00:17:40.960 align:middle line:84%
So that's what we
want to count.

00:17:40.960 --> 00:17:44.210 align:middle line:84%
How many k element subsets
are there?

00:17:44.210 --> 00:17:48.030 align:middle line:84%
We don't yet know the answer,
but let's give a name to it.

00:17:48.030 --> 00:17:52.210 align:middle line:84%
And the name is going to be this
particular symbol, which

00:17:52.210 --> 00:17:55.220 align:middle line:90%
we read as n choose k.

00:17:55.220 --> 00:18:00.130 align:middle line:84%
Out of n elements, we want
to choose k of them.

00:18:00.130 --> 00:18:02.000 align:middle line:90%
OK.

00:18:02.000 --> 00:18:04.810 align:middle line:90%
That may be a little tricky.

00:18:04.810 --> 00:18:10.170 align:middle line:84%
So what we're going to do is
to instead figure out a

00:18:10.170 --> 00:18:15.590 align:middle line:84%
somewhat easier problem,
which is going to be--

00:18:15.590 --> 00:18:20.840 align:middle line:84%
in how many ways can I pick k
out of these people and puts

00:18:20.840 --> 00:18:25.450 align:middle line:90%
them in a particular order?

00:18:25.450 --> 00:18:30.430 align:middle line:84%
So how many possible ordered
lists can I make that consist

00:18:30.430 --> 00:18:31.840 align:middle line:90%
of k people?

00:18:31.840 --> 00:18:35.240 align:middle line:84%
By ordered, I mean that we take
those k people and we say

00:18:35.240 --> 00:18:38.010 align:middle line:84%
this is the first person
in the community.

00:18:38.010 --> 00:18:39.600 align:middle line:84%
That's the second person
in the committee.

00:18:39.600 --> 00:18:42.070 align:middle line:84%
That's the third person in
the committee and so on.

00:18:42.070 --> 00:18:46.100 align:middle line:84%
So in how many ways
can we do this?

00:18:46.100 --> 00:18:50.840 align:middle line:84%
Out of these n, we want to
choose just k of them and put

00:18:50.840 --> 00:18:52.010 align:middle line:90%
them in slots.

00:18:52.010 --> 00:18:53.970 align:middle line:90%
One after the other.

00:18:53.970 --> 00:18:57.480 align:middle line:84%
So this is pretty much like the
license plate problem we

00:18:57.480 --> 00:19:00.680 align:middle line:90%
solved just a little earlier.

00:19:00.680 --> 00:19:06.390 align:middle line:84%
So we have n choices for who
we put as the top person in

00:19:06.390 --> 00:19:07.350 align:middle line:90%
the community.

00:19:07.350 --> 00:19:11.490 align:middle line:84%
We can pick anyone and have
them be the first person.

00:19:11.490 --> 00:19:13.000 align:middle line:84%
Then I'm going to choose
the second

00:19:13.000 --> 00:19:14.640 align:middle line:90%
person in the committee.

00:19:14.640 --> 00:19:16.700 align:middle line:90%
I've used up 1 person.

00:19:16.700 --> 00:19:21.530 align:middle line:84%
So I'm going to have n
minus 1 choices here.

00:19:21.530 --> 00:19:25.840 align:middle line:84%
And now, at this stage I've used
up 2 people, so I have n

00:19:25.840 --> 00:19:28.640 align:middle line:90%
minus 2 choices here.

00:19:28.640 --> 00:19:31.240 align:middle line:90%
And this keeps going on.

00:19:31.240 --> 00:19:34.110 align:middle line:84%
Well, what is going to
be the last number?

00:19:34.110 --> 00:19:36.310 align:middle line:90%
Is it's n minus k?

00:19:36.310 --> 00:19:39.980 align:middle line:90%
Well, not really.

00:19:39.980 --> 00:19:44.090 align:middle line:84%
I'm starting subtracting numbers
after the second one,

00:19:44.090 --> 00:19:48.250 align:middle line:84%
so by the end I will have
subtracted k minus 1.

00:19:48.250 --> 00:19:54.800 align:middle line:84%
So that's how many choices I
will have for the last person.

00:19:54.800 --> 00:19:58.270 align:middle line:84%
So this is the number
of ways--

00:19:58.270 --> 00:20:02.390 align:middle line:84%
the product of these numbers
there gives me the number of

00:20:02.390 --> 00:20:08.420 align:middle line:84%
ways that I can create ordered
lists consisting of k people

00:20:08.420 --> 00:20:11.700 align:middle line:84%
out of the n that
we started with.

00:20:11.700 --> 00:20:15.120 align:middle line:84%
Now, you can do a little bit of
algebra and check that this

00:20:15.120 --> 00:20:17.910 align:middle line:84%
expression here is the same
as that expression.

00:20:17.910 --> 00:20:19.200 align:middle line:90%
Why is this?

00:20:19.200 --> 00:20:22.520 align:middle line:84%
This factorial has all the
products from 1 up to n.

00:20:22.520 --> 00:20:25.140 align:middle line:84%
This factorial has all
the products from 1

00:20:25.140 --> 00:20:26.710 align:middle line:90%
up to n minus k.

00:20:26.710 --> 00:20:28.240 align:middle line:90%
So you get cancellations.

00:20:28.240 --> 00:20:31.860 align:middle line:84%
And what's left is all the
products starting from the

00:20:31.860 --> 00:20:37.610 align:middle line:84%
next number after here, which
is this particular number.

00:20:37.610 --> 00:20:42.350 align:middle line:84%
So the number of possible ways
of creating such ordered lists

00:20:42.350 --> 00:20:46.330 align:middle line:84%
is n factorial divided by
n minus k factorial.

00:20:46.330 --> 00:20:49.480 align:middle line:90%


00:20:49.480 --> 00:20:53.180 align:middle line:84%
Now, a different way that I
could make an ordered list--

00:20:53.180 --> 00:20:57.950 align:middle line:84%
instead of picking the people
one at a time, I could first

00:20:57.950 --> 00:21:01.700 align:middle line:84%
choose my k people who are going
to be in the committee,

00:21:01.700 --> 00:21:04.080 align:middle line:90%
and then put them in order.

00:21:04.080 --> 00:21:07.680 align:middle line:84%
And tell them out of these k,
you are the first, you are the

00:21:07.680 --> 00:21:10.010 align:middle line:90%
second, you are the third.

00:21:10.010 --> 00:21:12.590 align:middle line:84%
Starting with this k
people, in how many

00:21:12.590 --> 00:21:15.580 align:middle line:90%
ways can I order them?

00:21:15.580 --> 00:21:18.150 align:middle line:84%
That's the number
of permutations.

00:21:18.150 --> 00:21:20.820 align:middle line:90%


00:21:20.820 --> 00:21:25.180 align:middle line:84%
Starting with a set with k
objects, in how many ways can

00:21:25.180 --> 00:21:28.340 align:middle line:84%
I put them in a specific
order?

00:21:28.340 --> 00:21:31.140 align:middle line:84%
How many specific orders
are there?

00:21:31.140 --> 00:21:32.390 align:middle line:90%
That's basically the question.

00:21:32.390 --> 00:21:34.600 align:middle line:84%
In how many ways can
I permute these k

00:21:34.600 --> 00:21:36.290 align:middle line:90%
people and arrange them.

00:21:36.290 --> 00:21:38.450 align:middle line:84%
So the number of ways
that you can do

00:21:38.450 --> 00:21:42.660 align:middle line:90%
this step is k factorial.

00:21:42.660 --> 00:21:48.330 align:middle line:84%
So in how many ways can I
start with a set with n

00:21:48.330 --> 00:21:52.020 align:middle line:84%
elements, go through this
process, and end up with a

00:21:52.020 --> 00:21:55.560 align:middle line:90%
sorted list with k elements?

00:21:55.560 --> 00:21:57.620 align:middle line:90%
By the rule that--

00:21:57.620 --> 00:22:02.160 align:middle line:84%
when we have stages, the total
number of stages is how many

00:22:02.160 --> 00:22:05.370 align:middle line:84%
choices we had in the first
stage, times how many choices

00:22:05.370 --> 00:22:08.510 align:middle line:90%
we had in the second stage.

00:22:08.510 --> 00:22:12.670 align:middle line:84%
The number of ways that this
process can happen is this

00:22:12.670 --> 00:22:14.890 align:middle line:90%
times that.

00:22:14.890 --> 00:22:18.340 align:middle line:84%
This is a different way that
that process could happen.

00:22:18.340 --> 00:22:22.640 align:middle line:84%
And the number of possible
of ways is this number.

00:22:22.640 --> 00:22:27.600 align:middle line:84%
No matter which way we carry out
that process, in the end

00:22:27.600 --> 00:22:34.610 align:middle line:84%
we have the possible ways of
arranging k people out of the

00:22:34.610 --> 00:22:36.770 align:middle line:90%
n that we started with.

00:22:36.770 --> 00:22:40.730 align:middle line:84%
So the final answer that we get
when we count should be

00:22:40.730 --> 00:22:44.220 align:middle line:84%
either this, or this
times that.

00:22:44.220 --> 00:22:47.620 align:middle line:84%
Both are equally valid ways of
counting, so both should give

00:22:47.620 --> 00:22:49.050 align:middle line:90%
us the same answer.

00:22:49.050 --> 00:22:52.950 align:middle line:90%
So we get this equality here.

00:22:52.950 --> 00:22:56.370 align:middle line:84%
So these two expressions
corresponds to two different

00:22:56.370 --> 00:23:01.660 align:middle line:84%
ways of constructing ordered
lists of k people starting

00:23:01.660 --> 00:23:05.580 align:middle line:90%
with n people initially.

00:23:05.580 --> 00:23:09.120 align:middle line:84%
And now that we have this
relation, we can send the k

00:23:09.120 --> 00:23:11.540 align:middle line:90%
factorial to the denominator.

00:23:11.540 --> 00:23:13.940 align:middle line:84%
And that tells us what
that number, n choose

00:23:13.940 --> 00:23:16.250 align:middle line:90%
k, is going to be.

00:23:16.250 --> 00:23:20.060 align:middle line:84%
So this formula-- it's written
here in red, because you're

00:23:20.060 --> 00:23:22.150 align:middle line:84%
going to see it a zillion
times until

00:23:22.150 --> 00:23:23.740 align:middle line:90%
the end of the semester--

00:23:23.740 --> 00:23:25.950 align:middle line:84%
they are called the binomial
coefficients.

00:23:25.950 --> 00:23:31.170 align:middle line:90%


00:23:31.170 --> 00:23:34.600 align:middle line:84%
And they tell us the number of
possible ways that we can

00:23:34.600 --> 00:23:38.380 align:middle line:84%
create a k element subset,
starting with a

00:23:38.380 --> 00:23:41.270 align:middle line:90%
set that has n elements.

00:23:41.270 --> 00:23:44.430 align:middle line:84%
It's always good to do a sanity
check to formulas by

00:23:44.430 --> 00:23:46.710 align:middle line:90%
considering extreme cases.

00:23:46.710 --> 00:23:52.810 align:middle line:84%
So let's take the case where
k is equal to n.

00:23:52.810 --> 00:23:56.820 align:middle line:90%


00:23:56.820 --> 00:23:59.420 align:middle line:84%
What's the right answer
in this case?

00:23:59.420 --> 00:24:02.905 align:middle line:84%
How many n elements subsets
are there out

00:24:02.905 --> 00:24:04.950 align:middle line:90%
of an element set?

00:24:04.950 --> 00:24:07.580 align:middle line:84%
Well, your subset needs
to include every one.

00:24:07.580 --> 00:24:09.400 align:middle line:90%
You don't have any choices.

00:24:09.400 --> 00:24:10.750 align:middle line:90%
There's only one choice.

00:24:10.750 --> 00:24:12.600 align:middle line:90%
It's the set itself.

00:24:12.600 --> 00:24:15.700 align:middle line:84%
So the answer should
be equal to 1.

00:24:15.700 --> 00:24:19.980 align:middle line:84%
That's the number of n element
subsets, starting with a set

00:24:19.980 --> 00:24:21.340 align:middle line:90%
with n elements.

00:24:21.340 --> 00:24:25.250 align:middle line:84%
Let's see if the formula gives
us the right answer.

00:24:25.250 --> 00:24:31.750 align:middle line:84%
We have n factorial divided by
k, which is n in our case--

00:24:31.750 --> 00:24:32.630 align:middle line:90%
n factorial.

00:24:32.630 --> 00:24:36.700 align:middle line:84%
And then n minus k
is 0 factorial.

00:24:36.700 --> 00:24:42.070 align:middle line:84%
So if our formula is correct, we
should have this equality.

00:24:42.070 --> 00:24:45.620 align:middle line:84%
And what's the way to
make that correct?

00:24:45.620 --> 00:24:47.880 align:middle line:84%
Well, it depends what kind
of meaning do we

00:24:47.880 --> 00:24:49.420 align:middle line:90%
give to this symbol?

00:24:49.420 --> 00:24:53.510 align:middle line:84%
How do we define
zero factorial?

00:24:53.510 --> 00:24:55.750 align:middle line:84%
I guess in some ways
it's arbitrary.

00:24:55.750 --> 00:24:58.110 align:middle line:84%
We're going to define it
in a way that makes

00:24:58.110 --> 00:24:59.640 align:middle line:90%
this formula right.

00:24:59.640 --> 00:25:03.870 align:middle line:84%
So the definition that we will
be using is that whenever you

00:25:03.870 --> 00:25:08.700 align:middle line:84%
have 0 factorial, it's going
to stand for the number 1.

00:25:08.700 --> 00:25:12.030 align:middle line:84%
So let's check that this is
also correct, at the other

00:25:12.030 --> 00:25:13.380 align:middle line:90%
extreme case.

00:25:13.380 --> 00:25:17.670 align:middle line:84%
If we let k equal to 0, what
does the formula give us?

00:25:17.670 --> 00:25:20.710 align:middle line:84%
It gives us, again, n factorial
divided by 0

00:25:20.710 --> 00:25:23.090 align:middle line:90%
factorial times n factorial.

00:25:23.090 --> 00:25:27.560 align:middle line:84%
According to our convention,
this again is equal to 1.

00:25:27.560 --> 00:25:33.680 align:middle line:84%
So there is one subset of our
set that we started with that

00:25:33.680 --> 00:25:35.260 align:middle line:90%
has zero elements.

00:25:35.260 --> 00:25:37.450 align:middle line:90%
Which subset is it?

00:25:37.450 --> 00:25:39.980 align:middle line:90%
It's the empty set.

00:25:39.980 --> 00:25:45.190 align:middle line:84%
So the empty set is the single
subset of the set that we

00:25:45.190 --> 00:25:49.360 align:middle line:84%
started with that happens to
have exactly zero elements.

00:25:49.360 --> 00:25:52.510 align:middle line:84%
So the formula checks in this
extreme case as well.

00:25:52.510 --> 00:25:55.820 align:middle line:90%
So we're comfortable using it.

00:25:55.820 --> 00:26:01.180 align:middle line:84%
Now these factorials and these
coefficients are really messy

00:26:01.180 --> 00:26:03.050 align:middle line:90%
algebraic objects.

00:26:03.050 --> 00:26:07.740 align:middle line:84%
There's lots of beautiful
identities that they satisfy,

00:26:07.740 --> 00:26:10.350 align:middle line:84%
which you can prove
algebraically sometimes by

00:26:10.350 --> 00:26:13.930 align:middle line:84%
using induction and having
cancellations happen

00:26:13.930 --> 00:26:15.310 align:middle line:90%
all over the place.

00:26:15.310 --> 00:26:17.780 align:middle line:90%
But it's really messy.

00:26:17.780 --> 00:26:22.540 align:middle line:84%
Sometimes you can bypass those
calculations by being clever

00:26:22.540 --> 00:26:24.630 align:middle line:84%
and using your understanding
of what these

00:26:24.630 --> 00:26:26.620 align:middle line:90%
coefficients stand for.

00:26:26.620 --> 00:26:31.490 align:middle line:90%
So here's a typical example.

00:26:31.490 --> 00:26:35.450 align:middle line:84%
What is the sum of those
binomial coefficients?

00:26:35.450 --> 00:26:40.130 align:middle line:84%
I fix n, and sum over
all possible cases.

00:26:40.130 --> 00:26:44.110 align:middle line:84%
So if you're an algebra genius,
you're going to take

00:26:44.110 --> 00:26:49.830 align:middle line:84%
this expression here, plug it in
here, and then start doing

00:26:49.830 --> 00:26:51.460 align:middle line:90%
algebra furiously.

00:26:51.460 --> 00:26:54.970 align:middle line:84%
And half an hour later, you
may get the right answer.

00:26:54.970 --> 00:26:56.425 align:middle line:84%
But now let's try
to be clever.

00:26:56.425 --> 00:26:59.470 align:middle line:90%


00:26:59.470 --> 00:27:01.380 align:middle line:90%
What does this really do?

00:27:01.380 --> 00:27:04.200 align:middle line:90%
What does that formula count?

00:27:04.200 --> 00:27:07.280 align:middle line:84%
We're considering k
element subsets.

00:27:07.280 --> 00:27:09.040 align:middle line:90%
That's this number.

00:27:09.040 --> 00:27:12.360 align:middle line:84%
And we're considering the number
of k element subsets

00:27:12.360 --> 00:27:14.840 align:middle line:90%
for different choices of k.

00:27:14.840 --> 00:27:18.890 align:middle line:84%
The first term in this sum
counts how many 0-element

00:27:18.890 --> 00:27:20.450 align:middle line:90%
subsets we have.

00:27:20.450 --> 00:27:23.680 align:middle line:84%
The next term in this sum counts
how many 1-element

00:27:23.680 --> 00:27:24.660 align:middle line:90%
subsets we have.

00:27:24.660 --> 00:27:30.010 align:middle line:84%
The next term counts how many
2-element subsets we have.

00:27:30.010 --> 00:27:33.130 align:middle line:84%
So in the end, what
have we counted?

00:27:33.130 --> 00:27:36.660 align:middle line:84%
We've counted the total
number of subsets.

00:27:36.660 --> 00:27:38.430 align:middle line:84%
We've considered all possible
cardinalities.

00:27:38.430 --> 00:27:43.420 align:middle line:90%


00:27:43.420 --> 00:27:46.850 align:middle line:84%
We've counted the number
of subsets of size k.

00:27:46.850 --> 00:27:49.740 align:middle line:84%
We've considered all
possible sizes k.

00:27:49.740 --> 00:27:52.230 align:middle line:84%
The overall count is
going to be the

00:27:52.230 --> 00:27:54.356 align:middle line:90%
total number of subsets.

00:27:54.356 --> 00:27:57.880 align:middle line:90%


00:27:57.880 --> 00:28:00.800 align:middle line:90%
And we know what this is.

00:28:00.800 --> 00:28:03.740 align:middle line:84%
A couple of slides ago, we
discussed that this number is

00:28:03.740 --> 00:28:05.480 align:middle line:90%
equal to 2 to the n.

00:28:05.480 --> 00:28:11.550 align:middle line:84%
So, nice, clean and simple
answer, which is easy to guess

00:28:11.550 --> 00:28:15.110 align:middle line:84%
once you give an interpretation
to the

00:28:15.110 --> 00:28:17.580 align:middle line:84%
algebraic expression that you
have in front of you.

00:28:17.580 --> 00:28:21.610 align:middle line:90%


00:28:21.610 --> 00:28:22.280 align:middle line:90%
All right.

00:28:22.280 --> 00:28:27.410 align:middle line:84%
So let's move again to sort of
an example in which those

00:28:27.410 --> 00:28:31.960 align:middle line:84%
binomial coefficients are
going to show up.

00:28:31.960 --> 00:28:34.700 align:middle line:90%
So here's the setting--

00:28:34.700 --> 00:28:40.900 align:middle line:84%
n independent coin tosses,
and each coin toss has a

00:28:40.900 --> 00:28:45.770 align:middle line:84%
probability, P, of resulting
in heads.

00:28:45.770 --> 00:28:48.320 align:middle line:84%
So this is our probabilistic
experiment.

00:28:48.320 --> 00:28:51.200 align:middle line:90%
Suppose we do 6 tosses.

00:28:51.200 --> 00:28:53.980 align:middle line:84%
What's the probability that we
get this particular sequence

00:28:53.980 --> 00:28:56.320 align:middle line:90%
of outcomes?

00:28:56.320 --> 00:28:59.800 align:middle line:84%
Because of independence, we
can multiply probability.

00:28:59.800 --> 00:29:02.400 align:middle line:84%
So it's going to be the
probability that the first

00:29:02.400 --> 00:29:05.570 align:middle line:84%
toss results in heads, times
the probability that the

00:29:05.570 --> 00:29:08.770 align:middle line:84%
second toss results in tails,
times the probability that the

00:29:08.770 --> 00:29:12.050 align:middle line:84%
third one results in tails,
times probability of heads,

00:29:12.050 --> 00:29:14.610 align:middle line:84%
times probability of heads,
times probability of heads,

00:29:14.610 --> 00:29:20.930 align:middle line:84%
which is just P to the fourth
times (1 minus P) squared.

00:29:20.930 --> 00:29:24.360 align:middle line:84%
So that's the probability of
this particular sequence.

00:29:24.360 --> 00:29:26.980 align:middle line:84%
How about a different
sequence?

00:29:26.980 --> 00:29:32.830 align:middle line:84%
If I had 4 tails and 2 heads,
but in a different order--

00:29:32.830 --> 00:29:39.130 align:middle line:90%


00:29:39.130 --> 00:29:42.870 align:middle line:84%
let's say if we considered
this particular outcome--

00:29:42.870 --> 00:29:45.480 align:middle line:90%
would the answer be different?

00:29:45.480 --> 00:29:49.020 align:middle line:84%
We would still have P, times P,
times P, times P, times (1

00:29:49.020 --> 00:29:51.070 align:middle line:90%
minus P), times (1 minus P).

00:29:51.070 --> 00:29:54.670 align:middle line:84%
We would get again,
the same answer.

00:29:54.670 --> 00:29:59.510 align:middle line:84%
So what you observe from just
this example is that, more

00:29:59.510 --> 00:30:03.240 align:middle line:84%
generally, the probability
of obtaining a particular

00:30:03.240 --> 00:30:08.930 align:middle line:84%
sequence of heads and tails is
P to a power, equal to the

00:30:08.930 --> 00:30:10.300 align:middle line:90%
number of heads.

00:30:10.300 --> 00:30:12.240 align:middle line:90%
So here we had 4 heads.

00:30:12.240 --> 00:30:15.100 align:middle line:84%
So there's P to the
fourth showing up.

00:30:15.100 --> 00:30:21.116 align:middle line:84%
And then (1 minus P) to the
power number of tails.

00:30:21.116 --> 00:30:26.970 align:middle line:90%
So every k head sequence--

00:30:26.970 --> 00:30:32.310 align:middle line:84%
every outcome in which we have
exactly k heads, has the same

00:30:32.310 --> 00:30:37.180 align:middle line:84%
probability, which is going to
be P to the k, (1 minus p), to

00:30:37.180 --> 00:30:38.930 align:middle line:90%
the (n minus k).

00:30:38.930 --> 00:30:43.310 align:middle line:84%
This is the probability of any
particular sequence that has

00:30:43.310 --> 00:30:44.980 align:middle line:90%
exactly k heads.

00:30:44.980 --> 00:30:46.980 align:middle line:84%
So that's the probability
of a particular

00:30:46.980 --> 00:30:48.920 align:middle line:90%
sequence with k heads.

00:30:48.920 --> 00:30:53.160 align:middle line:84%
So now let's ask the question,
what is the probability that

00:30:53.160 --> 00:30:57.980 align:middle line:84%
my experiment results in exactly
k heads, but in some

00:30:57.980 --> 00:30:59.930 align:middle line:90%
arbitrary order?

00:30:59.930 --> 00:31:02.500 align:middle line:84%
So the heads could
show up anywhere.

00:31:02.500 --> 00:31:04.080 align:middle line:84%
So there's a number
of different ways

00:31:04.080 --> 00:31:05.370 align:middle line:90%
that this can happen.

00:31:05.370 --> 00:31:11.220 align:middle line:84%
What's the overall probability
that this event takes place?

00:31:11.220 --> 00:31:15.560 align:middle line:84%
So the probability of an event
taking place is the sum of the

00:31:15.560 --> 00:31:19.390 align:middle line:84%
probabilities of all the
individual ways that

00:31:19.390 --> 00:31:22.020 align:middle line:90%
the event can occur.

00:31:22.020 --> 00:31:24.410 align:middle line:84%
So it's the sum of the
probabilities of all the

00:31:24.410 --> 00:31:27.650 align:middle line:84%
outcomes that make
the event happen.

00:31:27.650 --> 00:31:31.420 align:middle line:84%
The different ways that we can
obtain k heads are the number

00:31:31.420 --> 00:31:37.940 align:middle line:84%
of different sequences that
contain exactly k heads.

00:31:37.940 --> 00:31:44.430 align:middle line:84%
We just figured out that any
sequence with exactly k heads

00:31:44.430 --> 00:31:47.110 align:middle line:90%
has this probability.

00:31:47.110 --> 00:31:51.110 align:middle line:84%
So to do this summation, we just
need to take the common

00:31:51.110 --> 00:31:56.030 align:middle line:84%
probability of each individual
k head sequence, times how

00:31:56.030 --> 00:31:58.140 align:middle line:84%
many terms we have
in this sum.

00:31:58.140 --> 00:32:01.320 align:middle line:90%


00:32:01.320 --> 00:32:07.020 align:middle line:84%
So what we're left to do now
is to figure out how many k

00:32:07.020 --> 00:32:09.990 align:middle line:90%
head sequences are there.

00:32:09.990 --> 00:32:15.448 align:middle line:84%
How many outcomes are there in
which we have exactly k heads.

00:32:15.448 --> 00:32:18.940 align:middle line:90%


00:32:18.940 --> 00:32:21.270 align:middle line:90%
OK.

00:32:21.270 --> 00:32:27.590 align:middle line:84%
So what are the ways that I can
describe to you a sequence

00:32:27.590 --> 00:32:30.600 align:middle line:90%
with k heads?

00:32:30.600 --> 00:32:34.970 align:middle line:84%
I can take my n slots
that corresponds to

00:32:34.970 --> 00:32:36.220 align:middle line:90%
the different tosses.

00:32:36.220 --> 00:32:42.920 align:middle line:90%


00:32:42.920 --> 00:32:45.420 align:middle line:84%
I'm interested in particular
sequences that

00:32:45.420 --> 00:32:47.750 align:middle line:90%
have exactly k heads.

00:32:47.750 --> 00:32:53.590 align:middle line:84%
So what I need to do is to
choose k slots and assign

00:32:53.590 --> 00:32:54.850 align:middle line:90%
heads to them.

00:32:54.850 --> 00:33:05.530 align:middle line:90%


00:33:05.530 --> 00:33:11.580 align:middle line:84%
So to specify a sequence that
has exactly k heads is the

00:33:11.580 --> 00:33:17.380 align:middle line:84%
same thing as drawing this
picture and telling you which

00:33:17.380 --> 00:33:23.640 align:middle line:84%
are the k slots that happened
to have heads.

00:33:23.640 --> 00:33:30.110 align:middle line:84%
So I need to choose out of those
n slots, k of them, and

00:33:30.110 --> 00:33:31.635 align:middle line:90%
assign them heads.

00:33:31.635 --> 00:33:35.290 align:middle line:84%
In how many ways can I
choose this k slots?

00:33:35.290 --> 00:33:41.640 align:middle line:84%
Well, it's the question of
starting with a set of n slots

00:33:41.640 --> 00:33:47.080 align:middle line:84%
and choosing k slots out
of the n available.

00:33:47.080 --> 00:33:55.540 align:middle line:84%
So the number of k head
sequences is the same as the

00:33:55.540 --> 00:34:04.300 align:middle line:84%
number of k element subsets of
the set of slots that we

00:34:04.300 --> 00:34:10.520 align:middle line:84%
started with, which are
the n slots 1 up to n.

00:34:10.520 --> 00:34:12.800 align:middle line:90%
We know what that number is.

00:34:12.800 --> 00:34:18.770 align:middle line:84%
We counted, before, the number
of k element subsets, starting

00:34:18.770 --> 00:34:20.290 align:middle line:90%
with a set with n elements.

00:34:20.290 --> 00:34:23.030 align:middle line:84%
And we gave a symbol to that
number, which is that

00:34:23.030 --> 00:34:24.850 align:middle line:90%
thing, n choose k.

00:34:24.850 --> 00:34:28.110 align:middle line:84%
So this is the final answer
that we obtain.

00:34:28.110 --> 00:34:32.449 align:middle line:84%
So these are the so-called
binomial probabilities.

00:34:32.449 --> 00:34:35.190 align:middle line:84%
And they gave us the
probabilities for different

00:34:35.190 --> 00:34:39.580 align:middle line:84%
numbers of heads starting with
a fair coin that's being

00:34:39.580 --> 00:34:42.050 align:middle line:90%
tossed a number of times.

00:34:42.050 --> 00:34:46.170 align:middle line:84%
This formula is correct, of
course, for reasonable values

00:34:46.170 --> 00:34:52.370 align:middle line:84%
of k, meaning its correct for
k equals 0, 1, up to n.

00:34:52.370 --> 00:34:57.650 align:middle line:84%
If k is bigger than n, what's
the probability of k heads?

00:34:57.650 --> 00:35:01.340 align:middle line:84%
If k is bigger than n, there's
no way to obtain k heads, so

00:35:01.340 --> 00:35:03.480 align:middle line:84%
that probability is,
of course, zero.

00:35:03.480 --> 00:35:07.610 align:middle line:84%
So these probabilities only
makes sense for the numbers k

00:35:07.610 --> 00:35:10.405 align:middle line:84%
that are possible, given
that we have n tosses.

00:35:10.405 --> 00:35:13.200 align:middle line:90%


00:35:13.200 --> 00:35:16.850 align:middle line:84%
And now a question similar
to the one we had in

00:35:16.850 --> 00:35:18.480 align:middle line:90%
the previous slide.

00:35:18.480 --> 00:35:22.910 align:middle line:84%
If I write down this
summation--

00:35:22.910 --> 00:35:28.240 align:middle line:84%
even worse algebra than the one
in the previous slide--

00:35:28.240 --> 00:35:35.840 align:middle line:84%
what do you think this number
will turn out to be?

00:35:35.840 --> 00:35:39.930 align:middle line:84%
It should be 1 because this
is the probability

00:35:39.930 --> 00:35:42.930 align:middle line:90%
of obtaining k heads.

00:35:42.930 --> 00:35:45.470 align:middle line:84%
When we do the summation, what
we're doing is we're

00:35:45.470 --> 00:35:48.550 align:middle line:84%
considering the probability of
0 heads, plus the probability

00:35:48.550 --> 00:35:50.780 align:middle line:84%
of 1 head, plus the probability
of 2 heads, plus

00:35:50.780 --> 00:35:52.420 align:middle line:90%
the probability of n heads.

00:35:52.420 --> 00:35:54.780 align:middle line:84%
We've exhausted all the
possibilities in our

00:35:54.780 --> 00:35:55.720 align:middle line:90%
experiment.

00:35:55.720 --> 00:35:58.730 align:middle line:84%
So the overall probability,
when you exhaust all

00:35:58.730 --> 00:36:01.160 align:middle line:84%
possibilities, must
be equal to 1.

00:36:01.160 --> 00:36:04.180 align:middle line:84%
So that's yet another beautiful
formula that

00:36:04.180 --> 00:36:06.960 align:middle line:84%
evaluates into something
really simple.

00:36:06.960 --> 00:36:11.460 align:middle line:84%
And if you tried to prove this
identity algebraically, of

00:36:11.460 --> 00:36:16.030 align:middle line:84%
course, you would have to
suffer quite a bit.

00:36:16.030 --> 00:36:20.130 align:middle line:84%
So now armed with the binomial
probabilities, we can do the

00:36:20.130 --> 00:36:21.380 align:middle line:90%
harder problems.

00:36:21.380 --> 00:36:23.480 align:middle line:90%


00:36:23.480 --> 00:36:27.340 align:middle line:84%
So let's take the same
experiment again.

00:36:27.340 --> 00:36:32.610 align:middle line:84%
We flip a coin independently
10 times.

00:36:32.610 --> 00:36:37.450 align:middle line:84%
So these 10 tosses
are independent.

00:36:37.450 --> 00:36:40.000 align:middle line:90%
We flip it 10 times.

00:36:40.000 --> 00:36:43.985 align:middle line:84%
We don't see the result, but
somebody comes and tells us,

00:36:43.985 --> 00:36:47.890 align:middle line:84%
you know, there were exactly
3 heads in the 10

00:36:47.890 --> 00:36:49.688 align:middle line:90%
tosses that you had.

00:36:49.688 --> 00:36:50.930 align:middle line:90%
OK?

00:36:50.930 --> 00:36:53.280 align:middle line:90%
So a certain event happened.

00:36:53.280 --> 00:36:57.450 align:middle line:84%
And now you're asked to find
the probability of another

00:36:57.450 --> 00:37:01.400 align:middle line:84%
event, which is that the first
2 tosses were heads.

00:37:01.400 --> 00:37:08.990 align:middle line:90%
Let's call that event A. OK.

00:37:08.990 --> 00:37:14.320 align:middle line:84%
So are we in the setting
of discrete

00:37:14.320 --> 00:37:16.850 align:middle line:90%
uniform probability laws?

00:37:16.850 --> 00:37:21.760 align:middle line:84%
When we toss a coin multiple
times, is it the case that all

00:37:21.760 --> 00:37:24.130 align:middle line:90%
outcomes are equally likely?

00:37:24.130 --> 00:37:27.850 align:middle line:84%
All sequences are
equally likely?

00:37:27.850 --> 00:37:30.515 align:middle line:84%
That's the case if you
have a fair coin--

00:37:30.515 --> 00:37:32.630 align:middle line:84%
that all sequences are
equally likely.

00:37:32.630 --> 00:37:37.170 align:middle line:84%
But if your coin is not fair,
of course, heads/heads is

00:37:37.170 --> 00:37:39.630 align:middle line:84%
going to have a different
probability than tails/tails.

00:37:39.630 --> 00:37:43.720 align:middle line:84%
If your coin is biased towards
heads, then heads/heads is

00:37:43.720 --> 00:37:45.330 align:middle line:90%
going to be more likely.

00:37:45.330 --> 00:37:49.440 align:middle line:84%
So we're not quite in
the uniform setting.

00:37:49.440 --> 00:37:53.450 align:middle line:84%
Our overall sample space, omega,
does not have equally

00:37:53.450 --> 00:37:55.680 align:middle line:90%
likely elements.

00:37:55.680 --> 00:37:57.880 align:middle line:90%
Do we care about that?

00:37:57.880 --> 00:37:59.700 align:middle line:90%
Not necessarily.

00:37:59.700 --> 00:38:04.570 align:middle line:84%
All the action now happens
inside the event B that we are

00:38:04.570 --> 00:38:06.510 align:middle line:90%
told has occurred.

00:38:06.510 --> 00:38:10.000 align:middle line:84%
So we have our big sample
space, omega.

00:38:10.000 --> 00:38:13.860 align:middle line:84%
Elements of that sample space
are not equally likely.

00:38:13.860 --> 00:38:17.390 align:middle line:84%
We are told that a certain
event B occurred.

00:38:17.390 --> 00:38:21.830 align:middle line:84%
And inside that event B, we're
asked to find the conditional

00:38:21.830 --> 00:38:26.100 align:middle line:84%
probability that A has
also occurred.

00:38:26.100 --> 00:38:30.850 align:middle line:84%
Now here's the lucky thing,
inside the event B, all

00:38:30.850 --> 00:38:33.270 align:middle line:90%
outcomes are equally likely.

00:38:33.270 --> 00:38:35.920 align:middle line:90%


00:38:35.920 --> 00:38:40.710 align:middle line:84%
The outcomes inside B are the
sequences of 10 tosses that

00:38:40.710 --> 00:38:42.970 align:middle line:90%
have exactly 3 heads.

00:38:42.970 --> 00:38:47.370 align:middle line:84%
Every 3-head sequence has
this probability.

00:38:47.370 --> 00:38:50.790 align:middle line:84%
So the elements of
B are equally

00:38:50.790 --> 00:38:52.760 align:middle line:90%
likely with each other.

00:38:52.760 --> 00:38:55.800 align:middle line:90%


00:38:55.800 --> 00:39:01.030 align:middle line:84%
Once we condition on the event
B having occurred, what

00:39:01.030 --> 00:39:03.740 align:middle line:84%
happens to the probabilities
of the different outcomes

00:39:03.740 --> 00:39:05.430 align:middle line:90%
inside here?

00:39:05.430 --> 00:39:09.790 align:middle line:84%
Well, conditional probability
laws keep the same proportions

00:39:09.790 --> 00:39:11.710 align:middle line:90%
as the unconditional ones.

00:39:11.710 --> 00:39:15.930 align:middle line:84%
The elements of B were equally
likely when we started, so

00:39:15.930 --> 00:39:21.590 align:middle line:84%
they're equally likely once we
are told that B has occurred.

00:39:21.590 --> 00:39:26.440 align:middle line:84%
So to do with this problem, we
need to just transport us to

00:39:26.440 --> 00:39:30.680 align:middle line:84%
this smaller universe and think
about what's happening

00:39:30.680 --> 00:39:32.920 align:middle line:90%
in that little universe.

00:39:32.920 --> 00:39:36.150 align:middle line:84%
In that little universe,
all elements of

00:39:36.150 --> 00:39:39.930 align:middle line:90%
B are equally likely.

00:39:39.930 --> 00:39:43.860 align:middle line:84%
So to find the probability of
some subset of that set, we

00:39:43.860 --> 00:39:47.250 align:middle line:84%
only need to count the
cardinality of B, and count

00:39:47.250 --> 00:39:51.090 align:middle line:84%
the cardinality of A.
So let's do that.

00:39:51.090 --> 00:39:53.780 align:middle line:90%
Number of outcomes in B--

00:39:53.780 --> 00:40:00.290 align:middle line:84%
in how many ways can we get
3 heads out of 10 tosses?

00:40:00.290 --> 00:40:03.190 align:middle line:84%
That's the number we considered
before, and

00:40:03.190 --> 00:40:06.250 align:middle line:90%
it's 10 choose 3.

00:40:06.250 --> 00:40:11.020 align:middle line:84%
This is the number of
3-head sequences

00:40:11.020 --> 00:40:13.840 align:middle line:90%
when you have 10 tosses.

00:40:13.840 --> 00:40:20.580 align:middle line:84%
Now let's look at the event A.
The event A is that the first

00:40:20.580 --> 00:40:26.150 align:middle line:84%
2 tosses where heads, but we're
living now inside this

00:40:26.150 --> 00:40:31.220 align:middle line:84%
universe B. Given that B
occurred, how many elements

00:40:31.220 --> 00:40:34.760 align:middle line:90%
does A have in there?

00:40:34.760 --> 00:40:41.536 align:middle line:84%
In how many ways can A happen
inside the B universe.

00:40:41.536 --> 00:40:46.860 align:middle line:84%
If you're told that the
first 2 were heads--

00:40:46.860 --> 00:40:49.470 align:middle line:90%
sorry.

00:40:49.470 --> 00:40:54.540 align:middle line:84%
So out of the outcomes in B that
have 3 heads, how many

00:40:54.540 --> 00:40:56.630 align:middle line:90%
start with heads/heads?

00:40:56.630 --> 00:41:00.370 align:middle line:84%
Well, if it starts with
heads/heads, then the only

00:41:00.370 --> 00:41:04.830 align:middle line:84%
uncertainty is the location
of the third head.

00:41:04.830 --> 00:41:07.940 align:middle line:84%
So we started with heads/heads,
we're going to

00:41:07.940 --> 00:41:13.020 align:middle line:84%
have three heads, the question
is, where is that third head

00:41:13.020 --> 00:41:14.090 align:middle line:90%
going to be.

00:41:14.090 --> 00:41:16.540 align:middle line:90%
It has eight possibilities.

00:41:16.540 --> 00:41:20.940 align:middle line:84%
So slot 1 is heads, slot 2 is
heads, the third heads can be

00:41:20.940 --> 00:41:22.140 align:middle line:90%
anywhere else.

00:41:22.140 --> 00:41:25.020 align:middle line:84%
So there's 8 possibilities
for where the third

00:41:25.020 --> 00:41:26.270 align:middle line:90%
head is going to be.

00:41:26.270 --> 00:41:29.630 align:middle line:90%


00:41:29.630 --> 00:41:31.660 align:middle line:90%
OK.

00:41:31.660 --> 00:41:36.720 align:middle line:84%
So what we have counted here is
really the cardinality of A

00:41:36.720 --> 00:41:43.450 align:middle line:84%
intersection B, which is out of
the elements in B, how many

00:41:43.450 --> 00:41:49.410 align:middle line:84%
of them make A happen, divided
by the cardinality of B. And

00:41:49.410 --> 00:41:53.860 align:middle line:84%
that gives us the answer, which
is going to be 10 choose

00:41:53.860 --> 00:41:57.530 align:middle line:90%
3, divided by 8.

00:41:57.530 --> 00:42:01.330 align:middle line:84%
And I should probably redraw a
little bit of the picture that

00:42:01.330 --> 00:42:02.510 align:middle line:90%
they have here.

00:42:02.510 --> 00:42:06.690 align:middle line:84%
The set A is not necessarily
contained in B. It could also

00:42:06.690 --> 00:42:14.750 align:middle line:84%
have stuff outside B. So the
event that the first 2 tosses

00:42:14.750 --> 00:42:18.690 align:middle line:84%
are heads can happen with a
total of 3 heads, but it can

00:42:18.690 --> 00:42:22.650 align:middle line:84%
also happen with a different
total number of heads.

00:42:22.650 --> 00:42:27.340 align:middle line:84%
But once we are transported
inside the set B, what we need

00:42:27.340 --> 00:42:32.460 align:middle line:84%
to count is just this part of
A. It's A intersection B and

00:42:32.460 --> 00:42:35.180 align:middle line:84%
compare it with the total number
of elements in the set

00:42:35.180 --> 00:42:40.310 align:middle line:84%
B. Did I write it the
opposite way?

00:42:40.310 --> 00:42:41.700 align:middle line:90%
Yes.

00:42:41.700 --> 00:42:46.330 align:middle line:90%
So this is 8 over 10 choose 3.

00:42:46.330 --> 00:42:49.260 align:middle line:90%


00:42:49.260 --> 00:42:49.640 align:middle line:90%
OK.

00:42:49.640 --> 00:42:52.965 align:middle line:84%
So we're going to close with a
more difficult problem now.

00:42:52.965 --> 00:42:57.920 align:middle line:90%


00:42:57.920 --> 00:43:00.580 align:middle line:90%
OK.

00:43:00.580 --> 00:43:05.650 align:middle line:84%
This business of n choose k has
to do with starting with a

00:43:05.650 --> 00:43:11.350 align:middle line:84%
set and picking a subset
of k elements.

00:43:11.350 --> 00:43:15.080 align:middle line:84%
Another way of thinking of that
is that we start with a

00:43:15.080 --> 00:43:20.770 align:middle line:84%
set with n elements and you
choose a subset that has k,

00:43:20.770 --> 00:43:24.350 align:middle line:84%
which means that there's n
minus k that are left.

00:43:24.350 --> 00:43:29.980 align:middle line:84%
Picking a subset is the same as
partitioning our set into

00:43:29.980 --> 00:43:32.510 align:middle line:90%
two pieces.

00:43:32.510 --> 00:43:36.010 align:middle line:84%
Now let's generalize this
question and start counting

00:43:36.010 --> 00:43:38.150 align:middle line:90%
partitions in general.

00:43:38.150 --> 00:43:42.570 align:middle line:84%
Somebody gives you a set
that has n elements.

00:43:42.570 --> 00:43:44.670 align:middle line:84%
Somebody gives you also
certain numbers--

00:43:44.670 --> 00:43:49.400 align:middle line:84%
n1, n2, n3, let's say,
n4, where these

00:43:49.400 --> 00:43:53.740 align:middle line:90%
numbers add up to n.

00:43:53.740 --> 00:43:58.740 align:middle line:84%
And you're asked to partition
this set into four subsets

00:43:58.740 --> 00:44:01.450 align:middle line:84%
where each one of the subsets
has this particular

00:44:01.450 --> 00:44:02.580 align:middle line:90%
cardinality.

00:44:02.580 --> 00:44:08.250 align:middle line:84%
So you're asking to cut it into
four pieces, each one

00:44:08.250 --> 00:44:11.100 align:middle line:84%
having the prescribed
cardinality.

00:44:11.100 --> 00:44:15.090 align:middle line:84%
In how many ways can we
do this partitioning?

00:44:15.090 --> 00:44:19.370 align:middle line:84%
n choose k was the answer when
we partitioned in two pieces,

00:44:19.370 --> 00:44:21.910 align:middle line:84%
what's the answer
more generally?

00:44:21.910 --> 00:44:26.230 align:middle line:84%
For a concrete example of a
partition, you have your 52

00:44:26.230 --> 00:44:32.120 align:middle line:84%
card deck and you deal, as in
bridge, by giving 13 cards to

00:44:32.120 --> 00:44:34.000 align:middle line:90%
each one of the players.

00:44:34.000 --> 00:44:38.080 align:middle line:84%
Assuming that the dealing is
done fairly and with a well

00:44:38.080 --> 00:44:43.790 align:middle line:84%
shuffled deck of cards, every
particular partition of the 52

00:44:43.790 --> 00:44:50.590 align:middle line:84%
cards into four hands, that is
four subsets of 13 each,

00:44:50.590 --> 00:44:52.380 align:middle line:90%
should be equally likely.

00:44:52.380 --> 00:44:56.140 align:middle line:84%
So we take the 52 cards and we
partition them into subsets of

00:44:56.140 --> 00:44:58.550 align:middle line:90%
13, 13, 13, and 13.

00:44:58.550 --> 00:45:01.020 align:middle line:84%
And we assume that all possible
partitions, all

00:45:01.020 --> 00:45:04.240 align:middle line:84%
possible ways of dealing the
cards are equally likely.

00:45:04.240 --> 00:45:07.560 align:middle line:84%
So we are again in a setting
where we can use counting,

00:45:07.560 --> 00:45:10.410 align:middle line:84%
because all the possible
outcomes are equally likely.

00:45:10.410 --> 00:45:14.050 align:middle line:84%
So an outcome of the experiment
is the hands that

00:45:14.050 --> 00:45:17.070 align:middle line:90%
each player ends up getting.

00:45:17.070 --> 00:45:20.170 align:middle line:84%
And when you get the cards in
your hands, it doesn't matter

00:45:20.170 --> 00:45:22.000 align:middle line:84%
in which order that
you got them.

00:45:22.000 --> 00:45:25.460 align:middle line:84%
It only matters what cards
you have on you.

00:45:25.460 --> 00:45:31.160 align:middle line:84%
So it only matters which subset
of the cards you got.

00:45:31.160 --> 00:45:31.590 align:middle line:90%
All right.

00:45:31.590 --> 00:45:35.820 align:middle line:84%
So what's the cardinality of
the sample space in this

00:45:35.820 --> 00:45:37.160 align:middle line:90%
experiment?

00:45:37.160 --> 00:45:42.010 align:middle line:84%
So let's do it for the concrete
numbers that we have

00:45:42.010 --> 00:45:49.390 align:middle line:84%
for the problem of partitioning
52 cards.

00:45:49.390 --> 00:45:52.540 align:middle line:84%
So think of dealing as follows--
you shuffle the deck

00:45:52.540 --> 00:45:56.250 align:middle line:84%
perfectly, and then you take the
top 13 cards and give them

00:45:56.250 --> 00:45:57.740 align:middle line:90%
to one person.

00:45:57.740 --> 00:46:03.230 align:middle line:84%
In how many possible hands are
there for that person?

00:46:03.230 --> 00:46:08.970 align:middle line:84%
Out of the 52 cards, I choose 13
at random and give them to

00:46:08.970 --> 00:46:10.680 align:middle line:90%
the first person.

00:46:10.680 --> 00:46:13.260 align:middle line:84%
Having done that, what
happens next?

00:46:13.260 --> 00:46:16.260 align:middle line:90%
I'm left with 39 cards.

00:46:16.260 --> 00:46:20.600 align:middle line:84%
And out of those 39 cards, I
pick 13 of them and give them

00:46:20.600 --> 00:46:22.250 align:middle line:90%
to the second person.

00:46:22.250 --> 00:46:25.790 align:middle line:90%
Now I'm left with 26 cards.

00:46:25.790 --> 00:46:30.920 align:middle line:84%
Out of those 26, I choose 13,
give them to the third person.

00:46:30.920 --> 00:46:34.040 align:middle line:84%
And for the last person there
isn't really any choice.

00:46:34.040 --> 00:46:37.890 align:middle line:84%
Out of the 13, I have to give
that person all 13.

00:46:37.890 --> 00:46:40.230 align:middle line:84%
And that number is
just equal to 1.

00:46:40.230 --> 00:46:43.530 align:middle line:90%
So we don't care about it.

00:46:43.530 --> 00:46:43.910 align:middle line:90%
All right.

00:46:43.910 --> 00:46:48.270 align:middle line:84%
So next thing you do is to write
down the formulas for

00:46:48.270 --> 00:46:49.450 align:middle line:90%
these numbers.

00:46:49.450 --> 00:46:52.450 align:middle line:84%
So, for example, here you
would have 52 factorial,

00:46:52.450 --> 00:46:55.880 align:middle line:84%
divided by 13 factorial,
times 39

00:46:55.880 --> 00:46:59.040 align:middle line:90%
factorial, and you continue.

00:46:59.040 --> 00:47:01.310 align:middle line:84%
And then there are nice
cancellations that happen.

00:47:01.310 --> 00:47:05.120 align:middle line:84%
This 39 factorial is going to
cancel the 39 factorial that

00:47:05.120 --> 00:47:07.020 align:middle line:90%
comes from there, and so on.

00:47:07.020 --> 00:47:10.200 align:middle line:84%
After you do the cancellations
and all the algebra, you're

00:47:10.200 --> 00:47:13.380 align:middle line:84%
left with this particular
answer, which is the number of

00:47:13.380 --> 00:47:18.120 align:middle line:84%
possible partitions of 52 cards
into four players where

00:47:18.120 --> 00:47:21.710 align:middle line:84%
each player gets exactly
13 hands.

00:47:21.710 --> 00:47:25.140 align:middle line:84%
If you were to generalize this
formula to the setting that we

00:47:25.140 --> 00:47:29.200 align:middle line:84%
have here, the more general
formula is--

00:47:29.200 --> 00:47:33.840 align:middle line:84%
you have n factorial, where n is
the number of objects that

00:47:33.840 --> 00:47:39.770 align:middle line:84%
you are distributing, divided
by the product of the

00:47:39.770 --> 00:47:41.840 align:middle line:90%
factorials of the--

00:47:41.840 --> 00:47:46.000 align:middle line:84%
OK, here I'm doing it for
the case where we split

00:47:46.000 --> 00:47:49.310 align:middle line:90%
it into four sets.

00:47:49.310 --> 00:47:53.740 align:middle line:84%
So that would be the answer when
we partition a set into

00:47:53.740 --> 00:47:57.780 align:middle line:84%
four subsets of prescribed
cardinalities.

00:47:57.780 --> 00:48:00.120 align:middle line:84%
And you can guess how that
formula would generalize if

00:48:00.120 --> 00:48:03.590 align:middle line:84%
you want to split it into
five sets or six sets.

00:48:03.590 --> 00:48:03.950 align:middle line:90%
OK.

00:48:03.950 --> 00:48:10.190 align:middle line:84%
So far we just figured out the
size of the sample space.

00:48:10.190 --> 00:48:14.660 align:middle line:84%
Now we need to look at our
event, which is the event that

00:48:14.660 --> 00:48:20.640 align:middle line:84%
each player gets an ace, let's
call that event A. In how many

00:48:20.640 --> 00:48:22.800 align:middle line:90%
ways can that event happens?

00:48:22.800 --> 00:48:26.970 align:middle line:84%
How many possible hands are
there in which every player

00:48:26.970 --> 00:48:29.350 align:middle line:90%
has exactly one ace?

00:48:29.350 --> 00:48:33.100 align:middle line:84%
So I need to think about the
sequential process by which I

00:48:33.100 --> 00:48:36.860 align:middle line:84%
distribute the cards so that
everybody gets exactly one

00:48:36.860 --> 00:48:40.440 align:middle line:84%
ace, and then try to think
in how many ways can that

00:48:40.440 --> 00:48:42.210 align:middle line:90%
sequential process happen.

00:48:42.210 --> 00:48:45.660 align:middle line:84%
So one way of making sure that
everybody gets exactly one ace

00:48:45.660 --> 00:48:46.730 align:middle line:90%
is the following--

00:48:46.730 --> 00:48:51.210 align:middle line:84%
I take the four aces and I
distribute them randomly to

00:48:51.210 --> 00:48:53.970 align:middle line:84%
the four players, but making
sure that each one gets

00:48:53.970 --> 00:48:55.580 align:middle line:90%
exactly one ace.

00:48:55.580 --> 00:48:57.510 align:middle line:84%
In how many ways can
that happen?

00:48:57.510 --> 00:49:02.210 align:middle line:84%
I take the ace of spades and I
send it to a random person out

00:49:02.210 --> 00:49:03.210 align:middle line:90%
of the four.

00:49:03.210 --> 00:49:07.430 align:middle line:90%
So there's 4 choices for this.

00:49:07.430 --> 00:49:10.280 align:middle line:84%
Then I'm left with 3
aces to distribute.

00:49:10.280 --> 00:49:14.050 align:middle line:84%
That person already
gotten an ace.

00:49:14.050 --> 00:49:17.270 align:middle line:84%
I take the next ace, and
I give it to one of

00:49:17.270 --> 00:49:19.590 align:middle line:90%
the 3 people remaining.

00:49:19.590 --> 00:49:22.480 align:middle line:84%
So there's 3 choices
for how to do that.

00:49:22.480 --> 00:49:26.970 align:middle line:84%
And then for the next ace,
there's 2 people who have not

00:49:26.970 --> 00:49:28.640 align:middle line:84%
yet gotten an ace,
and they give it

00:49:28.640 --> 00:49:30.770 align:middle line:90%
randomly to one of them.

00:49:30.770 --> 00:49:36.760 align:middle line:84%
So these are the possible ways
of distributing for the 4

00:49:36.760 --> 00:49:42.040 align:middle line:84%
aces, so that each person
gets exactly one.

00:49:42.040 --> 00:49:44.230 align:middle line:84%
It's actually the same
as this problem.

00:49:44.230 --> 00:49:48.930 align:middle line:84%
Starting with a set of four
things, in how many ways can I

00:49:48.930 --> 00:49:53.430 align:middle line:84%
partition them into four subsets
where the first set

00:49:53.430 --> 00:49:56.220 align:middle line:84%
has one element, the second has
one element, the third one

00:49:56.220 --> 00:49:58.270 align:middle line:84%
has another element,
and so on.

00:49:58.270 --> 00:50:05.710 align:middle line:84%
So it agrees with that formula
by giving us 4 factorial.

00:50:05.710 --> 00:50:06.040 align:middle line:90%
OK.

00:50:06.040 --> 00:50:09.400 align:middle line:84%
So there are different ways
of distributing the aces.

00:50:09.400 --> 00:50:11.760 align:middle line:84%
And then there's different
ways of distributing the

00:50:11.760 --> 00:50:13.460 align:middle line:90%
remaining 48 cards.

00:50:13.460 --> 00:50:15.110 align:middle line:90%
How many ways are there?

00:50:15.110 --> 00:50:18.920 align:middle line:84%
Well, I have 48 cards that I'm
going to distribute to four

00:50:18.920 --> 00:50:22.760 align:middle line:84%
players by giving 12
cards to each one.

00:50:22.760 --> 00:50:26.430 align:middle line:84%
It's exactly the same question
as the one we had here, except

00:50:26.430 --> 00:50:30.230 align:middle line:84%
that now it's 48 cards,
12 to each person.

00:50:30.230 --> 00:50:33.400 align:middle line:84%
And that gives us this
particular count.

00:50:33.400 --> 00:50:39.216 align:middle line:84%
So putting all that together
gives us the different ways

00:50:39.216 --> 00:50:43.350 align:middle line:84%
that we can distribute the cards
to the four players so

00:50:43.350 --> 00:50:45.910 align:middle line:84%
that each one gets
exactly one ace.

00:50:45.910 --> 00:50:48.600 align:middle line:84%
The number of possible ways
is going to be this four

00:50:48.600 --> 00:50:54.610 align:middle line:84%
factorial, coming from here,
times this number--

00:50:54.610 --> 00:50:56.890 align:middle line:84%
this gives us the number of
ways that the event of

00:50:56.890 --> 00:50:58.760 align:middle line:90%
interest can happen--

00:50:58.760 --> 00:51:02.760 align:middle line:84%
and then the denominator is the
cardinality of our sample

00:51:02.760 --> 00:51:04.930 align:middle line:90%
space, which is this number.

00:51:04.930 --> 00:51:07.560 align:middle line:84%
So this looks like
a horrible mess.

00:51:07.560 --> 00:51:10.590 align:middle line:84%
It turns out that this
expression does simplify to

00:51:10.590 --> 00:51:13.180 align:middle line:84%
something really,
really simple.

00:51:13.180 --> 00:51:16.420 align:middle line:84%
And if you look at the textbook
for this problem, you

00:51:16.420 --> 00:51:18.750 align:middle line:84%
will see an alternative
derivation that gives you a

00:51:18.750 --> 00:51:22.720 align:middle line:84%
short cut to the same
numerical answer.

00:51:22.720 --> 00:51:23.160 align:middle line:90%
All right.

00:51:23.160 --> 00:51:25.240 align:middle line:84%
So that basically concludes
chapter one.

00:51:25.240 --> 00:51:29.940 align:middle line:84%
From next time we're going to
consider introducing random

00:51:29.940 --> 00:51:32.950 align:middle line:84%
variables and make the subject
even more interesting.

00:51:32.950 --> 00:51:34.200 align:middle line:90%