WEBVTT
00:00:00.430 --> 00:00:00.860
Hi.
00:00:00.860 --> 00:00:03.820
In this problem, we have an
absent-minded professor who
00:00:03.820 --> 00:00:06.860
will inadvertently give us some
practice with exponential
00:00:06.860 --> 00:00:08.460
random variables.
00:00:08.460 --> 00:00:13.630
So the professor has made two
appointments with two students
00:00:13.630 --> 00:00:17.480
and inadvertently made them
at the same time.
00:00:17.480 --> 00:00:21.390
And what we do is we model the
duration of these appointments
00:00:21.390 --> 00:00:23.340
with an exponential
random variable.
00:00:23.340 --> 00:00:26.760
So remember, an exponential
random variable is a
00:00:26.760 --> 00:00:29.850
continuous random variable that
takes on non-negative
00:00:29.850 --> 00:00:35.980
values, and it's parametrized
by a rate parameter, lambda.
00:00:35.980 --> 00:00:39.030
And the exponential random
variable is often used to
00:00:39.030 --> 00:00:42.670
model durations of time-- so
time until something happens,
00:00:42.670 --> 00:00:46.310
so for example, in this case,
time until the student leaves
00:00:46.310 --> 00:00:47.420
or the appointment is over.
00:00:47.420 --> 00:00:51.180
Or sometimes you will also use
it to be as a model of time
00:00:51.180 --> 00:00:52.430
until something fails.
00:00:54.600 --> 00:00:59.010
And one thing that will be
useful is the CDF of this
00:00:59.010 --> 00:01:00.240
exponential random variable.
00:01:00.240 --> 00:01:02.280
So the probability that it's
less than or equal to some
00:01:02.280 --> 00:01:07.290
value, little t, is equal to 1
minus e to the minus lambda t.
00:01:07.290 --> 00:01:10.970
So this is, of course, valid
only when t is non-negative.
00:01:10.970 --> 00:01:15.750
The other useful property is
that the expected value of an
00:01:15.750 --> 00:01:17.790
exponential random variable
is just 1 over
00:01:17.790 --> 00:01:20.280
the parameter lambda.
00:01:20.280 --> 00:01:22.390
And the last thing that we'll
use specifically in this
00:01:22.390 --> 00:01:24.450
problem is the memory
list property of
00:01:24.450 --> 00:01:25.410
exponential random variables.
00:01:25.410 --> 00:01:30.490
And so recall that that just
means that if you pop in the
00:01:30.490 --> 00:01:36.700
middle of an exponential
random variable, the
00:01:36.700 --> 00:01:40.350
distribution for that random
variable going forward from
00:01:40.350 --> 00:01:43.345
the point where you popped in
is exactly the same as if it
00:01:43.345 --> 00:01:44.400
had just started over.
00:01:44.400 --> 00:01:46.430
So that's why we call it the
memory list property.
00:01:46.430 --> 00:01:49.250
Basically, the past doesn't
really matter, and going
00:01:49.250 --> 00:01:52.670
forward from whatever point
that you observe it at, it
00:01:52.670 --> 00:01:58.310
looks as if it had just
started over afresh.
00:01:58.310 --> 00:02:02.350
And last thing we'll use, which
is a review of a concept
00:02:02.350 --> 00:02:06.780
from earlier, is total
expectation.
00:02:06.780 --> 00:02:08.889
So let's actually model
this problem
00:02:08.889 --> 00:02:10.979
with two random variables.
00:02:10.979 --> 00:02:17.080
Let's let T1 be the time that
the first student takes in the
00:02:17.080 --> 00:02:20.760
appointment and T2 be the time
that the second student takes.
00:02:20.760 --> 00:02:23.160
And what we're told in the
problem is that they're both
00:02:23.160 --> 00:02:26.000
exponential with mean
30 minutes.
00:02:26.000 --> 00:02:29.240
So remember the mean being 30
minutes means that the lambda
00:02:29.240 --> 00:02:30.640
is 1 over the mean.
00:02:30.640 --> 00:02:34.260
And so the lambda in this
case would be 1/30.
00:02:34.260 --> 00:02:35.770
And importantly, we're also
told that they are
00:02:35.770 --> 00:02:36.710
independent.
00:02:36.710 --> 00:02:40.160
So how long the first person
takes is independent of how
00:02:40.160 --> 00:02:41.960
long the second person takes.
00:02:41.960 --> 00:02:46.560
So the first student arrives on
time and take some random
00:02:46.560 --> 00:02:48.110
amount of time, T1.
00:02:48.110 --> 00:02:51.330
The second student arrives
exactly five minutes late.
00:02:51.330 --> 00:02:55.170
And whatever the second person
meets with the professor, that
00:02:55.170 --> 00:02:58.310
student will then take some
random amount of time, T2.
00:02:58.310 --> 00:03:01.810
What we're asked to do is find
the expected time between when
00:03:01.810 --> 00:03:03.270
the first student arrives--
00:03:03.270 --> 00:03:05.370
so we can just call
that time 0--
00:03:05.370 --> 00:03:08.920
and when the second
student leaves.
00:03:08.920 --> 00:03:12.580
Now you may say, well we're
dealing with expectations, so
00:03:12.580 --> 00:03:13.890
it's easier.
00:03:13.890 --> 00:03:19.640
And in this case, it probably is
just the expectation of how
00:03:19.640 --> 00:03:21.540
long the first student takes
plus the expectation of how
00:03:21.540 --> 00:03:22.540
long the second student takes.
00:03:22.540 --> 00:03:26.450
So it should be about 60 minutes
or exactly 60 minutes.
00:03:26.450 --> 00:03:28.940
Now, why is that not
exactly right?
00:03:28.940 --> 00:03:36.450
It's because there is a small
wrinkle, that the students may
00:03:36.450 --> 00:03:38.660
not go exactly back to back.
00:03:38.660 --> 00:03:41.970
So let's actually draw out a
time frame of what might
00:03:41.970 --> 00:03:44.640
actually happen.
00:03:44.640 --> 00:03:47.240
So here's time 0, when the
first student arrives.
00:03:47.240 --> 00:03:52.270
And the first will go for some
amount of time and leave.
00:03:52.270 --> 00:03:54.390
And now let's consider
two scenarios.
00:03:54.390 --> 00:04:00.570
One scenario is that the first
student takes more than five
00:04:00.570 --> 00:04:01.560
minutes to complete.
00:04:01.560 --> 00:04:10.120
Well then the second student
will have arrived at 5 minutes
00:04:10.120 --> 00:04:14.210
and then will be already waiting
whenever this first
00:04:14.210 --> 00:04:14.810
student leaves.
00:04:14.810 --> 00:04:16.180
So then the second student will
00:04:16.180 --> 00:04:18.310
immediately pick up and continue.
00:04:18.310 --> 00:04:22.740
And in that case, we do have two
exponentials back to back.
00:04:22.740 --> 00:04:25.370
But there could be another
situation.
00:04:25.370 --> 00:04:32.110
Suppose that the first student
didn't take very long at all
00:04:32.110 --> 00:04:37.260
and finished within five
minutes, in which case the
00:04:37.260 --> 00:04:38.490
second student hasn't
arrived yet.
00:04:38.490 --> 00:04:42.530
So this professor is idle
in between here.
00:04:42.530 --> 00:04:45.970
And so we actually don't
necessarily have two of them
00:04:45.970 --> 00:04:47.190
going back to back.
00:04:47.190 --> 00:04:50.260
So there's an empty period in
between that we have to
00:04:50.260 --> 00:04:52.270
account for.
00:04:52.270 --> 00:04:57.730
So with that in mind, we see
that we have two scenarios.
00:04:57.730 --> 00:04:59.640
And so what does that
beg to use?
00:04:59.640 --> 00:05:02.520
Well, we can split them up into
the two scenarios and
00:05:02.520 --> 00:05:05.140
then calculate expectations
with each one and then use
00:05:05.140 --> 00:05:09.280
total expectation to
find the overall
00:05:09.280 --> 00:05:12.090
expected length of time.
00:05:12.090 --> 00:05:15.350
OK, so let's begin with
the first scenario.
00:05:19.690 --> 00:05:24.450
The first scenario is that,
let's say, the first student
00:05:24.450 --> 00:05:27.710
finished within five minutes.
00:05:27.710 --> 00:05:30.840
So what does that mean in terms
of the definitions that
00:05:30.840 --> 00:05:31.870
we've used?
00:05:31.870 --> 00:05:37.050
That means T1 is less
than or equal to 5.
00:05:37.050 --> 00:05:40.460
So if the first student took
less than five minutes, then
00:05:40.460 --> 00:05:41.840
what happens?
00:05:41.840 --> 00:05:46.070
Then we know that the
amount of time that
00:05:46.070 --> 00:05:47.320
you'd need to take--
00:05:51.510 --> 00:05:52.600
let's call that something
else.
00:05:52.600 --> 00:05:58.190
Let's call that X. So X is the
random variable that we're
00:05:58.190 --> 00:06:01.580
interested in, the time between
when the first student
00:06:01.580 --> 00:06:04.140
comes and the second
student leaves.
00:06:04.140 --> 00:06:05.950
This is the value that
we want to find.
00:06:05.950 --> 00:06:10.440
Well we know that we're
guaranteed that there will be
00:06:10.440 --> 00:06:12.720
a five-minute interval.
00:06:12.720 --> 00:06:17.260
So first student will come,
and then the second person
00:06:17.260 --> 00:06:19.070
will take over.
00:06:19.070 --> 00:06:31.340
So we're guaranteed that the
first five minutes will be the
00:06:31.340 --> 00:06:34.380
difference between when time
starts and when the second
00:06:34.380 --> 00:06:35.240
student arrives.
00:06:35.240 --> 00:06:39.670
And then, after that, it's just
however long the second
00:06:39.670 --> 00:06:44.320
student takes, which is just
the expected value of T2.
00:06:44.320 --> 00:06:47.770
And T2 is a exponential random
variable with mean 30.
00:06:47.770 --> 00:06:51.325
So in this case, it's just 35.
00:06:55.800 --> 00:06:58.410
So the first student doesn't
take very long.
00:06:58.410 --> 00:07:02.320
Then we just get the five
minutes, that little buffer,
00:07:02.320 --> 00:07:04.170
plus however long the second
student takes, which, on
00:07:04.170 --> 00:07:06.640
average, is 30 minutes.
00:07:06.640 --> 00:07:09.260
Now what is the probability
of this happening?
00:07:09.260 --> 00:07:12.820
The probability of this
happening is the probability
00:07:12.820 --> 00:07:16.080
that the first student takes
less than five minutes.
00:07:16.080 --> 00:07:21.980
And here is where we use the CDF
that we wrote out earlier.
00:07:21.980 --> 00:07:30.650
It's going to be 1 minus e
to the minus lambda t.
00:07:30.650 --> 00:07:35.550
So in this case, t is five
and lambda is 1/30.
00:07:35.550 --> 00:07:40.440
So it's minus 5/30 is
the probability.
00:07:40.440 --> 00:07:43.580
All right, now let's consider
the second case.
00:07:43.580 --> 00:07:47.690
The second case is that the
first student actually takes
00:07:47.690 --> 00:07:50.360
longer than five minutes.
00:07:50.360 --> 00:07:54.350
OK, so what happens
in that case?
00:07:54.350 --> 00:07:54.880
Here's five minutes.
00:07:54.880 --> 00:07:58.300
The first student came
to five minutes.
00:07:58.300 --> 00:08:00.665
The second student arrived,
and the first
00:08:00.665 --> 00:08:02.640
student is still going.
00:08:02.640 --> 00:08:06.320
So he goes for some
amount of time.
00:08:06.320 --> 00:08:10.310
And then whenever he finishes,
the second student continues.
00:08:10.310 --> 00:08:13.120
So now the question is, what
is the total amount of
00:08:13.120 --> 00:08:14.960
time in this case?
00:08:14.960 --> 00:08:21.220
Well, you can think
of it as using
00:08:21.220 --> 00:08:22.150
the memory list property.
00:08:22.150 --> 00:08:24.020
This is where it comes in.
00:08:24.020 --> 00:08:27.550
So the first five minutes, we
know that it was already taken
00:08:27.550 --> 00:08:31.390
because we're considering the
second scenario, which we're
00:08:31.390 --> 00:08:34.860
given that T1 is
greater than 5.
00:08:34.860 --> 00:08:38.190
And so the question now is, if
we know that, how much longer
00:08:38.190 --> 00:08:39.650
does it take?
00:08:39.650 --> 00:08:41.799
How much longer past the
five-minute mark does the
00:08:41.799 --> 00:08:43.049
first student take?
00:08:43.049 --> 00:08:46.570
And by the member list property,
we know that it's as
00:08:46.570 --> 00:08:49.210
if the first student
started over.
00:08:49.210 --> 00:08:51.800
So there was no memory of the
first five minutes, and it's
00:08:51.800 --> 00:08:55.310
as if the first student just
arrived also at the
00:08:55.310 --> 00:08:57.000
five-minute mark and met
with the professor.
00:08:57.000 --> 00:09:02.950
So past the five-minute mark,
it's as if you have a new
00:09:02.950 --> 00:09:06.300
exponential random variable,
still with mean 30.
00:09:06.300 --> 00:09:12.490
And so what we get is that,
in this case, you get the
00:09:12.490 --> 00:09:18.760
guaranteed five minutes, and
then you get the memory list
00:09:18.760 --> 00:09:25.860
continuation of the first
student's appointment.
00:09:25.860 --> 00:09:28.460
So you get another 30 minutes
on average because of the
00:09:28.460 --> 00:09:29.640
memory list property.
00:09:29.640 --> 00:09:32.470
And then whenever the first
student finally does finish
00:09:32.470 --> 00:09:35.950
up, the second student will
immediately take over because
00:09:35.950 --> 00:09:37.080
he has already arrived.
00:09:37.080 --> 00:09:38.580
It's past the five-minute
mark.
00:09:38.580 --> 00:09:41.520
And then that second student
will take, again, on average,
00:09:41.520 --> 00:09:42.530
30 more minutes.
00:09:42.530 --> 00:09:47.130
So what you get is, in this
case, the appointment lasts 65
00:09:47.130 --> 00:09:49.540
minutes on average.
00:09:49.540 --> 00:09:51.100
Now what is the probability
of this case?
00:09:51.100 --> 00:09:55.410
The probability of this case is
the probability that T1 is
00:09:55.410 --> 00:09:57.150
greater than 5.
00:09:57.150 --> 00:10:00.720
And now we know that that is
just the complement of this, 1
00:10:00.720 --> 00:10:01.520
minus that.
00:10:01.520 --> 00:10:04.050
So it's just e to
the minus 5/30.
00:10:06.840 --> 00:10:10.490
So now we have both scenarios.
00:10:10.490 --> 00:10:12.850
We have the probabilities of
each scenario, and we have the
00:10:12.850 --> 00:10:15.980
expectation under
each scenario.
00:10:15.980 --> 00:10:18.810
Now all that remains now is to
combine them using total
00:10:18.810 --> 00:10:20.060
expectation.
00:10:26.990 --> 00:10:36.880
So I really should have written
expectation of X given
00:10:36.880 --> 00:10:38.920
T1 is less than or
equal to 5 here.
00:10:38.920 --> 00:10:42.630
And this is expectation
of X given that T1 is
00:10:42.630 --> 00:10:44.840
greater than 5.
00:10:44.840 --> 00:10:49.840
So expectation of X overall is
the probability that T1 is
00:10:49.840 --> 00:10:54.250
less than or equal to 5 times
the expectation of X given
00:10:54.250 --> 00:10:59.190
that T1 is less than or equal to
5 plus the probability that
00:10:59.190 --> 00:11:04.790
T1 is greater than 5 times the
expectation of X given that T1
00:11:04.790 --> 00:11:07.640
is greater than 5.
00:11:07.640 --> 00:11:10.440
And we have all four of
these pieces here.
00:11:10.440 --> 00:11:23.220
so it's 35 times 1 minus e to
the minus 5/30 plus 65 times e
00:11:23.220 --> 00:11:26.650
to the minus 5 5/30.
00:11:26.650 --> 00:11:31.600
And it turns out that this
is approximately
00:11:31.600 --> 00:11:39.790
equal to 60.394 minutes.
00:11:39.790 --> 00:11:42.610
All right, so what
have we found?
00:11:42.610 --> 00:11:47.430
We found that the original guess
that we had, if we just
00:11:47.430 --> 00:11:50.360
had two meetings back to back,
was on average it would take
00:11:50.360 --> 00:11:51.310
60 minutes.
00:11:51.310 --> 00:11:55.150
It turns out that, because of
the way that things are set
00:11:55.150 --> 00:11:58.890
up, because of the five minute
thing, it actually takes a
00:11:58.890 --> 00:12:00.780
little longer than 60
minutes on average.
00:12:00.780 --> 00:12:01.700
And why is that?
00:12:01.700 --> 00:12:08.630
It's because the five sometimes
adds an extra
00:12:08.630 --> 00:12:13.930
buffer, adds a little bit of
extra amount, because it would
00:12:13.930 --> 00:12:18.820
have been shorter in this
scenario because, if the both
00:12:18.820 --> 00:12:21.030
students had arrived on time,
then the second student would
00:12:21.030 --> 00:12:23.570
have been able to pick up
right here immediately.
00:12:23.570 --> 00:12:26.180
And so both appointments would
have ended sooner.
00:12:26.180 --> 00:12:29.880
But because the second student
didn't arrive until five
00:12:29.880 --> 00:12:32.490
minutes, there was some empty
space that was wasted.
00:12:32.490 --> 00:12:36.140
And that's where you get you the
little bit of extra time.
00:12:36.140 --> 00:12:39.760
So this is a nice problem just
to get some more exercise with
00:12:39.760 --> 00:12:42.590
exponential random variables
and also nicely illustrates
00:12:42.590 --> 00:12:46.560
the memory list property, which
was a key points in
00:12:46.560 --> 00:12:47.680
order to solve this.
00:12:47.680 --> 00:12:52.170
And it also is nice because we
get to review a useful tool
00:12:52.170 --> 00:12:56.350
that we've been using all course
long, which is to split
00:12:56.350 --> 00:13:00.010
things into different scenarios
and then solve the
00:13:00.010 --> 00:13:02.770
simpler problems and then
combine them up, for example
00:13:02.770 --> 00:13:05.490
using total expectation.
00:13:05.490 --> 00:13:08.120
So I hope that was helpful,
and see you next time.