WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:05.300
Hi, welcome back to the probability lectures here on www.educator.com, my name is Will Murray.
00:00:05.300 --> 00:00:08.700
Today, we are going to talk about order statistics.
00:00:08.700 --> 00:00:13.200
I have to tell you what order statistics means, let us jump into that.
00:00:13.200 --> 00:00:15.000
I’m going to start out with an example question.
00:00:15.000 --> 00:00:22.600
I teach at a university and I'm wondering next semester, I know that I’m going to be teaching probability.
00:00:22.600 --> 00:00:28.900
I look at my class and I see all of that 30 people enrolled in my class next semester and I have never met any of them.
00:00:28.900 --> 00:00:32.300
I just got 30 random names and never met any of them.
00:00:32.300 --> 00:00:38.400
I wonder how tall is the tallest student in that class be?
00:00:38.400 --> 00:00:46.700
That is the kind of question that we are going to be answering using order statistics.
00:00:46.700 --> 00:00:53.300
I might wonder how tall is the tallest student in my class be, how tall will be the shortest student in my class be?
00:00:53.300 --> 00:00:58.000
Let me try to connect that with some variables.
00:00:58.000 --> 00:01:04.700
The idea here, we have N independent random variables with identical distributions.
00:01:04.700 --> 00:01:08.300
Their distribution function, we are going to call F of Y.
00:01:08.300 --> 00:01:10.800
Their density, we are going to call f of Y.
00:01:10.800 --> 00:01:14.000
Of course, that is always the derivative of the distribution.
00:01:14.000 --> 00:01:20.500
It is always the density, f is always F prime of Y.
00:01:20.500 --> 00:01:25.900
To connect that backup with the example, imagine I'm looking in my class for next semester,
00:01:25.900 --> 00:01:29.800
I’m saying I have 30 students in my class next semester.
00:01:29.800 --> 00:01:36.700
Each student represents a random variable and that random variable represents how tall that student is.
00:01:36.700 --> 00:01:43.500
I’m going to have 30 students in my class, that means I have Y1 through Y30, 30 different heights.
00:01:43.500 --> 00:01:50.700
I’m wondering, how tall will the tallest student in the class be and how tall will the shortest student in the class be?
00:01:50.700 --> 00:02:02.200
In order to study that, I'm going to define Y₁ to be the smallest or the minimum of the Y1 through YN.
00:02:02.200 --> 00:02:07.400
YN is the largest or the maximum of Y1 through YN.
00:02:07.400 --> 00:02:12.800
This notation is not very good, I’m following one of the standard textbooks in the field
00:02:12.800 --> 00:02:18.800
but this notation can be quite confusing for students, because there are two different Y1’s here.
00:02:18.800 --> 00:02:23.100
Let me quickly identify the difference here.
00:02:23.100 --> 00:02:28.100
This Y1 with no parentheses, that is just the first random variable.
00:02:28.100 --> 00:02:33.500
It is the first student that walks in my door, I’m going to call that person Y1.
00:02:33.500 --> 00:02:45.000
Y1 with parentheses, that means that I look at all the random variables in I select out the smallest one.
00:02:45.000 --> 00:02:49.900
I call that one (Y1), that is the smallest one.
00:02:49.900 --> 00:02:56.900
It is like, if I'm talking about my students in my class, Y1 with no parentheses
00:02:56.900 --> 00:03:01.400
is just the first student who walks in the door on the first day of the semester.
00:03:01.400 --> 00:03:07.200
Y₁ with parentheses means I wait till all my students come into the class.
00:03:07.200 --> 00:03:13.800
I ask them to all stand up, I look around, I find the shortest student in the class and I say you are Y₁.
00:03:13.800 --> 00:03:22.100
Y sub N without parentheses, that is the last random variable that you look at.
00:03:22.100 --> 00:03:27.700
That is kind of the last students that walks in the door of my classroom on the first day.
00:03:27.700 --> 00:03:33.800
Y sub N in parentheses is the largest of all of them.
00:03:33.800 --> 00:03:39.700
You look at all the variables and you pick whichever one is biggest.
00:03:39.700 --> 00:03:46.400
In the classroom example, that means that I wait for all of my students to file in.
00:03:46.400 --> 00:03:54.100
I ask them all to stand up, I see who is the tallest in the class and then I labeled that person as YN.
00:03:54.100 --> 00:03:57.900
It is the largest of all the variables.
00:03:57.900 --> 00:04:02.400
Make sure you do not get those mixed up.
00:04:02.400 --> 00:04:06.300
The Y₁ without parenthesis and Y₁ with parentheses,
00:04:06.300 --> 00:04:09.300
the Y sub N without parenthesis and Y sub N with parentheses.
00:04:09.300 --> 00:04:12.400
The question that we are going to try to solve today is,
00:04:12.400 --> 00:04:19.800
one of the distributions and densities of the minimum and maximum, Y₁ in parenthesis and Y sub N in parenthesis.
00:04:19.800 --> 00:04:26.400
Remember, we know the distributions and densities of the individual variables, F and f.
00:04:26.400 --> 00:04:31.600
F and f are known in terms of homework problems, they should be given to you.
00:04:31.600 --> 00:04:36.700
You should know the F and f of R.
00:04:36.700 --> 00:04:46.900
We are going to try to find distributions and densities of Y₁ and Y sub N in parenthesis.
00:04:46.900 --> 00:04:48.600
Let me give you some formulas for this.
00:04:48.600 --> 00:04:50.800
These formulas actually take a bit of work derive.
00:04:50.800 --> 00:04:55.300
I’m not showing you the whole derivation here but the distribution,
00:04:55.300 --> 00:04:59.400
it turns out that the simpler ones are for the maximum values.
00:04:59.400 --> 00:05:05.000
These first ones that I'm going to teach you are for the maximum values.
00:05:05.000 --> 00:05:09.300
And then, we will do the minimum one later because they are more complicated.
00:05:09.300 --> 00:05:15.100
I’m not showing you all the derivation but the distribution function here,
00:05:15.100 --> 00:05:21.900
the distribution is the probability that the maximum is less than some cutoff of Y.
00:05:21.900 --> 00:05:27.100
What is the probability, maybe that your tallest student will still be less than 7 feet tall.
00:05:27.100 --> 00:05:30.900
The way you get it is, you do F of Y ⁺N.
00:05:30.900 --> 00:05:44.400
F of Y is the distribution of the individual Yi’s.
00:05:44.400 --> 00:05:54.100
Little F of Y is the density function of the Y sub I, the density of Y sub i.
00:05:54.100 --> 00:06:00.200
F of Y and f of Y should be given to us.
00:06:00.200 --> 00:06:08.900
And then, we just drop them into these formulas f of Y is the derivative of F of Y.
00:06:08.900 --> 00:06:18.600
We can either remember the formula for it or we can work it out from the function for F.
00:06:18.600 --> 00:06:29.700
If you take the derivative of this then you get N × F of Y ⁺N-1 × its derivative, that is the chain rule kicking in there.
00:06:29.700 --> 00:06:32.400
The derivative of F is f.
00:06:32.400 --> 00:06:38.900
That is why we get that f that you have to tack on the end there.
00:06:38.900 --> 00:06:42.000
We are using the power rule and the chain rule there.
00:06:42.000 --> 00:06:45.000
For the minimum, it is a little more complicated.
00:06:45.000 --> 00:06:56.900
These formulas correspond to the minimum value, the smallest or the shortest student in my class.
00:06:56.900 --> 00:07:08.800
Right here, I forgot to mention that this is the density of the max.
00:07:08.800 --> 00:07:19.000
Here we are going to find the distribution of the minimum.
00:07:19.000 --> 00:07:26.000
The way you find it, I’m skipping the derivation here but the probability that the minimum will be less than Y.
00:07:26.000 --> 00:07:30.500
What is the probability that I will have a student below 5 feet tall in my class?
00:07:30.500 --> 00:07:33.400
What is the chance of having a student less than 5 feet tall?
00:07:33.400 --> 00:07:41.000
The way you do it is you use the distribution from your original Y and you can drop into this formula.
00:07:41.000 --> 00:07:51.800
And then, you take the derivative of that to get the density of the minimum.
00:07:51.800 --> 00:07:58.800
If we take the derivative of this, this initial 1 drops out because it is a constant.
00:07:58.800 --> 00:08:05.800
And then, we have by the power rule N × 1 - F of Y ⁺N -1.
00:08:05.800 --> 00:08:14.100
And then, we have the derivative of the inside stuff which is f of Y.
00:08:14.100 --> 00:08:20.600
That is of the formula that we are going to use to find the density function, for the minimum variable.
00:08:20.600 --> 00:08:26.300
That is a lot of formulas, I think it is good if we jump right into some examples and
00:08:26.300 --> 00:08:30.800
we practice those formulas and see how they work out.
00:08:30.800 --> 00:08:34.400
Let us start with example 1, we have 24 students in a class.
00:08:34.400 --> 00:08:39.500
Each one is writing a term paper and I guess the teacher said that paper can be any length
00:08:39.500 --> 00:08:42.400
from 0 to 7 pages, which is a little bit artificial.
00:08:42.400 --> 00:08:47.200
Usually, a teacher will say it is got to be 5 to 7 pages, but we are going to keep it simple.
00:08:47.200 --> 00:08:50.100
We are going to go 0 to 7 pages long.
00:08:50.100 --> 00:08:55.900
We want to find the density and the distribution functions for the length of the longest paper.
00:08:55.900 --> 00:09:00.200
Maybe, you are the teacher and you are wondering how much you are going to have to grade.
00:09:00.200 --> 00:09:04.900
You are wondering, what is the long paper that I’m going to read here?
00:09:04.900 --> 00:09:11.200
Let me start out by identifying the fact that we have a uniform distribution here.
00:09:11.200 --> 00:09:18.900
I need to find the density and distribution functions for the uniform distribution.
00:09:18.900 --> 00:09:24.700
We had a whole lecture on the uniform distribution.
00:09:24.700 --> 00:09:29.200
I will remind you what formulas we got for that.
00:09:29.200 --> 00:09:48.300
The density function for a uniform distribution on the interval from θ1 to θ2, the density is just 1/θ 2 - θ 1.
00:09:48.300 --> 00:09:52.800
In this case, it is 1/7 -0, just 1/7.
00:09:52.800 --> 00:10:01.000
The distribution function is F of Y, you integrate that from 0 to Y.
00:10:01.000 --> 00:10:04.600
You get, just the integral of that is just Y/7.
00:10:04.600 --> 00:10:10.000
That is, as Y goes from 0 to 7.
00:10:10.000 --> 00:10:14.700
I now have a f and F.
00:10:14.700 --> 00:10:21.000
It is easy now to use the formulas from the previous side to solve the rest of it.
00:10:21.000 --> 00:10:28.300
We are looking at the length of the longest paper, that F sub Y sub N,
00:10:28.300 --> 00:10:34.700
that is the maximum one, the max length of the paper, of Y.
00:10:34.700 --> 00:10:41.300
I will use the formula from the previous slide, it is F of Y ⁺N.
00:10:41.300 --> 00:10:59.200
In this case, N is 24 and F is Y/7 ⁺24.
00:10:59.200 --> 00:11:08.300
That is it for the distribution function, that is the distribution.
00:11:08.300 --> 00:11:15.600
The density function is f sub Y sub N of Y.
00:11:15.600 --> 00:11:21.500
You can take the derivative of the term above but you can also use the formula.
00:11:21.500 --> 00:11:24.300
I’m going to use the formula just to practice that.
00:11:24.300 --> 00:11:30.500
N × F of Y ⁺N-1 × f of Y.
00:11:30.500 --> 00:11:43.400
N is 24, F of Y is Y/7, N – 1 is 23, f of Y is 1/7
00:11:43.400 --> 00:11:47.600
It looks like this could simplify, combine the terms a little bit.
00:11:47.600 --> 00:11:57.000
24 × Y ⁺23 and now I have 1/7 ⁺23 in the denominator and one more factor of 7.
00:11:57.000 --> 00:12:06.000
I got 7 ⁺24, there, you could have gotten by taking the derivative of the distribution function.
00:12:06.000 --> 00:12:14.900
My range is still the same as before, Y goes from 0 to 7.
00:12:14.900 --> 00:12:26.400
That is what I have for my density function.
00:12:26.400 --> 00:12:32.100
Those are the distribution and the density functions for the length of the longest term paper,
00:12:32.100 --> 00:12:34.500
that will be submitted.
00:12:34.500 --> 00:12:36.800
Let me review the steps there.
00:12:36.800 --> 00:12:43.700
I first identified that we had a uniform distribution, I looked up my density function
00:12:43.700 --> 00:12:47.200
and my distribution functions for the uniform distribution.
00:12:47.200 --> 00:12:51.000
We have a whole lecture on the uniform distribution, earlier on this series.
00:12:51.000 --> 00:12:52.800
You can scroll back up and see it.
00:12:52.800 --> 00:12:58.300
I think it was the first continuous distribution that we study, it is the easiest one.
00:12:58.300 --> 00:13:04.400
The uniform distribution, the density function is always constant that is why it is uniform.
00:13:04.400 --> 00:13:08.600
It is 1/7 because our range is from 0 to 7.
00:13:08.600 --> 00:13:13.300
The distribution function, you integrate that from 0 to Y.
00:13:13.300 --> 00:13:17.100
If you integrate that from 0 to Y, you get Y/7.
00:13:17.100 --> 00:13:24.600
I'm using the two formulas for the distribution and density of the max value.
00:13:24.600 --> 00:13:31.200
That was on the previous side where I gave you the formulas for order statistics.
00:13:31.200 --> 00:13:45.300
F of Y ⁺N is Y/7 ⁺N, our N is 24, I forgot to put a nice box around that because that was my final answer for the distribution.
00:13:45.300 --> 00:13:54.500
My f of Y, if I just drop in N = 24, my F of Y and my f of Y,
00:13:54.500 --> 00:14:01.800
simplify that down I get the density function for the maximum value there.
00:14:01.800 --> 00:14:09.600
That is the end of example 1, I am going to reuse the setting for examples 2 and 3.
00:14:09.600 --> 00:14:12.100
I want to make sure that you understand this,
00:14:12.100 --> 00:14:17.800
in example 2 we are going to find the density and distribution for the length of the shortest term paper.
00:14:17.800 --> 00:14:27.200
Make sure that you remember what we came up with here, we will reuse these in examples 2 and 3.
00:14:27.200 --> 00:14:33.100
In example 2 here, this is a follow-up to example 1, the setting is the same.
00:14:33.100 --> 00:14:36.900
With 24 students in a class, they are each going to write a term paper.
00:14:36.900 --> 00:14:40.400
The papers length can be anywhere from 0 to 7 pages.
00:14:40.400 --> 00:14:49.100
Maybe, if a student has a really profound thought, the student could express her amazing thought in half of the page.
00:14:49.100 --> 00:14:53.800
It could be potentially 1/2 page term paper or can run as long as 7 pages.
00:14:53.800 --> 00:14:59.000
We want to find the distribution and density functions for the length of the shortest paper.
00:14:59.000 --> 00:15:04.900
We did already start figuring out some useful facts about this problem back in example 1.
00:15:04.900 --> 00:15:08.400
We figured out that this was a uniform distribution.
00:15:08.400 --> 00:15:17.600
I went back and looked up the density and distribution functions for the uniform distribution.
00:15:17.600 --> 00:15:26.500
What I figured out was that, my F of, Y my distribution function was Y/7.
00:15:26.500 --> 00:15:32.900
My f of Y was just a constant value 1/7.
00:15:32.900 --> 00:15:43.500
That is going to be very useful, now I'm going to invoke the formulas for, the shortest paper means Y₁.
00:15:43.500 --> 00:15:52.600
F sub Y₁ of Y, it is a little more complicated than what we had for the max values.
00:15:52.600 --> 00:16:08.600
The min value, its distribution function is 1 - (1-F of Y) ⁺nth.
00:16:08.600 --> 00:16:10.800
N is the number of variables that we are looking at.
00:16:10.800 --> 00:16:15.800
Here we have 24 students, N is 24.
00:16:15.800 --> 00:16:18.100
I'm going to plug in what I know here.
00:16:18.100 --> 00:16:23.800
By the way, this formula came from the formula in the introductory slide.
00:16:23.800 --> 00:16:26.100
I think it was the second slide of this lecture.
00:16:26.100 --> 00:16:31.100
Just go back and check to see the formulas, that is where this formula is coming from.
00:16:31.100 --> 00:16:49.200
That 1 - (1 -, my F of Y is Y/7, 1 - Y/7) ⁺nth or 24 here.
00:16:49.200 --> 00:17:03.500
That is 1 -, if I want to put those over a common denominator, it is not absolutely necessary but it will be 7 – Y/7 ⁺24.
00:17:03.500 --> 00:17:05.900
I do not think that is going to get any better.
00:17:05.900 --> 00:17:15.100
That is my distribution function that I just found, for the minimum value.
00:17:15.100 --> 00:17:21.900
Let me box that up because I'm going to submit that as my answer to the first part of the problem.
00:17:21.900 --> 00:17:28.900
Let us figure out the density, my f sub Y1 of Y.
00:17:28.900 --> 00:17:35.300
I could take the derivative of what I just figure out or I could use the formula from earlier on in a lecture.
00:17:35.300 --> 00:17:37.400
I think I’m going to practice using the formula.
00:17:37.400 --> 00:17:39.300
Let me remind you what that was.
00:17:39.300 --> 00:17:51.500
It was N × the (1 -F of Y), looking at myself here, to the N -1 × f of Y.
00:17:51.500 --> 00:18:05.400
Let me just plug in everything here, the N is 24, 1 - F of Y is 1 – y/7 ⁺23, my f of Y is 1/7.
00:18:05.400 --> 00:18:12.000
This will simplify a little bit, 24 ×, I can put over a common denominator.
00:18:12.000 --> 00:18:18.800
I get 7 - Y/7 ⁺23 × 1/7.
00:18:18.800 --> 00:18:27.300
Now, I can write this as 24, in the denominator I have7 ⁺24.
00:18:27.300 --> 00:18:33.400
I will have a 7 –Y ⁺23.
00:18:33.400 --> 00:18:37.200
What is my range, I forgot to mention the range on this.
00:18:37.200 --> 00:18:48.700
The Y is still going to go from 0 to 7, that is because the original distribution was Y going from 0 through 7 .
00:18:48.700 --> 00:19:00.900
That is the density function, I’m done with that problem.
00:19:00.900 --> 00:19:04.400
Let me review the steps and then I can move on.
00:19:04.400 --> 00:19:08.900
We have a uniform distribution, we already identified that back in example 1.
00:19:08.900 --> 00:19:12.900
We identify the distribution function F of Y is Y/7.
00:19:12.900 --> 00:19:20.700
Our density function was 1/7 and N = 24 because we are talking about 24 students here.
00:19:20.700 --> 00:19:27.300
And then, I used the two formulas that I gave you back on the second slide of this lecture.
00:19:27.300 --> 00:19:37.900
You can scroll back, you can see the distribution function in terms of F of Y and the density function for Y1,
00:19:37.900 --> 00:19:42.800
because we are talking about the shortest paper that is why we are looking at Y1.
00:19:42.800 --> 00:19:50.600
Those are the two formulas and then I just dropped in what my F of Y is, Y/7, dropped that into the formulas.
00:19:50.600 --> 00:19:58.800
F of Y is 1/7 and then I simplified it down to get a distribution function and a density function.
00:19:58.800 --> 00:20:07.500
These are both representing the density function and the distribution function for Y1, which is the shortest paper.
00:20:07.500 --> 00:20:14.400
If I'm wondering ahead of time, how long will the shortest paper be that this teacher is going to have to grade,
00:20:14.400 --> 00:20:21.400
then I would follow these density and distribution functions to calculate those probabilities.
00:20:21.400 --> 00:20:27.300
We are going to use this term paper example for one more problem here.
00:20:27.300 --> 00:20:32.900
Make sure you still understand the uniform distribution, as we move on to example 3.
00:20:32.900 --> 00:20:36.700
In example 3, just following up from example 1.
00:20:36.700 --> 00:20:40.700
We got 24 students in a class, each writing a term paper.
00:20:40.700 --> 00:20:45.400
The term papers lengths are uniformly distributed from 0 to 7 pages.
00:20:45.400 --> 00:20:51.300
Not a totally realistic example, but maybe some students are kind of lazy and returning very short term papers.
00:20:51.300 --> 00:20:54.800
Some students are very industrious and they are writing 7 good pages.
00:20:54.800 --> 00:20:58.800
We want to find the mean and variance for the length of the longest paper.
00:20:58.800 --> 00:21:01.900
The longest paper means the maximum value.
00:21:01.900 --> 00:21:12.500
We are going to be looking at Y sub N, the maximum value, when in parenthesis that is the maximum value.
00:21:12.500 --> 00:21:17.500
We are going to use some of the answers that we derived in example 1.
00:21:17.500 --> 00:21:23.800
Let me remind you of what we figured out in example 1.
00:21:23.800 --> 00:21:28.500
In example 1, we figured out the density and distribution functions.
00:21:28.500 --> 00:21:31.300
In particular, the density, that is what we are going to use.
00:21:31.300 --> 00:21:38.600
F sub Y, that is not a Y₁, that is F sub YN.
00:21:38.600 --> 00:21:52.100
I will remind you what we found in example 1, that was 24 × Y ⁺23 divided by 7 ⁺24.
00:21:52.100 --> 00:21:57.700
That is coming from example 1, if you are have not watched example 1 in the past few minutes,
00:21:57.700 --> 00:21:59.500
you might want to go back and just review that.
00:21:59.500 --> 00:22:06.100
Make sure you know where that is coming from, so it is not a total mystery in solving example 3.
00:22:06.100 --> 00:22:12.200
That is the density function for the longest paper.
00:22:12.200 --> 00:22:15.000
We want to find it is mean and variance.
00:22:15.000 --> 00:22:16.600
Let me walk you through that.
00:22:16.600 --> 00:22:21.600
The mean is the expected value of Y sub N.
00:22:21.600 --> 00:22:35.500
What we do, to find the expected value, you just do the integral of Y × the density function DY.
00:22:35.500 --> 00:22:37.800
We integrate over the full range of Y.
00:22:37.800 --> 00:22:48.000
In this case, this is the integral of Y × that density function we just figure out.
00:22:48.000 --> 00:22:57.200
Y ⁺24 now, I bumped up the power by 1 because I had that one extra Y and 7 ⁺24 in the denominator DY.
00:22:57.200 --> 00:23:02.200
I have to integrate this from 0 to 7, Y = 0 to 7.
00:23:02.200 --> 00:23:09.900
That integral is actually not that bad, the numbers are a little ugly, 24/7 ⁺24.
00:23:09.900 --> 00:23:13.000
I want to integrate Y ⁺24, this just a power rule.
00:23:13.000 --> 00:23:35.600
I get Y ⁺25/25 and if I evaluate that from Y= 0 to Y = 7 then what I get is 24 × 7 ⁺25, that is going to cancel, × 25.
00:23:35.600 --> 00:23:45.000
A lot of that is going to cancel, my mean or expected value is 24.
00:23:45.000 --> 00:23:59.100
24 of those 7’s are going to cancel, leaving you with just 1/7 in the numerator and 25 in the denominator.
00:23:59.100 --> 00:24:05.300
It looks like I'm done and there is going to be a lot of 24 and 25 in the variance, it is going to get even worse.
00:24:05.300 --> 00:24:11.600
Let me write this in terms of N, I think it will be a little more meaningful if I just use generic N here.
00:24:11.600 --> 00:24:21.000
This is 7N divided by N + 1 because remember the N here was the number students in the class, that is N = 24.
00:24:21.000 --> 00:24:29.000
7N/N + 1 is the expected value of the longest paper that I'm going to turn in.
00:24:29.000 --> 00:24:37.000
Notice by the way, if N is very large then the limit of that, as N gets very large is 7.
00:24:37.000 --> 00:24:41.200
It gets closer and closer to 7, as N gets larger and larger.
00:24:41.200 --> 00:24:46.400
That means that, the more students we have in this class, the more likely it is
00:24:46.400 --> 00:24:52.100
that someone is going to turn in the paper that is exactly or very close to 7 pages.
00:24:52.100 --> 00:24:57.900
The more students we have, the more likely it is that the longest paper will be about 7 pages.
00:24:57.900 --> 00:25:13.200
That kind of makes sense, if you have more students in a class, meaning N gets bigger,
00:25:13.200 --> 00:25:27.100
it is more likely that the longest paper is close to 7 pages.
00:25:27.100 --> 00:25:29.700
That really makes sense with your intuition.
00:25:29.700 --> 00:25:35.800
If you have just have two students in the class, might not be very likely that one is going to produce a 7 page paper.
00:25:35.800 --> 00:25:44.300
But, if you have 100,000 students in a class and their lengths are uniformly distributed from 0 to 7 pages,
00:25:44.300 --> 00:25:49.300
chances are you going to get 1 that is pretty close to 7 just because there is so many students.
00:25:49.300 --> 00:25:53.700
Variance is a lot messier here, let us calculate out the variance.
00:25:53.700 --> 00:26:00.100
Remember to find the variance of a variable, what you do is you do
00:26:00.100 --> 00:26:07.800
the expected value of Y² - the expected value of (Y)².
00:26:07.800 --> 00:26:13.200
What I'm going to do here is find the expected value of Y² first.
00:26:13.200 --> 00:26:22.900
E of Y² is the integral of Y² F of Y DY.
00:26:22.900 --> 00:26:29.200
I’m going to use Y² where I used Y before.
00:26:29.200 --> 00:26:41.000
I’m going to start using, the integral of 24 Y ⁺25, because I have Y ⁺23 and I bumped it up by 2 powers.
00:26:41.000 --> 00:26:49.700
We still have7 ⁺24, then I got my DY here.
00:26:49.700 --> 00:27:00.500
If I integrate that, I saw a 24/7 ⁺24, now Y ⁺26/26 by the power rule.
00:27:00.500 --> 00:27:04.400
This gives me a good form of old fashioned calculus here.
00:27:04.400 --> 00:27:24.300
Y = 0 to Y = 7 and I get 24/7 ⁺24 × 7 ⁺26/26, and that simplifies to,
00:27:24.300 --> 00:27:33.300
Because I can cancel a lot of the 7’s, 24 × 7²/26 there.
00:27:33.300 --> 00:27:39.600
Again, we have lots of 25, 24, 26, I think they are all coming from that original 24.
00:27:39.600 --> 00:27:43.400
I think it is useful to write this in terms N.
00:27:43.400 --> 00:27:56.600
What I’m getting here is 7² × N divided by N + 2.
00:27:56.600 --> 00:28:00.800
I’m going to bring in the expected value of Y, that part of the formula.
00:28:00.800 --> 00:28:14.000
My sigma² or my variance is E of Y² so 7² × N/N + 2 - the expected value of (Y)².
00:28:14.000 --> 00:28:16.900
The expected value of Y, I already worked out here.
00:28:16.900 --> 00:28:25.100
7/(N + 1)², that is going to get a little messy.
00:28:25.100 --> 00:28:37.300
7² N/N + 2 - 7² N²/N + 1².
00:28:37.300 --> 00:28:39.900
I think I can put those over common denominator.
00:28:39.900 --> 00:28:43.000
It actually gets a little messy and then it simplifies really nicely.
00:28:43.000 --> 00:28:47.700
Stick with me and I will show you how it works out because it is kind of fun when it simplifies.
00:28:47.700 --> 00:28:56.600
I have a 7² everywhere and then, I'm going to have N × N + 1² for the first term.
00:28:56.600 --> 00:29:02.800
My common denominator, I’m planning ahead is going to be N + 2 × N + 1².
00:29:02.800 --> 00:29:11.500
I did multiply that first term by N + 1², the second term have to multiply by N + 2, N² × N + 2.
00:29:11.500 --> 00:29:15.900
That looks pretty horrific but that numerator actually simplifies nicely.
00:29:15.900 --> 00:29:17.800
It did, when I work this out before.
00:29:17.800 --> 00:29:20.400
In fact, I can factor an N out of everything here.
00:29:20.400 --> 00:29:35.200
7² × N, and N + 1² is N² + 2N + 1 - N × N + 2 is N² + 2N.
00:29:35.200 --> 00:29:40.200
That is because I factored one of the N outside, there is 1N outside.
00:29:40.200 --> 00:29:46.800
I still have that same denominator, maybe I will write that down.
00:29:46.800 --> 00:29:54.300
Miracles, a lots of terms cancel, in fact the N² + 2N cancel.
00:29:54.300 --> 00:29:56.900
We are just left with the 1 in that numerator there.
00:29:56.900 --> 00:30:03.900
That simplifies down to 7² divided by, I still have that denominator,
00:30:03.900 --> 00:30:13.600
7² × N divided by the denominator N + 1² × N + 2.
00:30:13.600 --> 00:30:17.400
Of course, I was shooting for a number here, let me go ahead and fill in the number there.
00:30:17.400 --> 00:30:25.200
That 7² ×, my N was 24, I’m not going to multiply this out.
00:30:25.200 --> 00:30:35.500
N + 1² will be 25² and N + 2 is 26, that is my variance.
00:30:35.500 --> 00:30:44.000
Not the most illuminating answer in the world, not nearly as easily verified,
00:30:44.000 --> 00:30:49.400
or it does not easily conform to your intuition the same way the mean did.
00:30:49.400 --> 00:30:54.300
But it is a number, we have solved the problem.
00:30:54.300 --> 00:30:57.600
There is the mean and there is the variance of the longest paper.
00:30:57.600 --> 00:31:03.300
Let me review the steps there, I'm using the density function for the longest paper,
00:31:03.300 --> 00:31:06.300
for the maximum value that I figure out in example 1.
00:31:06.300 --> 00:31:13.400
If this part of the solution came as a total surprise to you, go back and watch example 1 and
00:31:13.400 --> 00:31:18.600
you will see where this comes from, 24Y³/7 ⁺24.
00:31:18.600 --> 00:31:25.600
And then, to find the mean, remember our original definition of the mean many lectures ago,
00:31:25.600 --> 00:31:30.300
was you just integrate Y × the density function.
00:31:30.300 --> 00:31:38.800
We are integrating Y × the density function, Y × Y ⁺23 gives me Y ⁺24, that is where that 24 came from.
00:31:38.800 --> 00:31:43.500
I bumped that power by 1 because of that extra Y there.
00:31:43.500 --> 00:31:47.700
When I did that integral, it turn out to be a pretty easy integral, just use the power rule.
00:31:47.700 --> 00:31:55.100
I dropped in my values, my range was Y goes from 0 to 7 that is
00:31:55.100 --> 00:31:58.800
because we are given this uniform distribution from 0 to 7 pages.
00:31:58.800 --> 00:32:11.100
That is where those limits came in, and when I dropped in the range of values Y goes from 0 to 7, I get 7 × 24/25.
00:32:11.100 --> 00:32:17.400
I noticed that, that was 7N/N + 1, I’m kind of like thinking of it in terms of N because,
00:32:17.400 --> 00:32:22.800
if you notice that when N goes to infinity, that gets very close to 7.
00:32:22.800 --> 00:32:29.200
The limit is 7 but when you plug in bigger and bigger values of N, it gets closer and closer to 7.
00:32:29.200 --> 00:32:37.400
That is not surprising, because if you think about it, if I have a very small class, if there are 5 people in the class,
00:32:37.400 --> 00:32:42.100
and I say we are all going to pick a length between 0 and 7 pages,
00:32:42.100 --> 00:32:45.700
it is not that likely that anybody is going to get that close to 7.
00:32:45.700 --> 00:32:51.800
But if you have a huge number of people in the class, if you have 5,000 people in your class
00:32:51.800 --> 00:32:57.700
Maybe it is some huge online class and they all write papers, and you look at the longest one.
00:32:57.700 --> 00:33:01.600
The chances are that the longest one, I picked term paper out of 5000 people,
00:33:01.600 --> 00:33:04.700
it is going to get pretty close to 7 pages.
00:33:04.700 --> 00:33:12.500
The more people you throw into the mix, the more likely it is that the longest one will get closer and closer to 7 pages.
00:33:12.500 --> 00:33:16.500
That is sort of very assuring.
00:33:16.500 --> 00:33:18.800
The variance does not work out quite nicely.
00:33:18.800 --> 00:33:27.800
First, I want to find E of Y² and that is because I'm remembering this old formula for the variance, E of Y² - the mean².
00:33:27.800 --> 00:33:34.100
To find E of Y², I did the same thing as with the expected value except we have Y²,
00:33:34.100 --> 00:33:40.700
instead of Y which means we are integrating Y ⁺25 instead of Y ⁺24 before.
00:33:40.700 --> 00:33:49.000
It is still an easy integral, plugging Y = 7 and I got 24⁷²/26.
00:33:49.000 --> 00:33:54.100
That is anticipating, all these different values of 24 and 25 and 26.
00:33:54.100 --> 00:33:56.700
I think it is easier to think of them in terms of N.
00:33:56.700 --> 00:34:05.400
I just wrote that as 7² × N/N + 2, remember my N was 24, number of students in the class.
00:34:05.400 --> 00:34:15.800
Using this formula, my variance is that E of Y² -, that 7/N + 1 that is coming from here.
00:34:15.800 --> 00:34:18.300
That is what we got dropped in here.
00:34:18.300 --> 00:34:22.800
And then, I got into some messy algebra.
00:34:22.800 --> 00:34:30.100
I was just putting these two terms over common denominator, I can factor out a 7²
00:34:30.100 --> 00:34:33.400
and I could also factor an N from both terms.
00:34:33.400 --> 00:34:37.500
My common denominator was N + 2 × N + 1².
00:34:37.500 --> 00:34:42.500
I’m going to multiply the first term by N + 1² and the second term by N + 2.
00:34:42.500 --> 00:34:47.100
After I factor out that N from both terms and I expanded both terms,
00:34:47.100 --> 00:34:53.400
I got something really cool because N + 1² gave me N² + 2N + 1.
00:34:53.400 --> 00:34:56.700
N × N2 gave me N² + 2N.
00:34:56.700 --> 00:35:01.000
All the terms dropped out and I’m just left with 1 there.
00:35:01.000 --> 00:35:04.300
I just simplify down the 7² × N.
00:35:04.300 --> 00:35:14.600
That is really nice, I’m going to translate it back into the N into 24 so I got an actual number for the variance.
00:35:14.600 --> 00:35:21.500
I do not bother to put that into a calculator, it is not the most revealing of numbers.
00:35:21.500 --> 00:35:26.400
You will notice when N gets very big, it goes to 0 which is kind of reassuring because with more and
00:35:26.400 --> 00:35:32.600
more students in the class, there is going to be less variance in the length of the longest paper.
00:35:32.600 --> 00:35:37.300
But beyond that, there is not too much to be insight to be gained from that expression.
00:35:37.300 --> 00:35:42.200
It is just a number and we know that it is right.
00:35:42.200 --> 00:35:48.600
Let us move on, in example 4, we have got a basketball team.
00:35:48.600 --> 00:35:53.900
The team has 10 players, it is a women's basketball team.
00:35:53.900 --> 00:36:02.800
Unfortunately, what happens with professional sports teams is that every so often somebody gets injured,
00:36:02.800 --> 00:36:04.100
it is just a fact of life
00:36:04.100 --> 00:36:09.900
If you are a coach, you do have to plan for there will be injuries from time to time.
00:36:09.900 --> 00:36:16.100
If you have 10 players, you never know, sometime during the season one of them might get injured.
00:36:16.100 --> 00:36:20.300
You have to worry about that and you have to plan for that.
00:36:20.300 --> 00:36:22.000
That is what this example is all about.
00:36:22.000 --> 00:36:27.800
We got 10 players, 5 of them will play at any given time, and then we got 5 reserves.
00:36:27.800 --> 00:36:32.300
We have been studying the sport of basketball for a long time.
00:36:32.300 --> 00:36:38.000
You have notice that over the long run, each player gets injured now and then.
00:36:38.000 --> 00:36:44.100
It is very hard to predict but on average, each player gets injured about once every 5 years.
00:36:44.100 --> 00:36:49.300
That is just an average, that certainly does not reflect individual player statistics.
00:36:49.300 --> 00:36:54.200
There might be unlucky players who get injured almost every year.
00:36:54.200 --> 00:36:58.900
There might be players who can go their whole careers without a major injury.
00:36:58.900 --> 00:37:06.200
We certainly hope to find players in the latter category but its very hard to predict.
00:37:06.200 --> 00:37:13.000
What you are trying to do as the coach of the team is, you got 10 healthy players right now,
00:37:13.000 --> 00:37:16.800
you are worried about when the first injury is going to come.
00:37:16.800 --> 00:37:22.200
What will be the first time that you have a player getting injured.
00:37:22.200 --> 00:37:24.800
We want to find the distribution and density functions for that.
00:37:24.800 --> 00:37:29.300
Then the following slide, in example 5, we are going to find the expected time,
00:37:29.300 --> 00:37:34.400
how long will it be until we see our first injury.
00:37:34.400 --> 00:37:36.600
Let us puzzle this out here.
00:37:36.600 --> 00:37:40.600
First thing we notice here is that this is an exponential distribution.
00:37:40.600 --> 00:37:47.600
That is actually very realistic description of real life here because a basketball injury
00:37:47.600 --> 00:37:54.400
is not something that happens with any regularity.
00:37:54.400 --> 00:38:03.600
It is every so often, it happens and it might happen twice in a month or it might never happen over the course of 10 years.
00:38:03.600 --> 00:38:05.100
There is no predicting in it.
00:38:05.100 --> 00:38:11.900
If you are safe for 5 years, it does not mean that you would not get injured tomorrow, unfortunately.
00:38:11.900 --> 00:38:16.200
Let me remind you what the exponential distribution is all about.
00:38:16.200 --> 00:38:29.900
It has density function f sub Y is 1/β × E ⁻Y/β, where Y goes from 0 to infinity.
00:38:29.900 --> 00:38:36.000
By the way, the exponential distribution is part of the family of gamma distributions.
00:38:36.000 --> 00:38:40.000
We have a lecture on the gamma distribution earlier on in the series,
00:38:40.000 --> 00:38:43.100
it was in the chapter on continuous distributions.
00:38:43.100 --> 00:38:49.200
If you do not remember the exponential distribution at all, it is a very good time now to go back and check it out,
00:38:49.200 --> 00:38:54.100
and get yourself understanding the exponential distribution again.
00:38:54.100 --> 00:38:58.400
One thing you learn is that the mean of the exponential distribution is this β.
00:38:58.400 --> 00:39:06.400
That means, we have been given that the mean is 5 years, β here is 5.
00:39:06.400 --> 00:39:12.700
Our f sub Y is 1/5 E ⁻Y/5.
00:39:12.700 --> 00:39:18.600
Our F, that is the distribution function, what we just found before was the density function.
00:39:18.600 --> 00:39:23.100
F is you will integrate the density function.
00:39:23.100 --> 00:39:29.200
I’m going to integrate from 0 to Y of 1/5 E ⁻T /5.
00:39:29.200 --> 00:39:35.100
I got to call it T, since my Y of U is elsewhere.
00:39:35.100 --> 00:39:41.200
The integral of E ⁻T/5 is just -5 E ⁻T/5.
00:39:41.200 --> 00:39:46.700
But the 5 and 1/5 cancel, it is -E ⁻T/5.
00:39:46.700 --> 00:39:49.100
I did a u substitution there in my integration.
00:39:49.100 --> 00:39:52.600
If you are not comfortable with that, you may work it out yourself.
00:39:52.600 --> 00:39:59.600
I did u substitution, u = -T/5.
00:39:59.600 --> 00:40:02.700
And then, I have worked out my DU as well.
00:40:02.700 --> 00:40:06.000
You might want to fill in that step yourself.
00:40:06.000 --> 00:40:12.100
I’m integrating this from T = 0 to T = Y.
00:40:12.100 --> 00:40:24.400
If I plug in T= Y, I get -E ⁻Y/5 and if I plug in T = 0, I get E⁰.
00:40:24.400 --> 00:40:30.300
It is negative, it is a +, it is – a negative so it is +.
00:40:30.300 --> 00:40:37.100
E⁰ is 1, that is my distribution function, my F of Y.
00:40:37.100 --> 00:40:48.400
That is kind of describing the individual × until injury for each one of the players on this team.
00:40:48.400 --> 00:40:57.100
That is kind of describing the density and distribution functions for Y1 up to, I guess we got 10 players on this team.
00:40:57.100 --> 00:41:04.100
What we are worried about as a coach is, how long it will be until we see the first injury on this team?
00:41:04.100 --> 00:41:08.500
Right now, we got 10 healthy players, we would certainly like to keep them all healthy
00:41:08.500 --> 00:41:12.700
but we know that is a sooner or later, we might have an injury.
00:41:12.700 --> 00:41:16.700
We are worried about when that first injury will come.
00:41:16.700 --> 00:41:20.900
The first injury will be the minimum value of the Y.
00:41:20.900 --> 00:41:37.900
The first injury will be the minimum of the Yi, which remember is what we are calling Y₁ in parentheses.
00:41:37.900 --> 00:41:43.800
We want to figure out the density and distribution functions for Y₁.
00:41:43.800 --> 00:41:51.100
We have a formula for that, that formula I will remind you what it is.
00:41:51.100 --> 00:41:54.700
But if you do not remember where you saw before, it was on the second slide of this lecture.
00:41:54.700 --> 00:41:58.700
Just scroll back and you will see the second slide of this lecture.
00:41:58.700 --> 00:42:10.700
The distribution function for the minimum value is 1 - (1-F of Y) ⁺N.
00:42:10.700 --> 00:42:17.600
This work out fairly nicely, this is 1 -, it is going to be a little messy at first.
00:42:17.600 --> 00:42:28.200
F of Y itself is 1 – E ⁻Y/5 ⁺nth.
00:42:28.200 --> 00:42:41.600
Those 1 - in the inside cancel, we just get 1 - E ⁻Y/5.
00:42:41.600 --> 00:42:48.000
N is the number of variables we have, that is 10.
00:42:48.000 --> 00:42:53.600
This is 1 - E ^, I can multiply those exponents there.
00:42:53.600 --> 00:43:04.000
E ⁻2Y, that is my distribution function for the minimum of those variables.
00:43:04.000 --> 00:43:19.500
F sub Y1 is the density function, let me write that what I found there was the distribution function.
00:43:19.500 --> 00:43:24.700
The density function, I could just take the derivative of the distribution function, that is what I just found.
00:43:24.700 --> 00:43:27.700
It would be quite easy to do that.
00:43:27.700 --> 00:43:32.400
What I like to do is practice the formula that I gave you earlier on in this lecture.
00:43:32.400 --> 00:43:34.600
Probably, it would be faster to take the derivative.
00:43:34.600 --> 00:43:36.700
I just want to remind you of the formula.
00:43:36.700 --> 00:43:47.700
It is N × 1 - F of Y ⁺N-1 × f of Y.
00:43:47.700 --> 00:43:55.000
If I fill in what those are, N is 10, 1 - F of Y, that is the same thing that I figure out before.
00:43:55.000 --> 00:44:01.900
1 - (1 – E ⁻Y/5)⁹.
00:44:01.900 --> 00:44:10.700
That f of Y is 1/5 E ⁻Y/5.
00:44:10.700 --> 00:44:15.400
I see that I got a 10 × 1/5, that is 2.
00:44:15.400 --> 00:44:24.100
Here that is E ⁻Y/5, it is getting a little messy there.
00:44:24.100 --> 00:44:29.500
I can do better than that, here is –Y/5 ⁺10.
00:44:29.500 --> 00:44:39.200
It is to the 9th power, but then I got one more E ⁻Y/5, that 1/5 combine with the 10.
00:44:39.200 --> 00:44:57.100
This simplifies down to 2E ⁻Y/5 to the × 10 because we got E ⁻Y/5⁹ and E ⁻Y ⁺1st, × 10.
00:44:57.100 --> 00:45:11.400
This is 2E ^-, 10/5 is 2, make 2E ^- 2Y, that is my density function.
00:45:11.400 --> 00:45:19.700
As I mentioned before, the much quicker way to find that would be to have taken the derivative here.
00:45:19.700 --> 00:45:29.800
This is just, if we done D by DY of the distribution function, the derivative of –E ⁻2Y is just positive 2E ⁻TY.
00:45:29.800 --> 00:45:31.900
That would be much quicker way to do it.
00:45:31.900 --> 00:45:38.000
I just want to practice the formula that I gave you on the opening slides of this lecture.
00:45:38.000 --> 00:45:46.000
In case you want to find the density function immediately, without sort of detouring through the distribution function.
00:45:46.000 --> 00:45:52.400
That answers our two questions here, we got the distribution and density functions for the time until injury.
00:45:52.400 --> 00:45:57.300
I did not really tell you the range on that, but it is the same range on your initial Y.
00:45:57.300 --> 00:46:02.700
Let me throw that in here, 0 less than Y less than infinity.
00:46:02.700 --> 00:46:08.400
In the worst of luck, it could happen right there on the first day, somebody gets injured.
00:46:08.400 --> 00:46:14.000
If we are very lucky, it could go forever without an injury.
00:46:14.000 --> 00:46:19.000
Let me review the steps here. First thing I did was focus on the word exponential distribution.
00:46:19.000 --> 00:46:27.200
The exponential distribution, as I learned when I studied the gamma distribution in the earlier lecture is,
00:46:27.200 --> 00:46:32.000
its density function is 1/β E ⁻Y/β.
00:46:32.000 --> 00:46:39.000
Its range is from 0 to infinity, in this case the mean is always β but we are given a mean of 5.
00:46:39.000 --> 00:46:42.200
Our β is 5, in this case.
00:46:42.200 --> 00:46:44.300
I just dropped in β = 5 here.
00:46:44.300 --> 00:46:50.000
The exponential distribution is a very good model of this physical situation,
00:46:50.000 --> 00:46:54.200
because an injury is something that you absolutely cannot predict.
00:46:54.200 --> 00:47:01.300
It is not the kind of thing that, if you stay healthy all through this month,
00:47:01.300 --> 00:47:05.600
it does not mean that you are more or less likely to get injured next month.
00:47:05.600 --> 00:47:10.800
That is exactly the kind of behavior that the exponential distribution models.
00:47:10.800 --> 00:47:16.200
In fact, I think that when we learned about the exponential distribution, I called it the memoryless distribution.
00:47:16.200 --> 00:47:20.700
Meaning that, if you stay healthy all through 1 month, next month is you sort of do not remember
00:47:20.700 --> 00:47:26.800
that you are healthy last month, you just get a fresh start in the second month.
00:47:26.800 --> 00:47:31.700
That was the density function for the exponential distribution.
00:47:31.700 --> 00:47:38.100
The distribution function there is, you take the integral of the density function.
00:47:38.100 --> 00:47:42.600
I changed my variable to T because I want to integrate from 0 to Y.
00:47:42.600 --> 00:47:48.700
Integrating that, I did a u substitution here, actually I did it my head.
00:47:48.700 --> 00:47:53.900
I integrated that and I got 1 - E ⁻Y/5.
00:47:53.900 --> 00:47:58.600
Remember here that you cannot ignore the T = 0 terms.
00:47:58.600 --> 00:48:08.400
You got to include that T = 0 term because when you plug in 0, you did get the number 1 there.
00:48:08.400 --> 00:48:11.300
You cannot drop that out, that is where that 1 came from.
00:48:11.300 --> 00:48:18.800
The T = Y gave me the E ⁻Y/5, that is my distribution function.
00:48:18.800 --> 00:48:25.400
Those all represented the density or distribution functions for individual players,
00:48:25.400 --> 00:48:33.600
that represents the waiting time for an individual player to experience an injury.
00:48:33.600 --> 00:48:39.700
What the problem was actually asking is, we have 10 of those players,
00:48:39.700 --> 00:48:44.200
there are 10 different players that are all running around, hopefully, none of them gets injured.
00:48:44.200 --> 00:48:51.300
What we are worried about is that each one of them has a possibility of getting injured.
00:48:51.300 --> 00:48:56.000
I’m wondering about how long we are going to have to wait until the first one gets injured?
00:48:56.000 --> 00:49:02.600
As soon as we have one injured player, it is really is going to change our coaching strategy on the team.
00:49:02.600 --> 00:49:09.700
The first injury that means the shortest time which one of those players is going to get injured in the shortest time.
00:49:09.700 --> 00:49:15.300
That is the minimum of the Yi, that is exactly Y₁, that is the one in parentheses.
00:49:15.300 --> 00:49:21.400
I’m going to use my formulas to calculate the distribution and density for Y₁.
00:49:21.400 --> 00:49:26.100
My formulas tell me, these are the formulas from the second slide of this lecture.
00:49:26.100 --> 00:49:32.500
Just scroll back, there is the formula for the distribution and there is the formula for the density.
00:49:32.500 --> 00:49:38.600
Then, I just go through and wherever I see a F, I fill in this.
00:49:38.600 --> 00:49:47.600
Wherever I see a f, there is a f right there, I fill in the density function for the exponential distribution.
00:49:47.600 --> 00:50:01.200
The nice thing is there is a lot of 1 – F, 1 - F actually simplify down really nicely into E ⁻Y/5.
00:50:01.200 --> 00:50:08.000
Both ×, I had a 1 – F and simplify down into E ⁻Y/5.
00:50:08.000 --> 00:50:14.600
When I put in my exponent N = 10, that was because there were 10 players right there.
00:50:14.600 --> 00:50:17.900
We got a simpler form for the distribution function.
00:50:17.900 --> 00:50:21.200
After some work, I got a simpler form for the density function.
00:50:21.200 --> 00:50:29.900
Of course, if I wanted to save time and really use every resource, I would not have use this formula for the density function.
00:50:29.900 --> 00:50:34.400
I would just started with the distribution function and taken its derivatives.
00:50:34.400 --> 00:50:42.200
If you take its derivative, you get the density function very quickly to be 2E ⁻2Y.
00:50:42.200 --> 00:50:48.300
I want you to really make sure you understand these answers from example 4,
00:50:48.300 --> 00:50:52.600
because in example 5, we are going to revisit this example.
00:50:52.600 --> 00:50:58.900
We are going to take it a little farther, we are going to calculate the expected time until the first injury.
00:50:58.900 --> 00:51:02.500
We will use these answers, I will not derive them again from scratch.
00:51:02.500 --> 00:51:06.900
We will figure out the expected time until the first injury.
00:51:06.900 --> 00:51:12.900
If you understand these answers, it will make example 5 make a lot more sense.
00:51:12.900 --> 00:51:15.700
Let us go ahead and take a look at that.
00:51:15.700 --> 00:51:19.700
Example 5 here is a follow-up to example 4.
00:51:19.700 --> 00:51:24.300
If you have not just watched example 4, you really need to understand example 4
00:51:24.300 --> 00:51:27.600
before you can make some sense of example 5.
00:51:27.600 --> 00:51:33.000
The situation back then, you have a basketball team with 10 players.
00:51:33.000 --> 00:51:38.600
Each player, we are worried about how long it would be until she experiences some kind of injury.
00:51:38.600 --> 00:51:44.300
Because that is unfortunately what happens with basketball team, every now and then a player gets injured.
00:51:44.300 --> 00:51:51.100
We are interested in finding the expected time until the team's first injury.
00:51:51.100 --> 00:51:55.300
Let me remind you what we figure out in example 4.
00:51:55.300 --> 00:52:01.000
We figured out that the time until the team's first injury.
00:52:01.000 --> 00:52:12.500
The first injury means, we are looking at Y₁, the minimum time until an injury among all those players.
00:52:12.500 --> 00:52:28.000
We figured out in example 4, the density function for F of Y₁ which I will remind you was 2E ⁻2Y.
00:52:28.000 --> 00:52:38.200
2E ⁻2Y, that is the density function for Y₁ and that came from quite a bit of work in example 4.
00:52:38.200 --> 00:52:44.100
I’m not going to repeat that but if you think that that is coming out of left field,
00:52:44.100 --> 00:52:49.800
I’m mixing my sports metaphors, this is a basketball team and nothing should come out of the field.
00:52:49.800 --> 00:52:54.000
Go back and look at example 4, that should all make sense to you.
00:52:54.000 --> 00:53:00.100
I want to find the expected value of Y1.
00:53:00.100 --> 00:53:04.600
What I do, there is a quick way to do this and I’m going to hold off from that.
00:53:04.600 --> 00:53:08.200
I’m going to do it using the definition, and then we will go back and
00:53:08.200 --> 00:53:11.700
see how we could have found the expected value very quickly.
00:53:11.700 --> 00:53:17.600
Let me find the expected value, sort of not using any special cleverness here.
00:53:17.600 --> 00:53:23.700
Remember, it is the integral of Y × F of Y DY.
00:53:23.700 --> 00:53:34.300
In this case, it is the integral of Y × my F of Y is 2E ⁻2Y DY.
00:53:34.300 --> 00:53:37.600
I need to do a little integration by parts to make that work.
00:53:37.600 --> 00:53:42.100
Let me go ahead and integrate by parts.
00:53:42.100 --> 00:53:45.700
Here is tabular integration because I'm feeling lazy.
00:53:45.700 --> 00:53:56.700
E⁻² Y, take derivatives on the left 2Y, the derivative of Y is 2, the derivative of the constant is 0.
00:53:56.700 --> 00:54:03.100
The integral of E ⁻2Y is -1/2 E ⁻2Y.
00:54:03.100 --> 00:54:30.400
The integral of that is +1/4 E ⁻2Y + -, the integral there is, 2Y × -1/2 is –Y E ⁻2Y – 2/4 that is ½ E ⁻2Y.
00:54:30.400 --> 00:54:38.100
I’m dividing this over the whole range of Y, which I neglected to mention before, Y goes from 0 to infinity.
00:54:38.100 --> 00:54:41.900
Of course, you can figure that out by looking at the exponential distribution or
00:54:41.900 --> 00:54:47.100
by sort of understanding the physical setup of the problem.
00:54:47.100 --> 00:54:52.200
The time until the first injury could be as small as 0, if you get an injury right away.
00:54:52.200 --> 00:54:59.300
Or it could that be arbitrarily long, if you are lucky, your basketball team will play for 50 years without ever getting injured.
00:54:59.300 --> 00:55:01.900
It is unlikely but you can certainly have that.
00:55:01.900 --> 00:55:09.400
I’m integrating this from Y = 0 or evaluating this from Y =0 to infinity.
00:55:09.400 --> 00:55:17.200
If we plug in Y = infinity, these exponential terms are going to drag everything to 0.
00:55:17.200 --> 00:55:25.400
You can do a Patel’s rule on that or you can just know that exponential terms in the denominator will always be polynomials.
00:55:25.400 --> 00:55:30.800
I'm not even going to worry about my exponential terms, they are both 0.
00:55:30.800 --> 00:55:34.800
If I plug in Y = 0, I get 0 for the first term.
00:55:34.800 --> 00:55:47.300
In the second term, I get + because it is - a negative, + ½ E⁰ + ½ E⁰ which is ½.
00:55:47.300 --> 00:55:53.400
What that means is that, if you are this basketball team coach and
00:55:53.400 --> 00:56:00.000
you are wondering how long is it going to be until I see an injury in one of my players.
00:56:00.000 --> 00:56:08.700
The expected time, you hope not to injure anyone ever,
00:56:08.700 --> 00:56:17.200
but the expected time until your first player gets injured is 1/2 a year, 6 months, that is not so good.
00:56:17.200 --> 00:56:20.900
Dangerous sport, stay away from it.
00:56:20.900 --> 00:56:26.600
If you got 10 people on the court playing at the same time and you keep them playing hard,
00:56:26.600 --> 00:56:32.500
chances are in about 6 months, you are going to see your first injury.
00:56:32.500 --> 00:56:40.200
That is the unfortunate consequence of your probability here of having 10 people play basketball at once.
00:56:40.200 --> 00:56:45.200
I mention that there was actually a quick way to figure this out.
00:56:45.200 --> 00:56:49.500
Let me show you now how we could have done that, it could have saved a lot of work here,
00:56:49.500 --> 00:56:59.700
which is to look back at that distribution that we had there.
00:56:59.700 --> 00:57:04.800
Notice that, this is another exponential distribution.
00:57:04.800 --> 00:57:12.400
This is exponential, let me remind you of the form of an exponential distribution.
00:57:12.400 --> 00:57:20.100
It has density function F of Y is equal to 1/β E ⁻Y/β.
00:57:20.100 --> 00:57:25.300
That is the density function for an exponential distribution.
00:57:25.300 --> 00:57:35.400
What we have is something that exactly matches that, if we take our β equal to ½ because 1/½ is exactly 2.
00:57:35.400 --> 00:57:43.900
We have an exponential distribution here.
00:57:43.900 --> 00:57:51.000
The expected value of the exponential distribution, the mean of the exponential distribution is β.
00:57:51.000 --> 00:57:54.800
This is a property that we learned about the exponential distribution long ago,
00:57:54.800 --> 00:57:56.900
when we are studying the gamma distribution.
00:57:56.900 --> 00:58:02.100
That was because the exponential distribution was a special case of the gamma family.
00:58:02.100 --> 00:58:10.800
Μ = β is ½ and that is really all we needed to do, if we had noticed that.
00:58:10.800 --> 00:58:15.100
We could have saved ourselves from walking through that long integration by parts.
00:58:15.100 --> 00:58:22.600
I guess it was not that bad, but it is really useful to recognize a distribution, if it does fall into one of your known families.
00:58:22.600 --> 00:58:28.500
And, to be able to draw some conclusions about it right away.
00:58:28.500 --> 00:58:31.800
Let me generalize this a little bit, we already have our answer here.
00:58:31.800 --> 00:58:38.100
We know that it is going to be about 6 months until our team's first injury, that is our expected time.
00:58:38.100 --> 00:58:41.200
Let me mention where that 2 came from.
00:58:41.200 --> 00:58:48.300
If you look back in example 4, where that 2 came from was, it just came from the 10 divided by the 5.
00:58:48.300 --> 00:58:59.300
10 was the number of players on the team and 5 was the mean of the original distribution.
00:58:59.300 --> 00:59:08.700
That ½ in turn came from the 5 divided by the 10, which in turn the 5 was the β,
00:59:08.700 --> 00:59:10.800
the mean of the original distribution.
00:59:10.800 --> 00:59:16.300
And, 10 was the number of players so β /N.
00:59:16.300 --> 00:59:30.800
I'm going to try to write this in general here, without making reference to specific numbers.
00:59:30.800 --> 00:59:45.300
In general, if Y1 through YN are exponential with mean β then, let me write that β a little more clear.
00:59:45.300 --> 01:00:07.600
Then, Y1 the minimum of the Yi’s, the minimum of Y1 through YN is exponential.
01:00:07.600 --> 01:00:17.100
We can say what the mean of that is with the new mean is going to be β/N.
01:00:17.100 --> 01:00:24.300
And that is not too surprising, if you kind of think about this basketball player example.
01:00:24.300 --> 01:00:29.800
If I have 10 players, on the average each one gets injured every 5 years.
01:00:29.800 --> 01:00:34.200
If I’m sitting around waiting for one of them to get injured, which I hope I'm not.
01:00:34.200 --> 01:00:38.900
Maybe, I’m the team doctor and I'm wondering when I'm going to have a job to do.
01:00:38.900 --> 01:00:43.900
If there is 10 people, each one getting injured every 5 years,
01:00:43.900 --> 01:00:47.200
on the average you are going to have one getting injured every half year.
01:00:47.200 --> 01:00:53.300
That is really not surprising, that is just 5 divided by 10.
01:00:53.300 --> 01:00:59.700
If you start out with an exponential distribution with mean β and cobble together N of them,
01:00:59.700 --> 01:01:06.000
and look at the minimum then it is exponential with mean β/N.
01:01:06.000 --> 01:01:11.900
That is not too surprising, if you can think about the basketball players.
01:01:11.900 --> 01:01:15.900
That wraps up example 5, let me review the steps here.
01:01:15.900 --> 01:01:24.800
The key step here came from example 4, where we identified Y1 is the minimum of these Yi’s.
01:01:24.800 --> 01:01:30.200
Yi is the time for each player to get injured, which hopefully is long.
01:01:30.200 --> 01:01:34.700
Y1 is the first player to get injured, Y1 is what you are worried about.
01:01:34.700 --> 01:01:38.000
As a coach, you do not want any of your players to get injured.
01:01:38.000 --> 01:01:44.600
You worry about when it will be until your first player gets injured and forces you to change your team strategy.
01:01:44.600 --> 01:01:48.500
We calculated the minimum, and back in example 4,
01:01:48.500 --> 01:01:55.300
we calculated the density function for the minimum as 2E ^- 2Y.
01:01:55.300 --> 01:02:01.700
The long way to find the expected value of that is to use the definition of expected value.
01:02:01.700 --> 01:02:07.300
Definition of expected values says you integrate Y × the density function.
01:02:07.300 --> 01:02:10.200
That is what I did there, I dropped in the density function.
01:02:10.200 --> 01:02:13.600
I did the integral using integration by parts.
01:02:13.600 --> 01:02:20.500
If that tabular integration was unfamiliar to you, I covered that in my calculus 2 lectures here on www.educator.com.
01:02:20.500 --> 01:02:29.400
You can look at the calculus 2 lectures and you can find a section on integration by parts.
01:02:29.400 --> 01:02:31.500
It shows you a little short hand trick there.
01:02:31.500 --> 01:02:33.900
When I plug in the infinity, they all dropped out.
01:02:33.900 --> 01:02:43.500
When I plug in 0, I got exactly ½, my expected time is ½ a year which I translated into 6 months.
01:02:43.500 --> 01:02:54.600
That was the long way, the short way is to look back at this density function and recognize that as an exponential distribution.
01:02:54.600 --> 01:03:01.400
It is just an exponential distribution with a new β, β is ½.
01:03:01.400 --> 01:03:06.100
If you know your exponential distribution, you know the mean is just β.
01:03:06.100 --> 01:03:12.900
I could have immediately jump to my answer there of 1/2 a year,
01:03:12.900 --> 01:03:16.900
without ever having to do that integral and all that integration by parts.
01:03:16.900 --> 01:03:24.900
And then, I extrapolated that a little bit because I figure out that that ½ came from 5/10.
01:03:24.900 --> 01:03:30.600
If you go back and look at example 4, you will see that that 2 came from 10/5.
01:03:30.600 --> 01:03:34.400
And then, the ½ came from 1/2
01:03:34.400 --> 01:03:36.600
In turn, that comes from 5/10.
01:03:36.600 --> 01:03:41.100
The 5 and 10 comes from the original problem.
01:03:41.100 --> 01:03:44.400
The 5 was β and the 10 was the N.
01:03:44.400 --> 01:03:47.400
There is the N and there is the β.
01:03:47.400 --> 01:03:50.000
The ½ came from β/N.
01:03:50.000 --> 01:03:58.000
We have an exponential distribution with the new β is the old β divided by the old N.
01:03:58.000 --> 01:04:05.100
That is a general principle there, if you have N exponential variables with the mean of β,
01:04:05.100 --> 01:04:10.300
then their minimum will be exponential with mean β/N.
01:04:10.300 --> 01:04:15.000
That is a very useful property and it kind of explains this idea,
01:04:15.000 --> 01:04:22.100
if you are wondering when your first player will get injured, every player gets injured, on average once every 5 years.
01:04:22.100 --> 01:04:27.200
If you got 10 players, you are going to have people getting injured once every 6 months on average.
01:04:27.200 --> 01:04:32.900
That is just 5 years divided by 10, gives you the 6 months, that gives you 1/2 year.
01:04:32.900 --> 01:04:41.800
That kind of explains and sort of justifies and reassures that all of our mathematics is correct there.
01:04:41.800 --> 01:04:45.400
That wraps up our lecture here on order statistics.
01:04:45.400 --> 01:04:51.000
This is part of the larger series on probability here on www.educator.com.
01:04:51.000 --> 01:04:53.400
I'm your host along the way, my name is Will Murray.
01:04:53.400 --> 01:04:56.000
I thank you very much for joining me today, bye now.