WEBVTT
00:00:00.440 --> 00:00:03.540
Our discussion of random
variable so far has involved
00:00:03.540 --> 00:00:06.700
nothing but standard probability
calculations.
00:00:06.700 --> 00:00:09.780
Other than using the PMF
notation, we have
00:00:09.780 --> 00:00:11.240
done nothing new.
00:00:11.240 --> 00:00:14.670
It is now time to introduce a
truly new concept that plays a
00:00:14.670 --> 00:00:17.250
central role in probability
theory.
00:00:17.250 --> 00:00:20.750
This is the concept of the
expected value or expectation
00:00:20.750 --> 00:00:23.220
or mean of a random variable.
00:00:23.220 --> 00:00:26.930
It is a single number that
provides some kind of summary
00:00:26.930 --> 00:00:29.590
of a random variable
by telling us what
00:00:29.590 --> 00:00:31.430
it is on the average.
00:00:31.430 --> 00:00:34.000
Let us motivate with
an example.
00:00:34.000 --> 00:00:36.820
You play a game of chance
over and over, let
00:00:36.820 --> 00:00:39.120
us say 1,000 times.
00:00:39.120 --> 00:00:43.910
Each time that you play, you win
an amount of money, which
00:00:43.910 --> 00:00:47.350
is a random variable, and that
random variable takes the
00:00:47.350 --> 00:00:50.640
value 1, with probability 2/10,
the value of 2, with
00:00:50.640 --> 00:00:55.140
probability 5/10, the value of
4, with probability 3/10.
00:00:55.140 --> 00:00:58.920
You can plot the PMF of
this random variable.
00:00:58.920 --> 00:01:03.720
It takes values 1, 2, and 4.
00:01:03.720 --> 00:01:06.810
And the associated
probabilities are
00:01:06.810 --> 00:01:16.050
2/10, 5/10, and 3/10.
00:01:22.330 --> 00:01:25.860
How much do you expect to have
at the end of the day?
00:01:25.860 --> 00:01:29.170
Well, if you interpret
probabilities as frequencies,
00:01:29.170 --> 00:01:36.820
in a thousand plays, you expect
to have about 200 times
00:01:36.820 --> 00:01:42.650
this outcome to occur and this
outcome about 500 times and
00:01:42.650 --> 00:01:46.160
this outcome about 300 times.
00:01:46.160 --> 00:01:52.670
So your average gain is expected
to be your total
00:01:52.670 --> 00:01:59.800
gain, which is 1, 200
times, plus 2, 500
00:01:59.800 --> 00:02:05.110
times, plus 4, 300 times.
00:02:05.110 --> 00:02:06.430
This is your total gain.
00:02:06.430 --> 00:02:10.720
And to get to the average gain,
you divide by 1,000.
00:02:10.720 --> 00:02:14.400
And the expression that you get
can also be written in a
00:02:14.400 --> 00:02:25.480
simpler form as 1 times
2/10 plus 2 times 5/10
00:02:25.480 --> 00:02:29.880
plus 4 times 3/10.
00:02:29.880 --> 00:02:34.010
So this is what you expect to
get, on the average, if you
00:02:34.010 --> 00:02:35.340
keep playing that game.
00:02:38.470 --> 00:02:40.170
What have we done?
00:02:40.170 --> 00:02:44.640
We have calculated a certain
quantity which is a sort of
00:02:44.640 --> 00:02:48.690
average of the random variable
of interest.
00:02:48.690 --> 00:02:53.720
And what we did in this
summation here, we took each
00:02:53.720 --> 00:02:57.320
one of the possible values
of the random variable.
00:02:57.320 --> 00:02:59.470
Each possible value
corresponds to
00:02:59.470 --> 00:03:01.610
one term in the summation.
00:03:01.610 --> 00:03:05.260
And what we're adding is the
numerical value of the random
00:03:05.260 --> 00:03:08.970
variable times the probability
that this
00:03:08.970 --> 00:03:13.060
particular value is obtained.
00:03:13.060 --> 00:03:18.040
So when x is equal to 1, we
get 1 here and then the
00:03:18.040 --> 00:03:20.140
probability of 1.
00:03:20.140 --> 00:03:23.890
When we add the term
corresponding to x equals 2,
00:03:23.890 --> 00:03:28.320
we get little x equals to 2 and
next to it the probability
00:03:28.320 --> 00:03:32.090
that x is equal to
2, and so on.
00:03:32.090 --> 00:03:36.010
So this is what we call the
expected value of the random
00:03:36.010 --> 00:03:38.010
variable x.
00:03:38.010 --> 00:03:40.820
This is the formula that defines
it, but it's also
00:03:40.820 --> 00:03:44.170
important to always keep in
mind the interpretation of
00:03:44.170 --> 00:03:45.250
that formula.
00:03:45.250 --> 00:03:48.880
The expected value of a random
variable is to be interpreted
00:03:48.880 --> 00:03:53.980
as the average that you expect
to see in a large number of
00:03:53.980 --> 00:03:58.460
independent repetitions
of the experiment.
00:03:58.460 --> 00:04:03.100
One small technical caveat, if
we're dealing with a random
00:04:03.100 --> 00:04:07.780
variable that takes values in
a discrete but infinite set,
00:04:07.780 --> 00:04:11.110
this sum here is going
to be an infinite sum
00:04:11.110 --> 00:04:12.990
or an infinite series.
00:04:12.990 --> 00:04:16.320
And there's always a question
whether an infinite series has
00:04:16.320 --> 00:04:19.380
a well-defined limit or not.
00:04:19.380 --> 00:04:24.640
In order for it to have a
well-defined limit, we will be
00:04:24.640 --> 00:04:30.450
making the assumption that this
infinite series is, as
00:04:30.450 --> 00:04:34.480
it's called, absolutely
convergent, namely that if we
00:04:34.480 --> 00:04:37.159
replace the x's by their
absolute values--
00:04:37.159 --> 00:04:40.510
so we're adding positive
numbers,
00:04:40.510 --> 00:04:42.020
or nonnegative numbers--
00:04:42.020 --> 00:04:45.150
the sum of those numbers
is going to be finite.
00:04:45.150 --> 00:04:48.330
So this is a technical condition
that we need in
00:04:48.330 --> 00:04:52.060
order to make sure that this
expected value is a
00:04:52.060 --> 00:04:54.200
well-defined and finite
quantity.
00:04:57.930 --> 00:05:00.790
Let us now calculate the
expected value of a very
00:05:00.790 --> 00:05:04.160
simple random variable, the
Bernoulli random variable that
00:05:04.160 --> 00:05:07.770
takes the value 1 with
probability p and the value 0
00:05:07.770 --> 00:05:10.300
with probability 1 minus p.
00:05:10.300 --> 00:05:15.320
The expected value consists
of two terms.
00:05:15.320 --> 00:05:17.180
X can take the value 1.
00:05:17.180 --> 00:05:19.040
This happens with
probability p.
00:05:19.040 --> 00:05:21.540
Or it can take the
value of zero.
00:05:21.540 --> 00:05:24.300
This happens with probability
1 minus p.
00:05:24.300 --> 00:05:29.450
And therefore, the expected
value is just equal to p.
00:05:29.450 --> 00:05:34.409
As a special case, we may
consider the situation where X
00:05:34.409 --> 00:05:38.630
is the indicator random variable
of a certain event,
00:05:38.630 --> 00:05:47.450
A, so that X is equal to 1 if
and only if event A occurs.
00:05:47.450 --> 00:05:51.530
In this case, the probability
that X equals to 1, which is
00:05:51.530 --> 00:05:54.670
our parameter p, is the same
as the probability
00:05:54.670 --> 00:05:56.480
that event A occurs.
00:05:56.480 --> 00:06:00.170
And we have this relation.
00:06:00.170 --> 00:06:02.920
And so with this correspondence,
we readily
00:06:02.920 --> 00:06:06.840
conclude that the expected value
of an indicator random
00:06:06.840 --> 00:06:12.070
variable is equal to the
probability of that event.
00:06:12.070 --> 00:06:15.120
Let us move now to the
calculation of the expected
00:06:15.120 --> 00:06:18.720
value of a uniform
random variable.
00:06:18.720 --> 00:06:21.000
Let us consider, to keep
things simple, a random
00:06:21.000 --> 00:06:26.750
variable which is uniform
on the set from 0 to n.
00:06:26.750 --> 00:06:30.020
It's uniform, so the probability
of the values that
00:06:30.020 --> 00:06:33.590
it can take are all equal
to each other.
00:06:33.590 --> 00:06:37.550
It can take one of n plus 1
possible values, and so the
00:06:37.550 --> 00:06:41.860
probability of each one of the
values is 1 over n plus 1.
00:06:41.860 --> 00:06:43.909
We want to calculate
the expected value
00:06:43.909 --> 00:06:45.330
of this random variable.
00:06:45.330 --> 00:06:46.870
How do we proceed?
00:06:46.870 --> 00:06:49.730
We just recall the definition
of the expectation.
00:06:49.730 --> 00:06:54.090
It's a sum where we add over
all of the possible values.
00:06:54.090 --> 00:06:57.159
And for each one of the values,
we multiply by its
00:06:57.159 --> 00:06:58.409
corresponding probability.
00:07:04.270 --> 00:07:06.935
So we obtain a summation
of this form.
00:07:09.970 --> 00:07:15.370
We can factor out a factor of
1 over n plus 1, and we're
00:07:15.370 --> 00:07:20.930
left with 0 plus 1 plus
all the way up to n.
00:07:20.930 --> 00:07:25.840
And perhaps you remember the
formula for us summing those
00:07:25.840 --> 00:07:34.020
numbers, and it is n times
n plus 1 over 2.
00:07:34.020 --> 00:07:37.590
And after doing the
cancellations, we obtain a
00:07:37.590 --> 00:07:41.060
final answer, which
is n over 2.
00:07:41.060 --> 00:07:46.790
Incidentally, notice that n over
2 is just the midpoint of
00:07:46.790 --> 00:07:50.909
this picture that we have
here in this diagram.
00:07:50.909 --> 00:07:52.850
This is always the case.
00:07:52.850 --> 00:07:58.030
Whenever we have a PMF which is
symmetric around a certain
00:07:58.030 --> 00:08:00.940
point, then the expected
value will be
00:08:00.940 --> 00:08:03.060
the center of symmetry.
00:08:03.060 --> 00:08:07.060
More general, if you do not have
symmetry, the expected
00:08:07.060 --> 00:08:11.900
value turns out to be the center
of gravity of the PMF.
00:08:11.900 --> 00:08:15.600
If you think of these bars as
having weight, where the
00:08:15.600 --> 00:08:18.770
weight is proportional to their
height, the center of
00:08:18.770 --> 00:08:22.750
gravity is the point at which
you should put your finger if
00:08:22.750 --> 00:08:25.490
you want to balance that diagram
so that it doesn't
00:08:25.490 --> 00:08:30.060
fall in one direction
or the other.
00:08:30.060 --> 00:08:33.289
And we now close this segment
by providing one more
00:08:33.289 --> 00:08:36.039
interpretation of
expectations.
00:08:36.039 --> 00:08:39.130
Suppose that we have a class
consisting of n students and
00:08:39.130 --> 00:08:41.740
that the ith student
has a weight which
00:08:41.740 --> 00:08:44.730
is some number xi.
00:08:44.730 --> 00:08:47.600
We have a probabilistic
experiment where we pick one
00:08:47.600 --> 00:08:51.170
of the students at random, and
each student is equally likely
00:08:51.170 --> 00:08:53.820
to be picked as any
other student.
00:08:53.820 --> 00:08:56.650
And we're interested in the
random variable X, which is
00:08:56.650 --> 00:08:59.970
the weight of the student
that was selected.
00:08:59.970 --> 00:09:02.300
To keep things simple, we
will assume that the
00:09:02.300 --> 00:09:05.690
xi's are all distinct.
00:09:05.690 --> 00:09:11.540
And we first find the PMF
of this random variable.
00:09:11.540 --> 00:09:16.110
Any particular xi that this
possible is associated to
00:09:16.110 --> 00:09:18.620
exactly one student, because
we assumed that
00:09:18.620 --> 00:09:20.460
the xi's are distinct.
00:09:20.460 --> 00:09:24.140
So this probability would be the
probability or selecting
00:09:24.140 --> 00:09:29.770
the ith student, and that
probability is 1 over n.
00:09:29.770 --> 00:09:33.230
And now we can proceed and
calculate the expected value
00:09:33.230 --> 00:09:38.470
of the random variable X. This
random variable X takes
00:09:38.470 --> 00:09:43.340
values, and the values that
it takes are the xi's.
00:09:43.340 --> 00:09:48.540
A particular xi would be
associated with a probability
00:09:48.540 --> 00:09:53.840
1 over n, and we're adding over
all the i's or over all
00:09:53.840 --> 00:09:55.040
of the students.
00:09:55.040 --> 00:09:58.330
And so this is the
expected value.
00:09:58.330 --> 00:10:03.910
What we have here is just the
average of the weights of the
00:10:03.910 --> 00:10:06.060
students in this class.
00:10:06.060 --> 00:10:10.360
So the expected value in this
particular experiment can be
00:10:10.360 --> 00:10:14.550
interpreted as the true average
over the entire
00:10:14.550 --> 00:10:17.550
population of the students.
00:10:17.550 --> 00:10:19.400
Of course, here we're
talking about two
00:10:19.400 --> 00:10:21.730
different kinds of averages.
00:10:21.730 --> 00:10:25.280
In some sense, we're thinking
of expected values as the
00:10:25.280 --> 00:10:28.540
average in a large number of
repetitions of experiments.
00:10:28.540 --> 00:10:32.040
But here we have another
interpretation as the average
00:10:32.040 --> 00:10:34.040
over a particular population.