WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:06.800
Hi, welcome back to the probability lectures here on www.educator.com, my name is Will Murray.
00:00:06.800 --> 00:00:09.800
We have been working through the continuous distributions.
00:00:09.800 --> 00:00:13.800
We have done the uniform distribution and the normal distribution.
00:00:13.800 --> 00:00:19.400
Today, we are going to talk about the Gamma distribution which is actually a whole family of distribution.
00:00:19.400 --> 00:00:21.900
I will describe that as we get into it.
00:00:21.900 --> 00:00:27.000
There are a couple of very important special cases of the Gamma distribution,
00:00:27.000 --> 00:00:30.900
which are the exponential distribution and the Chi square distribution.
00:00:30.900 --> 00:00:34.400
I will talk about those as we get into it.
00:00:34.400 --> 00:00:38.000
First, I’m going to talk about the Gamma distribution, in general.
00:00:38.000 --> 00:00:45.100
And then, I will talk about the specific special cases of the exponential distribution and the Chi square distribution.
00:00:45.100 --> 00:00:51.000
We will also do plenty of problems on it, I hope you will be an expert by the time we get through this.
00:00:51.000 --> 00:00:56.200
Before I talk about the Gamma distribution, I have to tell you about the Gamma function.
00:00:56.200 --> 00:01:02.000
It is a very confusing thing because there is a Gamma distribution which is a probability distribution and
00:01:02.000 --> 00:01:07.600
there is also something called the Gamma function which is part of the Gamma distribution.
00:01:07.600 --> 00:01:11.200
It gets a little bit confusing, I will try to keep it straight for you.
00:01:11.200 --> 00:01:17.300
The Gamma function is defined by this integral formula right here.
00:01:17.300 --> 00:01:21.800
The input to the Gamma function is a number α.
00:01:21.800 --> 00:01:29.200
You think of α as being a number like 3 or 2 ½, something like that.
00:01:29.200 --> 00:01:35.300
You plug in a positive number into that capital Greek letter Γ right there.
00:01:35.300 --> 00:01:38.200
That is Γ right there.
00:01:38.200 --> 00:01:43.300
You take a value of Α and you plug it in right here.
00:01:43.300 --> 00:01:50.800
And then, you work out this integral and since it is a different integral, it comes out to be another number.
00:01:50.800 --> 00:02:00.200
This whole thing works out to be another number.
00:02:00.200 --> 00:02:03.800
I want to emphasize here, the Gamma function is just a function.
00:02:03.800 --> 00:02:07.900
You plug in a number and it spits a number back out to you.
00:02:07.900 --> 00:02:18.400
It has some very nice properties which is, the first of which is that Γ of N + 1 = N × Γ of N.
00:02:18.400 --> 00:02:23.600
That is very similar to the factorial function but it is slightly different.
00:02:23.600 --> 00:02:31.900
Basically, what happens is the Gamma function behaves similarly to the factorial function, but it shifted over by 1.
00:02:31.900 --> 00:02:39.100
In fact, when N is a whole number, Γ of N is equal to N -1!.
00:02:39.100 --> 00:02:51.100
For example, Γ of 4 is equal to 4 -1! which is 3! which is 1 × 2 × 3 which is 6.
00:02:51.100 --> 00:02:58.300
One way to think about the Gamma function is that, it is a close cousin of the factorial function.
00:02:58.300 --> 00:03:02.500
The difference is that, the factorial function you can only plug in whole numbers.
00:03:02.500 --> 00:03:05.900
There is no such thing as 3 ½!.
00:03:05.900 --> 00:03:10.800
For the Gamma function, you can plug in numbers that are not whole numbers.
00:03:10.800 --> 00:03:13.600
You could find Γ of 3 ½.
00:03:13.600 --> 00:03:16.900
It will be a little tricky to do the integral but it is possible.
00:03:16.900 --> 00:03:23.200
People do calculate Γ of numbers that are not whole numbers.
00:03:23.200 --> 00:03:26.400
I want to remind you again, this is the Gamma function.
00:03:26.400 --> 00:03:29.100
We have not talked about the Gamma distribution yet.
00:03:29.100 --> 00:03:38.300
This is just a function that it takes in the number as input and it spits out an answer as output.
00:03:38.300 --> 00:03:41.700
It takes a number and it spits out an answer.
00:03:41.700 --> 00:03:45.700
Next, we are going to move on and talk about the Gamma distribution.
00:03:45.700 --> 00:03:52.900
The Gamma function is just one ingredient in it, be careful not to mix the two up.
00:03:52.900 --> 00:03:57.700
I'm going to start out with the formula for the Gamma distribution.
00:03:57.700 --> 00:04:04.000
You start win two parameters, I’m going to call them α and β, they are both positive numbers.
00:04:04.000 --> 00:04:08.000
They can be anything you want, as long as they are positive.
00:04:08.000 --> 00:04:13.200
We have this quite complicated density function for the Gamma distribution.
00:04:13.200 --> 00:04:17.300
Let me look at each ingredient of this.
00:04:17.300 --> 00:04:26.000
It is a mixed polynomial parts, there is this polynomial term here, Y ^α – 1.
00:04:26.000 --> 00:04:36.600
There is this exponential term, E ⁻Y/β.
00:04:36.600 --> 00:04:41.400
There is this denominator, β ^Α/Γ of Α.
00:04:41.400 --> 00:04:47.700
Let me remind you that Γ of Α is the Gamma function.
00:04:47.700 --> 00:04:53.500
That we learn about on the previous slide, that is the Gamma function.
00:04:53.500 --> 00:05:01.600
Remember that Α and β are both constants, which means Γ of Α is a constant.
00:05:01.600 --> 00:05:06.800
This entire denominator here is nothing but one being constant.
00:05:06.800 --> 00:05:15.600
You should think of it as being kind of the less important part of the Gamma distribution.
00:05:15.600 --> 00:05:26.800
This is just a big constant and the point of that constant is to make the area under the Γ curve come out to be 1.
00:05:26.800 --> 00:05:36.500
It is just a constant to make the area equal to 1, when you graph the Γ density function.
00:05:36.500 --> 00:05:43.500
When you graph to get the Γ density function, we will graph some of these later but it might look something like this.
00:05:43.500 --> 00:05:51.400
You remember, in order to be a density function, the area under the graph always has to be equal to 1.
00:05:51.400 --> 00:05:57.200
If it is not equal 1 then you want to take your function and we will multiply or divide by whatever it takes,
00:05:57.200 --> 00:06:02.200
in order to make that area equal to 1.
00:06:02.200 --> 00:06:10.100
In this case, let me start out with, for the Γ density function is this polynomial and this exponential term.
00:06:10.100 --> 00:06:17.500
Those are the more important terms in the definition of the density function.
00:06:17.500 --> 00:06:23.800
And then, we just divide by these constants, in order to make the area come out to be 1.
00:06:23.800 --> 00:06:34.100
It is defined from 0 to infinity, it is only defined on positive numbers but the numbers can get as big as you want.
00:06:34.100 --> 00:06:38.900
It is always defined on the right hand side, it goes on forever but only in one direction.
00:06:38.900 --> 00:06:42.000
It cuts off in the other direction.
00:06:42.000 --> 00:06:49.200
Let me only remind you again, not to mix up the Gamma function and the Gamma distribution.
00:06:49.200 --> 00:06:56.900
The Gamma function here, is this part right here, that is the Gamma function that we define on the previous slide.
00:06:56.900 --> 00:07:07.200
And then this whole thing is the density function for the Gamma distribution, which one ingredient of it is the Gamma function.
00:07:07.200 --> 00:07:15.300
It is rather confusing but we will practice with it, hopefully, you will learn to keep it straight.
00:07:15.300 --> 00:07:20.700
A key properties of the Gamma distribution, the mean is given in terms of Α and β.
00:07:20.700 --> 00:07:26.800
The mean and expected values are the same thing, they come out to be α × β.
00:07:26.800 --> 00:07:30.900
The variance turns out to be α β².
00:07:30.900 --> 00:07:37.400
The standard deviation is always the square root of variance, that is just the definition.
00:07:37.400 --> 00:07:43.300
The standard deviation is just the square root of α × β².
00:07:43.300 --> 00:07:51.800
Now you know the key values associated with the Gamma distribution.
00:07:51.800 --> 00:07:57.200
I want to move on and talk about the special families of the Gamma distribution.
00:07:57.200 --> 00:08:04.000
The special cases which are really the most important × when we use the Gamma distribution.
00:08:04.000 --> 00:08:07.800
The first one of those is the exponential distribution.
00:08:07.800 --> 00:08:14.500
Let me go ahead and describe the physical situation in which you would invoke the exponential distribution.
00:08:14.500 --> 00:08:21.500
Essentially, if you are waiting for a random event to occur and this event occurs every so often,
00:08:21.500 --> 00:08:27.800
and there is no correlation between previous instances and future instances of the event.
00:08:27.800 --> 00:08:35.700
The waiting time is a random variable which is an exponential distribution.
00:08:35.700 --> 00:08:41.600
Typical exponential distribution is waiting for just something happen out of the blue,
00:08:41.600 --> 00:08:44.900
maybe you are waiting for an earthquake.
00:08:44.900 --> 00:08:49.400
You really have no idea how long it is going to take for an earthquake to strike.
00:08:49.400 --> 00:08:54.400
We know that we do have earthquakes on average, every many years
00:08:54.400 --> 00:08:59.100
but there is not a lot of correlation between one earthquake and the next.
00:08:59.100 --> 00:09:04.500
The waiting time for an earthquake would be an exponential distribution.
00:09:04.500 --> 00:09:09.900
Maybe you are working in a call center and you are waiting for the next call to come in.
00:09:09.900 --> 00:09:13.300
That again, is an exponentially distributed.
00:09:13.300 --> 00:09:19.600
The time for the next call to come in is exponentially distributed.
00:09:19.600 --> 00:09:24.100
You could be sitting by the side of a country road and waiting for a car to come along.
00:09:24.100 --> 00:09:28.200
You really have no idea how long it will be, before a car comes along.
00:09:28.200 --> 00:09:35.600
The waiting time is exponentially distributed random variable.
00:09:35.600 --> 00:09:43.500
This sounds a lot like something we have talked about before, back when we are talking about discreet distributions.
00:09:43.500 --> 00:09:46.400
I did a video on the Poisson distribution.
00:09:46.400 --> 00:09:52.700
You might think, did we use all the same examples to describe the Poisson distribution?
00:09:52.700 --> 00:09:57.100
The answer is yes, but the thing we are keeping track of is different.
00:09:57.100 --> 00:10:04.700
In the Poisson distribution, we were keeping track of how many times that random event occurs.
00:10:04.700 --> 00:10:10.100
If you are working in a call center, how many calls do you get in an hour?
00:10:10.100 --> 00:10:16.800
With the exponential distribution, we are keeping track of how long it takes for the next call to come in.
00:10:16.800 --> 00:10:21.800
We are keeping track of the length of time until the next call comes in.
00:10:21.800 --> 00:10:25.100
That does not have to be a whole number, it can be any number.
00:10:25.100 --> 00:10:32.700
It could be half a minute, it could be 3/10 of a minute, and it could be 15.2 minutes until the next call comes in.
00:10:32.700 --> 00:10:41.300
With the Poisson distribution, we are keeping track of how many calls come in, in the next hour.
00:10:41.300 --> 00:10:44.000
That does have to be a discreet number.
00:10:44.000 --> 00:10:54.600
We can get 4 calls or we can get 17 calls, but we could not get 4.5 calls, because calls only occur in whole numbers.
00:10:54.600 --> 00:10:58.200
That is the difference between the exponential and the Poisson distribution.
00:10:58.200 --> 00:11:04.500
They both describe the same physical situations but they are keeping track of different quantities.
00:11:04.500 --> 00:11:09.000
The Poisson distribution is keeping track of how many times something occurs.
00:11:09.000 --> 00:11:16.200
The exponential distribution is keeping track of the waiting time until the next occurrence.
00:11:16.200 --> 00:11:20.700
That was all just describing the physical situation for the exponential distribution.
00:11:20.700 --> 00:11:23.400
I have not even started telling you about the math.
00:11:23.400 --> 00:11:25.700
Here is the way the math works.
00:11:25.700 --> 00:11:30.400
The exponential distribution, you start out with the Gamma distribution.
00:11:30.400 --> 00:11:35.300
Let me write down the formula for the Gamma distribution, just to remind you of the density function.
00:11:35.300 --> 00:11:44.600
F of Y was equal to Y ^α – 1 × E ⁻Y/β.
00:11:44.600 --> 00:11:48.200
Those are the important terms, the exponential term, and the polynomial term.
00:11:48.200 --> 00:11:59.400
We also had these constants just to keep the area right, β ^ Α and Γ of Α.
00:11:59.400 --> 00:12:04.800
The exponential distribution is one of the Gamma distributions.
00:12:04.800 --> 00:12:10.900
It is the Gamma distribution where you take α equal to 1.
00:12:10.900 --> 00:12:18.800
The β you still leave it arbitrary, there is still going to be a β in there but the α are all going to turn into 1.
00:12:18.800 --> 00:12:31.200
What that means is that, we have Y ^α -0, that turns into Y =0 which just turns into 1, that term drops out.
00:12:31.200 --> 00:12:35.000
The β ^Α, since α is 1 just turns into β.
00:12:35.000 --> 00:12:39.700
Γ of α, that is the Gamma function.
00:12:39.700 --> 00:12:44.700
It is Γ of 1 which is equal to 0!.
00:12:44.700 --> 00:12:50.800
The Gamma function on whole numbers is the same as the factorial function,
00:12:50.800 --> 00:12:57.700
except it shifted over by 1 and 0 factorial is just 1.
00:12:57.700 --> 00:13:04.700
This whole function simplifies down into E ⁻Y/β × 1/β.
00:13:04.700 --> 00:13:13.900
We still have, that should be Y is greater than or equal to 0 and less than infinity.
00:13:13.900 --> 00:13:18.700
That is our density function for the exponential distribution.
00:13:18.700 --> 00:13:27.900
It is a special case of the Γ family but it is probably the one used most often in a probability situation.
00:13:27.900 --> 00:13:34.700
Once we know that it is a special case of the Γ family, we can immediately say what it is mean, and variance,
00:13:34.700 --> 00:13:41.900
and standard deviation are because we just look up the mean, and variance, and standard deviation from the Gamma distribution.
00:13:41.900 --> 00:13:49.300
It was Α β before, plug in α = 1 and you get the mean is just β.
00:13:49.300 --> 00:13:56.300
The variance was Α β² before, plug in Α = 1 and you get the variance to be β².
00:13:56.300 --> 00:14:08.400
The standard deviation was the square root of Α β², plug in Α = 1, you get the square root of β² which is just β.
00:14:08.400 --> 00:14:16.100
Those are all very easy, as long as you remember the corresponding quantities for the Gamma distribution
00:14:16.100 --> 00:14:23.700
because the exponential distribution is a special case of the Gamma distribution.
00:14:23.700 --> 00:14:27.800
We are going to be seeing a lot of the exponential distribution.
00:14:27.800 --> 00:14:37.900
Let me mention another very common sub family of the Gamma distribution of which is chi square distribution.
00:14:37.900 --> 00:14:41.800
Chi is a Greek letter, it looks like a X.
00:14:41.800 --> 00:14:48.700
Sometimes people will use the Greek letter Chi for Chi square distribution.
00:14:48.700 --> 00:14:52.700
Sometimes people spell it out as chi.
00:14:52.700 --> 00:14:59.200
It is used most often in statistics, and. Because of that, I'm not going to be doing a lot of work
00:14:59.200 --> 00:15:02.800
with the chi square distribution in these videos.
00:15:02.800 --> 00:15:08.900
But it is something that is occasionally studied in probability, I wanted to mention it to you.
00:15:08.900 --> 00:15:16.100
The important thing I want to emphasize is, it is a special case of the Gamma distribution.
00:15:16.100 --> 00:15:20.000
You have another new Greek letter that you have to learn.
00:15:20.000 --> 00:15:26.900
It is the Greek letter ν, that is pronounced ν, that is the Greek letter ν.
00:15:26.900 --> 00:15:29.900
It looks like a V but it is pronounced ν.
00:15:29.900 --> 00:15:34.200
Do not call it V because people will think you are an idiot if you call it V.
00:15:34.200 --> 00:15:36.600
It is the Greek letter ν.
00:15:36.600 --> 00:15:43.400
For each whole number ν, we have a Chi square distribution with new degrees of freedom.
00:15:43.400 --> 00:15:50.500
Some people will talk about Chi square with 3° of freedom, or Chi square was 17° of freedom.
00:15:50.500 --> 00:15:55.200
What you do is, you build a Gamma distribution.
00:15:55.200 --> 00:15:58.600
Remember, the Gamma distribution has an Α and β.
00:15:58.600 --> 00:16:05.400
The Α is going to be ν/2 and the β is going to bev 2.
00:16:05.400 --> 00:16:12.800
Then, you can build the formula for the Chi square distribution, out of the formula for the Gamma distribution.
00:16:12.800 --> 00:16:17.100
I did not bother to do that because we are not going to use the Chi square distribution so much.
00:16:17.100 --> 00:16:21.300
We will be spending more time with the exponential distribution.
00:16:21.300 --> 00:16:27.900
I do want to calculate the mean and variance of the Chi square distribution.
00:16:27.900 --> 00:16:31.900
Remember, the mean of the Gamma distribution was α × β.
00:16:31.900 --> 00:16:38.200
In this case, if you multiply R Α × R β, you get ν.
00:16:38.200 --> 00:16:41.800
The variance was α × β².
00:16:41.800 --> 00:16:48.800
Α × β², in this case is ν/2 × 2².
00:16:48.800 --> 00:16:52.800
If you multiply that through then you get two ν.
00:16:52.800 --> 00:16:55.800
That is the variance of the Chi square distribution.
00:16:55.800 --> 00:17:02.700
The standard deviation of the Chi square distribution, like all standard deviations is just the square root of the variance.
00:17:02.700 --> 00:17:06.300
You just take the square root of what we have above.
00:17:06.300 --> 00:17:09.700
Those are kind of the basic facts about the Chi square distribution.
00:17:09.700 --> 00:17:12.900
I’m not going to spend more time on the Chi square distribution because
00:17:12.900 --> 00:17:17.600
it is not common in probability classes, as the exponential distribution.
00:17:17.600 --> 00:17:23.000
That is where we are going to spend most of our time.
00:17:23.000 --> 00:17:29.700
Now, you have the basic facts on Gamma distributions and their special cases, the exponential and Chi square distributions.
00:17:29.700 --> 00:17:32.200
Let us jump into some problems.
00:17:32.200 --> 00:17:35.400
In our first example, we are just going to be drawing some graphs.
00:17:35.400 --> 00:17:40.800
We want to kind of understand how the density function for the Gamma distribution plays out.
00:17:40.800 --> 00:17:43.000
Let me remind you what that density function was.
00:17:43.000 --> 00:17:55.400
It is F of Y is equal to Y ^α – 1 × E ⁻Y/β.
00:17:55.400 --> 00:17:57.400
Those are the two important terms.
00:17:57.400 --> 00:18:00.100
If you forget everything else, you want to remember those two terms.
00:18:00.100 --> 00:18:10.000
The less important terms but they are still there are, β ^Α Γ of Α.
00:18:10.000 --> 00:18:17.200
Now, the reason I was a little bit snooty about the importance of those terms, is that there just constants.
00:18:17.200 --> 00:18:20.600
They are just thrown in there to make the total area equal to 1.
00:18:20.600 --> 00:18:24.000
They do not really change the shape of the graph that much.
00:18:24.000 --> 00:18:28.000
The important terms are the ones in the numerator.
00:18:28.000 --> 00:18:34.500
We are going to draw some combinations of α and β here.
00:18:34.500 --> 00:18:38.400
I will draw them in different colors.
00:18:38.400 --> 00:18:42.700
In the first one here, I will draw the first one I n blue.
00:18:42.700 --> 00:18:52.100
This is Α is equal to ½ and β is equal to 5.
00:18:52.100 --> 00:19:03.800
That means I'm graphing Y⁻¹/2 × E ⁻Y/5.
00:19:03.800 --> 00:19:09.900
There is also a constant which I'm not even going to bother to write.
00:19:09.900 --> 00:19:15.700
I want to figure out what that does.
00:19:15.700 --> 00:19:23.200
The important thing here is to look at, remember all these are defined from 0 to infinity.
00:19:23.200 --> 00:19:29.000
When Y is equal to 0, I got this Y⁻¹/2 here.
00:19:29.000 --> 00:19:34.200
That means I'm dividing by Y because it is like 1/Y ^½.
00:19:34.200 --> 00:19:40.100
That means, when you try to plug in Y = 0, the thing blows up to infinity.
00:19:40.100 --> 00:19:49.100
I'm going to show something that blows up to infinity here at Y = 0.
00:19:49.100 --> 00:19:59.400
As Y increases, here is Y = 0, and here is Y going out to infinity.
00:19:59.400 --> 00:20:05.000
As Y increases, what happens is the exponential term kicks in pretty fast.
00:20:05.000 --> 00:20:10.900
Since it is negative, E ⁻Y/5, it pulls it down pretty quickly to 0.
00:20:10.900 --> 00:20:19.900
It kind of goes down fairly quickly and is asymptotic to 0.
00:20:19.900 --> 00:20:31.400
That is the Α = ½, β = 5, part of this graph.
00:20:31.400 --> 00:20:34.500
Let me do the next one in red.
00:20:34.500 --> 00:20:43.800
This is α is equal 1 and β is still 5.
00:20:43.800 --> 00:20:53.400
I got Y⁰ × E ⁻Y/5, Y is 0 is just 1.
00:20:53.400 --> 00:20:58.400
Again, I'm not writing the constants because they do not change the shape in any fundamental way.
00:20:58.400 --> 00:21:07.600
They just shift the graph up and down, and pull it back to get an area 1.
00:21:07.600 --> 00:21:20.000
This one, if I plug in Y = 0, the Y⁰ drops out, this is E ⁺Y/5 divided by some constant.
00:21:20.000 --> 00:21:22.000
I’m not going to worry about the constant.
00:21:22.000 --> 00:21:27.900
If I plug in Y = 0, that gives me just E⁰ which is 1.
00:21:27.900 --> 00:21:34.900
Now, I do not want two say that it is actually equal 1 because that value of the constant might affect it.
00:21:34.900 --> 00:21:42.300
But, I do know that it is going to be some finite number here.
00:21:42.300 --> 00:21:49.300
Let me draw that, I cannot make it entirely underneath the blue curve.
00:21:49.300 --> 00:21:58.900
Because then, it would have smaller area and all of these things have area equal to 1 here.
00:21:58.900 --> 00:22:03.900
I'm going to have a crossing above the blue curve at some point.
00:22:03.900 --> 00:22:13.800
There it is, that is α = 1 and β = 5 there.
00:22:13.800 --> 00:22:26.400
I did actually graph these using a computer and I checked that the intercept there turns out to be about 0.2.
00:22:26.400 --> 00:22:33.400
Even if you plug 0 in here, you get 1 because that constant pulls it down a little bit.
00:22:33.400 --> 00:22:36.100
It turns out to be about 0.2.
00:22:36.100 --> 00:22:39.900
That is what that graph looks like.
00:22:39.900 --> 00:22:42.800
Let me do the last one in green.
00:22:42.800 --> 00:22:47.100
My α is 3 and my β is 2.
00:22:47.100 --> 00:22:55.900
What I'm graphing here is Y ^α-1 that is Y² × E ⁻Y/β.
00:22:55.900 --> 00:23:00.600
Again, there is some constant there but I'm not going to worry about the constant.
00:23:00.600 --> 00:23:06.700
The key thing here is that, when you plug in Y = 0, Y² is going to be 0.
00:23:06.700 --> 00:23:10.500
This one starts at the origin.
00:23:10.500 --> 00:23:18.200
My green graph is going to start right here at the origin and it has to go up because it is a probability density function.
00:23:18.200 --> 00:23:22.000
But it also has to level off at some 0.20.
00:23:22.000 --> 00:23:27.800
It is going to go down and just like the others, it would asymptotic to 0.
00:23:27.800 --> 00:23:34.100
That is the graph corresponding to 3, 2.
00:23:34.100 --> 00:23:36.400
I got my three different graphs here.
00:23:36.400 --> 00:23:42.700
What can I learn from this and what can I learn by looking at the equation.
00:23:42.700 --> 00:23:49.400
The difference here is that, the value of α really seems to change the shape of the graph.
00:23:49.400 --> 00:23:55.700
Because if Α is less than 1, it is seems to blow up.
00:23:55.700 --> 00:23:59.300
Let me write this down as I'm saying it.
00:23:59.300 --> 00:24:22.700
Α controls the shape of the graph in some fundamental way, the shape especially at Y = 0.
00:24:22.700 --> 00:24:39.400
If Α is less than 1, we got that that 1/2 to 5 graph, it blows up to infinity at 0.
00:24:39.400 --> 00:24:57.200
Α = 1 goes to a finite number, goes to a positive number, positive at 0.
00:24:57.200 --> 00:25:03.000
Α bigger than o1, it looks like it is going to pull it down to 0.
00:25:03.000 --> 00:25:09.800
It goes to 0 at 0, let me put a little color coding on here.
00:25:09.800 --> 00:25:12.100
The blue one was the α less than 1.
00:25:12.100 --> 00:25:18.200
The read one was the α equal to 1.
00:25:18.200 --> 00:25:33.200
The green one was the α bigger than 0, I meant α bigger than 1.
00:25:33.200 --> 00:25:40.400
Now, we know the Α really seems to control the shape, especially around Y = 0.
00:25:40.400 --> 00:25:48.100
Different values of α will make it go up to infinity, or go a finite number, or be pulled down to 0.
00:25:48.100 --> 00:25:58.200
Β is not as important, what β does is, I can see the effect of β right here.
00:25:58.200 --> 00:26:10.100
Β is just a scaling factor on the exponential term. A larger value of β will point out to the right.
00:26:10.100 --> 00:26:13.200
It does not change the shape in such a fundamental way.
00:26:13.200 --> 00:26:24.700
It stretches the graph out to the right.
00:26:24.700 --> 00:26:30.800
If you are going to stretch the graph out to the right, if you going to stretch it out to the right,
00:26:30.800 --> 00:26:34.200
the total area always has to be 1.
00:26:34.200 --> 00:26:50.800
It would have to smash the graph down a bit, to maintain area 1.
00:26:50.800 --> 00:27:00.700
In answer to the question here, where we have our nice graphs, but Α seems to affect the shape when Y = 0.
00:27:00.700 --> 00:27:13.600
Β stretches it out and stretches it down but it does not fundamentally change the shape of the graph.
00:27:13.600 --> 00:27:17.600
In example 2, we have an actuarial calculation.
00:27:17.600 --> 00:27:21.900
We are going to park a car on the streets of Long Beach California.
00:27:21.900 --> 00:27:25.700
We are going to see how long it takes for that car to get stolen.
00:27:25.700 --> 00:27:31.600
This is the kind of thing that actuaries working for insurance companies, calculate all the time.
00:27:31.600 --> 00:27:40.600
They want to know how long it takes for a car to be stolen because if it is stolen, then they will have to pay you.
00:27:40.600 --> 00:27:45.100
If you bought car insurance, they will have to pay you to replace the car.
00:27:45.100 --> 00:27:52.500
They need to know how often they will have to make those kinds of payouts.
00:27:52.500 --> 00:27:57.700
This is the kind of thing that the exponential distribution works for.
00:27:57.700 --> 00:28:03.500
Because again, you are waiting for some random event to happen and there is really no telling when it is going to happen.
00:28:03.500 --> 00:28:09.600
It might happen tomorrow, it might happen a month from, it might not happen for the next 100 years.
00:28:09.600 --> 00:28:13.600
If you get lucky, you can leave your car out, in 400 years no one will steal it.
00:28:13.600 --> 00:28:18.800
But if you are very lucky, it might get stolen tomorrow and you might buy a new car the next day,
00:28:18.800 --> 00:28:22.900
and that new car might be stolen after that.
00:28:22.900 --> 00:28:25.800
This is an exponential distribution.
00:28:25.800 --> 00:28:33.400
We have calculated that your car is stolen once every 12 years, you have a bad day and your car will be stolen.
00:28:33.400 --> 00:28:37.900
Although that is just an average, it might happen twice in a year, if you are in a really bad year.
00:28:37.900 --> 00:28:40.900
It might not happen for 30 years, if you are very lucky.
00:28:40.900 --> 00:28:48.100
We want to figure out the chance that our car will last 24 years without being stolen.
00:28:48.100 --> 00:28:52.400
Can we go for the next 24 years without being stolen.
00:28:52.400 --> 00:28:58.400
I want to make a little computation using the exponential distribution, kind of in general.
00:28:58.400 --> 00:29:01.400
And then, I will apply it to this particular example.
00:29:01.400 --> 00:29:06.300
If I make a general computation, I think it can be useful for several different problems.
00:29:06.300 --> 00:29:11.500
I’m going to say the answer, the general answer first.
00:29:11.500 --> 00:29:21.600
The exponential distribution, the density function remember is, F of Y is 1/β × E ⁻Y/β.
00:29:21.600 --> 00:29:33.500
That is on the range Y goes from 0 to infinity.
00:29:33.500 --> 00:29:40.300
In order to calculate probabilities with the exponential distribution, we have to integrate that.
00:29:40.300 --> 00:29:50.700
I would like to calculate the probability that Y will be a bigger than any particular value C.
00:29:50.700 --> 00:29:53.400
I'm going to say that and use it for several other problems.
00:29:53.400 --> 00:29:57.200
You are really want to make sure that you understand this computation.
00:29:57.200 --> 00:30:00.800
By the way, β there is the mean of the distribution.
00:30:00.800 --> 00:30:06.900
That was something we figured out on a previous side, you can go back and look that up.
00:30:06.900 --> 00:30:11.100
The probability that Y is greater than or equal the C, we will use an integral for that.
00:30:11.100 --> 00:30:19.700
It is the integral from C to infinity because it could be any value from C to infinity of the density function.
00:30:19.700 --> 00:30:28.500
1/β × E ⁻Y/β × DY.
00:30:28.500 --> 00:30:32.300
This is going to work a lot better, if I make a little substitution.
00:30:32.300 --> 00:30:42.200
I'm will make u substitution, I will define u, := means defined to be.
00:30:42.200 --> 00:30:47.600
I'm defining my variable here right now, to be Y/β.
00:30:47.600 --> 00:30:53.900
Any time I make any kind of substitution in an integral, I also have to find DU.
00:30:53.900 --> 00:30:58.400
DU would just be 1/β DY.
00:30:58.400 --> 00:31:04.100
That is quite convenient because I have a 1/β DY in the integral.
00:31:04.100 --> 00:31:12.400
My integral will convert into the integral of E ⁻u DU.
00:31:12.400 --> 00:31:19.300
I’m not going to put bounds on it because I'm going to go ahead and integrate it, and then I will convert it back into terms of Y.
00:31:19.300 --> 00:31:22.500
We would not actually finish the integrals in terms of u.
00:31:22.500 --> 00:31:30.200
The integral of E ⁺u is just E ⁻u × – 1.
00:31:30.200 --> 00:31:35.300
You can work that out doing another little substitution, if you like.
00:31:35.300 --> 00:31:43.200
Or you can use of the opposite of the chain role which of course is substitution.
00:31:43.200 --> 00:31:51.300
That is the same as E ^-, u is Y/β.
00:31:51.300 --> 00:32:05.300
We are supposed to evaluate that from Y =C to, we will take the limit as Y goes to infinity.
00:32:05.300 --> 00:32:18.500
That is –E ⁻infinity/β – E ⁻C/β.
00:32:18.500 --> 00:32:26.200
A lot of negatives in here, but fortunately, E ⁻infinity that is 1/E ⁺infinity.
00:32:26.200 --> 00:32:29.500
This is just 0, that term goes away.
00:32:29.500 --> 00:32:38.500
These negatives cancel and we get positive E ⁻C/β.
00:32:38.500 --> 00:32:47.300
I want to hang onto this result, the probability of Y being greater than or equal to C is equal to E ⁻C/β.
00:32:47.300 --> 00:32:51.500
We are going to use that in several different problems here with the exponential distribution.
00:32:51.500 --> 00:32:54.000
Make sure you understand that calculation.
00:32:54.000 --> 00:32:56.700
Make sure you are able to repeat that.
00:32:56.700 --> 00:33:02.800
As long as you do understand that, we would not have to go back and work it through every time, we just sight this result.
00:33:02.800 --> 00:33:06.600
In this case, what do we want to calculate.
00:33:06.600 --> 00:33:12.200
We want to calculate the probability that our car will last 24 years without being stolen.
00:33:12.200 --> 00:33:19.400
The probability that the waiting time for a car to be stolen is more than 24 years.
00:33:19.400 --> 00:33:24.800
The probability that Y will be greater than or equal to 24.
00:33:24.800 --> 00:33:30.900
Now, using the formula that we just worked out, that is E ⁻C/β.
00:33:30.900 --> 00:33:37.400
Β was the mean, that is the average amount of time until somebody's car is stolen.
00:33:37.400 --> 00:33:41.100
We are given that, it is your car is stolen every 12 years.
00:33:41.100 --> 00:33:47.300
If you just park your car as usual and go about your daily business, on the average,
00:33:47.300 --> 00:33:53.000
once every 12 years, you are going to wake up and say oh my gosh, they stole my car.
00:33:53.000 --> 00:34:22.700
The C value is 24 and the β value is 12, this is E ⁻24/12 here, which is E⁻².
00:34:22.700 --> 00:34:42.500
I work that out on a calculator, I just threw that into a calculator and it came out to be approximately 0.135, that is 13.5%.
00:34:42.500 --> 00:34:49.700
The probability that your car will last for 24 years without being stolen is fairly well.
00:34:49.700 --> 00:34:57.500
Probably, within the next 24 years, it happens to most people sooner or later, you are going to lose a car.
00:34:57.500 --> 00:35:02.900
Certainly, the actuaries working for the insurance companies want to know what that probability is,
00:35:02.900 --> 00:35:08.400
so they know how likely is that the company will have to pay you to replace your car.
00:35:08.400 --> 00:35:15.600
And in turn, they know how much to charge to cover that kind of insurance.
00:35:15.600 --> 00:35:20.700
That is the answer here, the probability of lasting 24 years is 13%.
00:35:20.700 --> 00:35:22.800
Let me recap the steps here.
00:35:22.800 --> 00:35:29.500
In particular, I want to emphasize this initial calculation because we are going to use it over and over again.
00:35:29.500 --> 00:35:36.500
I do not want to re do it again, I do now want to recalculate these integrals every time, because it is the same every time.
00:35:36.500 --> 00:35:44.400
Here is the density function for the exponential distribution, 1/β × E ⁻Y/β.
00:35:44.400 --> 00:35:56.500
If you want to calculate the probability of Y being bigger than or equal to any constant C, E of Y bigger than or equal C,
00:35:56.500 --> 00:36:03.700
we plug in those values for this integral C ⁺infinity because the exponential distribution does go on to infinity.
00:36:03.700 --> 00:36:10.700
Little substitution got us through that integral, plug in the values, to get this,
00:36:10.700 --> 00:36:21.100
we took a limit but it is an easy limit because E ⁻Y as Y goes to infinity is just E ⁻infinity.
00:36:21.100 --> 00:36:24.500
1/E ⁺infinity is 0.
00:36:24.500 --> 00:36:29.400
Here, the negatives all canceled and we got E ⁻C/B.
00:36:29.400 --> 00:36:35.000
Let me summarize that, that C/β because that is what I want you to remember.
00:36:35.000 --> 00:36:41.100
I want you to be able to just recall it for future problems.
00:36:41.100 --> 00:36:49.200
For this particular problem, our C value was 24, our β was 12 that came from the average of 12 years.
00:36:49.200 --> 00:36:54.200
The mean of the exponential distribution is β.
00:36:54.200 --> 00:37:00.200
I just plugged in 24 and 12, and we got E⁻².
00:37:00.200 --> 00:37:07.000
I convert that into a percentage of 13.5%.
00:37:07.000 --> 00:37:14.900
In examples 3, we have seismic data indicating that the time until the next major earthquake
00:37:14.900 --> 00:37:18.300
in California is exponentially distributed.
00:37:18.300 --> 00:37:24.100
Again, this is kind of a classic application of the exponential distribution.
00:37:24.100 --> 00:37:27.700
You are waiting for something to happen and it happens kind of randomly.
00:37:27.700 --> 00:37:30.600
Sometimes it happens, sometimes it does not.
00:37:30.600 --> 00:37:33.500
In this case, it happens on average once every 10 years but
00:37:33.500 --> 00:37:37.600
you might have two earthquakes in one decade and no earthquakes in the next decade.
00:37:37.600 --> 00:37:42.300
We want to find the chance that there will be an earthquake in the next 30 years.
00:37:42.300 --> 00:37:47.000
In this case, we are not calculating exactly, we are going to estimate.
00:37:47.000 --> 00:37:56.500
We are going to use our two Russian inequalities, Markov's inequality and Chebyshev’s inequality.
00:37:56.500 --> 00:37:59.900
Let me remind you what Markov’s inequality went.
00:37:59.900 --> 00:38:05.900
It is in the probability that a random variable will be bigger than a particular constant,
00:38:05.900 --> 00:38:15.600
is less than or equal to the expected value of that variable divided by the constant that you are interested in.
00:38:15.600 --> 00:38:25.300
In this case, the constant we are interested in is 30 years because I am estimating the chance that
00:38:25.300 --> 00:38:28.000
there will be an earthquake in the next 30 years.
00:38:28.000 --> 00:38:36.300
My A is 30, the expected value is the mean of the variable.
00:38:36.300 --> 00:38:41.500
In this case, we are given that there is a mean of 10 years, this is 10.
00:38:41.500 --> 00:38:44.800
10/30 simplifies down to 1/3.
00:38:44.800 --> 00:38:49.600
That was the probability that Y is bigger than A.
00:38:49.600 --> 00:38:56.300
That is the probability that it will take longer than 30 years to have an earthquake.
00:38:56.300 --> 00:39:00.300
But we want the chance that there will be an earthquake in the next 30 years,
00:39:00.300 --> 00:39:05.500
meaning the next one comes in less than 30 years.
00:39:05.500 --> 00:39:09.800
Our Y here is the waiting time.
00:39:09.800 --> 00:39:15.000
We are trying to estimate the probability that there is an earthquake in the next 30 years.
00:39:15.000 --> 00:39:24.000
That would be Y less than A, the probability that Y is less than A.
00:39:24.000 --> 00:39:32.100
We have to flip the inequality here, if the probability that it is greater than A is less than 1/3,
00:39:32.100 --> 00:39:35.300
this is the probability of being less than A.
00:39:35.300 --> 00:39:43.800
Let me go ahead and fill in 30 here, is greater than or equal to 1 -1/3, 2/3.
00:39:43.800 --> 00:39:50.600
That means there is at least a 2/3 chance that there will be an earthquake in the next 30 years.
00:39:50.600 --> 00:39:55.700
That the waiting time for the earthquake is less than 30 years.
00:39:55.700 --> 00:40:00.900
Within the next 30 years, we are due with a probability of at least 2/3.
00:40:00.900 --> 00:40:05.600
Maybe, it is even higher than that, I do not know just by using Markov’s inequality.
00:40:05.600 --> 00:40:13.700
But I can say for sure just for Markov that, it is at least 2/3 chance we are going to have an earthquake in the next 30 years.
00:40:13.700 --> 00:40:17.100
Let me calculate the same thing using Chebyshev’s inequality.
00:40:17.100 --> 00:40:19.400
Again, I will remind you what that is.
00:40:19.400 --> 00:40:34.200
This is Markov’s inequality right here, Chebyshev’s tells us that the probability of Y minus μ, the mean, being bigger than K σ.
00:40:34.200 --> 00:40:39.100
Σ is the standard deviation is less than or equal to 1/K².
00:40:39.100 --> 00:40:45.000
By the way, I have some earlier lectures right here in the probability lecture series,
00:40:45.000 --> 00:40:50.200
right here on www.educator.com that cover Markov’s inequality and Chebyshev’s inequality.
00:40:50.200 --> 00:40:53.500
That is why I'm not developing them from scratch for you here.
00:40:53.500 --> 00:40:57.400
But if you do not remember Markov’s inequality and Chebyshev’s inequality,
00:40:57.400 --> 00:41:02.800
you just go back and watch those other lectures on those two inequalities and get all caught up.
00:41:02.800 --> 00:41:06.800
You will be ready to go with this example.
00:41:06.800 --> 00:41:10.200
In this case, let us figure out what some of these values are.
00:41:10.200 --> 00:41:18.700
Our μ is our mean, in this case, it is the mean of the exponential distribution is β which is 10.
00:41:18.700 --> 00:41:31.500
Σ is our standard deviation, σ for the exponential distribution, I said that a couple of slides ago, is also β, that is 10.
00:41:31.500 --> 00:41:38.500
We want the probability that Y will be greater than 30.
00:41:38.500 --> 00:41:45.000
Because, I want to calculate the probability that Y is less than 30 but I will come back to that later.
00:41:45.000 --> 00:41:49.100
I’m going to start out with the probability that Y is greater than 30.
00:41:49.100 --> 00:42:08.000
30 is 2 standard deviations bigger than 10 because the mean is 10, then, μ = 10.
00:42:08.000 --> 00:42:10.900
The mean is 10 and the standard deviation is 10.
00:42:10.900 --> 00:42:17.700
In order for it to be bigger than 30, it is got to be 2 standard deviations bigger than 10.
00:42:17.700 --> 00:42:20.400
That means our K value is 2.
00:42:20.400 --> 00:42:30.500
The probability that Y – μ is bigger than or equal to 2 σ is less than or equal to,
00:42:30.500 --> 00:42:33.900
Chebyshev’s tells us it is less than or equal 1/K².
00:42:33.900 --> 00:42:40.600
1/K² which is 1/2² which is ¼.
00:42:40.600 --> 00:42:44.400
That is the probability that Y is bigger than 30.
00:42:44.400 --> 00:42:57.300
The probability that Y is less than 30 is, if the probability that it is bigger than 30 is less than ¼,
00:42:57.300 --> 00:43:03.600
this would be greater than 1 -1/4 which is ¾.
00:43:03.600 --> 00:43:07.200
That makes our prediction of an earthquake a little more dire.
00:43:07.200 --> 00:43:14.200
It says that the probability that there would not be an earthquake within the next 30 years is at least ¾,
00:43:14.200 --> 00:43:24.300
at least 75% chance that we will have an earthquake in the next 30 years, according to Chebyshev’s inequality.
00:43:24.300 --> 00:43:29.200
It gets us a more accurate prediction, by the way, that is not saying that Markov’s inequality was wrong.
00:43:29.200 --> 00:43:38.000
Markov said it is at least 66%, Chebyshev’s says it is even bigger than that, it is at least 75%.
00:43:38.000 --> 00:43:42.000
They are both right but Chebyshev’s gives us the stronger result.
00:43:42.000 --> 00:43:46.800
The reason it give us a stronger result is because we had to go through a little more work to do it.
00:43:46.800 --> 00:43:53.800
We had to use more information, the mean and the standard deviation, in order to calculate it.
00:43:53.800 --> 00:43:57.400
Let me recap how we got these results.
00:43:57.400 --> 00:44:02.300
First of all, if you do not remember Markov’s inequality and Chebyshev’s inequality,
00:44:02.300 --> 00:44:05.000
I have got lectures here on www.educator.com.
00:44:05.000 --> 00:44:10.900
Just scroll up in the probability series and you will see the lectures on Markov’s inequality and Chebyshev’s inequality.
00:44:10.900 --> 00:44:14.200
You will see where these initial formulas are coming from.
00:44:14.200 --> 00:44:24.100
The Markov’s inequality said that, the probability Y being bigger than the cutoff is less than the mean divided by that cutoff value.
00:44:24.100 --> 00:44:28.000
In this case, we are interest in the probability of Y being bigger than 30,
00:44:28.000 --> 00:44:35.400
because we want to have an earthquake in the next 30 years, whether it comes before 30 or after 30.
00:44:35.400 --> 00:44:43.000
A is 30, our mean is, we got that here, we fill that in as 10 and we get 1/3.
00:44:43.000 --> 00:44:53.200
Remember, that is the probability of being bigger than 30, that means we wait more than 30 years to get an earthquake.
00:44:53.200 --> 00:44:57.200
But that is not we are interested in, we are interested in waiting less than 30 years.
00:44:57.200 --> 00:45:04.700
We have to flip it around, from 1/3 we flip it around to 1 -1/3 is 2/3.
00:45:04.700 --> 00:45:13.400
We have to flip the inequality, the probability is more than 2/3 that we will have an earthquake.
00:45:13.400 --> 00:45:21.700
Here is the formula for Chebyshev’s inequality, it is based on the standard deviation which is 10 and the mean which is 10.
00:45:21.700 --> 00:45:27.800
And then you ask yourself, how many standard deviations away from the mean am I going?
00:45:27.800 --> 00:45:31.400
In this case, we are interested in 30.
00:45:31.400 --> 00:45:34.800
30 is 2 standard deviations away from the mean.
00:45:34.800 --> 00:45:42.900
That is because 30 – the mean of 10 divided by the standard deviation of 10 is 2.
00:45:42.900 --> 00:45:46.000
That is where I get my K there.
00:45:46.000 --> 00:45:51.600
There is K is 2, and I plug in K is equal to 2.
00:45:51.600 --> 00:45:56.800
The probability is less than 1/K², that is 1/2² is ¼.
00:45:56.800 --> 00:46:01.300
Again, that is the probability that Y will be greater than 30.
00:46:01.300 --> 00:46:11.500
We have to flip it around and instead of taking ¼, we have to do 1 -1/4 for the probability of being less than 30.
00:46:11.500 --> 00:46:15.000
We have to say it is greater than ¾.
00:46:15.000 --> 00:46:24.000
Our probability of having an earthquake is at least 75%, that is scary if you live in Southern California.
00:46:24.000 --> 00:46:31.400
In the next example, we are going to use the same basic setup except we are going to calculate the probability exactly,
00:46:31.400 --> 00:46:35.300
instead of estimating it, using Markov and Chebyshev’s.
00:46:35.300 --> 00:46:41.400
You want to make sure you understand this example and understand the same basic setup,
00:46:41.400 --> 00:46:46.300
before you go on to the next example, example 4.
00:46:46.300 --> 00:46:51.500
In example 4, we are using the same setup that we had from example 3.
00:46:51.500 --> 00:46:54.200
You might want to go back and check over example 3.
00:46:54.200 --> 00:47:02.100
Same thing, we have waiting for an earthquake to happen and we know that they happen once every 10 years on average.
00:47:02.100 --> 00:47:07.000
That is going to be our mean and that is going to be our β, follows an exponential distribution.
00:47:07.000 --> 00:47:14.700
We want to find the exact probability that there will be an earthquake in the next 30 years.
00:47:14.700 --> 00:47:21.200
We want to find the probability that Y is less than or equal to 30.
00:47:21.200 --> 00:47:29.100
Remember, Y is our waiting time for an earthquake.
00:47:29.100 --> 00:47:33.300
How long do we have to wait until the earth starts shaking?
00:47:33.300 --> 00:47:36.700
What is the chance that that will be less than 30 years?
00:47:36.700 --> 00:47:45.700
Now, I think the easier way to calculate this is to do 1 - the probability that Y is greater than or equal to 30.
00:47:45.700 --> 00:47:55.000
The reason I frame it like that, is because we have a formula that we worked out back in example 2.
00:47:55.000 --> 00:48:00.600
Let me show you that formula from example 2.
00:48:00.600 --> 00:48:14.800
From example 2, we work this out, the probability of Y being bigger than the value C is equal to E ⁻C/β.
00:48:14.800 --> 00:48:17.900
We did an integral to calculate that, it cost us some work.
00:48:17.900 --> 00:48:25.100
If you do not remember that or you work that out on your own, just go back and watch example 2 again,
00:48:25.100 --> 00:48:27.400
and you will see where that result comes from.
00:48:27.400 --> 00:48:41.600
In this case, our C value is 30, by the way I'm being a little cavalier here in my use of greater than or equal to vs. greater than,
00:48:41.600 --> 00:48:46.000
because these are continuous distributions, it does not matter.
00:48:46.000 --> 00:48:51.200
Continuous distributions, the probability of any exacta value is 0.
00:48:51.200 --> 00:48:54.100
The probability that it is equal to 30 is 0.
00:48:54.100 --> 00:48:57.800
What is the chance that you are going to have an earthquake exactly 30 years from now?
00:48:57.800 --> 00:49:05.900
That is not going to happen, it will not be exactly 30 years, it will be 30.1 years or 29.8 years.
00:49:05.900 --> 00:49:09.700
You do not have to worry about being exactly equal to 30,
00:49:09.700 --> 00:49:17.400
which means I do not have to worry about whether I write greater than, or greater than or equal to.
00:49:17.400 --> 00:49:25.900
Using my formula back from example 2, this is 1 – E ⁻C is 30 that is 30.
00:49:25.900 --> 00:49:30.700
My β is 10, I got that up here.
00:49:30.700 --> 00:49:48.000
30/10 is 1- E⁻³, I threw that into my calculator and my calculator spat out the number 0.9502.
00:49:48.000 --> 00:49:55.000
My probability of having, these are approximations, I guess, there are some small rounding involved.
00:49:55.000 --> 00:50:03.700
That is just about 95%, what that means is that the exact or very close to exact probability of
00:50:03.700 --> 00:50:08.700
there being an earthquake in the next 30 years is 95%.
00:50:08.700 --> 00:50:16.800
It is really time to run for the hills because it is very likely that there will be an earthquake in the next 30 years in California.
00:50:16.800 --> 00:50:21.500
That is not too surprising, if we have it 10 years on average, it is not very likely that
00:50:21.500 --> 00:50:25.300
we will survive 3 decades without having an earthquake.
00:50:25.300 --> 00:50:29.200
It is quite likely that there will be an earthquake, sometime in the next 30 years.
00:50:29.200 --> 00:50:33.200
Now we know that the exact probability is 95%.
00:50:33.200 --> 00:50:37.700
Notice that, this does not contradict the answer from the previous problem.
00:50:37.700 --> 00:50:41.800
In the previous problem, we are calculating the same thing except you are
00:50:41.800 --> 00:50:48.300
just using rough estimations using Markov's inequality and Chebyshev’s inequality.
00:50:48.300 --> 00:50:54.400
In example 3, if you have not just watch that, you might go back and check that so you know what I'm talking about.
00:50:54.400 --> 00:51:00.300
In examples 3, we used Markov to estimate this probability.
00:51:00.300 --> 00:51:04.400
I have to remember the spelling of Chebyshev’s, fortunately you can spell Chebyshev’s
00:51:04.400 --> 00:51:09.600
almost any way you like and it will be right according to some of version the name.
00:51:09.600 --> 00:51:10.900
That is how I’m going to spell it.
00:51:10.900 --> 00:51:17.000
Markov said that it was greater than or equal to 2/3.
00:51:17.000 --> 00:51:22.200
Yes, 95% is greater than 2/3, that was not wrong.
00:51:22.200 --> 00:51:26.900
Chebyshev’s said that the probability was greater than or equal ¾.
00:51:26.900 --> 00:51:35.200
Yes it is, 95% is greater than ¾, that checks a little bit with our previous answers.
00:51:35.200 --> 00:51:42.200
But of course, we get a much stronger answer from calculating it exactly and actually doing an integral.
00:51:42.200 --> 00:51:45.800
We did a rollback in example 2 here.
00:51:45.800 --> 00:51:52.100
Just to recap here, we want the exact probability that there will be an earthquake in the next 30 years.
00:51:52.100 --> 00:51:56.000
That means our waiting time would be less than 30.
00:51:56.000 --> 00:51:59.800
That is 1- the probability of it being greater than 30.
00:51:59.800 --> 00:52:07.400
We did an exponential distribution, we figure out this nice formula back in example 2 of
00:52:07.400 --> 00:52:10.800
the probability of a variable being bigger than the cut off.
00:52:10.800 --> 00:52:13.300
It is E ⁻C/β.
00:52:13.300 --> 00:52:20.300
I just plug in C = 30 and then β was the mean, that is 10.
00:52:20.300 --> 00:52:27.700
And then, I simplified that down and I got 95%, that is my exact probability or very close to around a little bit.
00:52:27.700 --> 00:52:34.000
But, that is basically the exact probability that there will be an earthquake in the next 30 years in California.
00:52:34.000 --> 00:52:40.900
Of course, I can check that against the answers I got in example 3 where I just estimated using Markov and Chebyshev’s.
00:52:40.900 --> 00:52:52.400
Those were not exact calculations, those are estimations, but it certainly agrees with those two answers.
00:52:52.400 --> 00:52:58.000
In example 5, we have an exponential distribution and it does not tell us what the mean is this time.
00:52:58.000 --> 00:53:00.100
I guess we just have to call it β.
00:53:00.100 --> 00:53:04.800
D and M are some constants, we will have very little concrete in this problem.
00:53:04.800 --> 00:53:10.000
We have to prove this strange expression, it says, I see here we have conditional probability.
00:53:10.000 --> 00:53:22.100
This line is conditional probability, I have to remember that, the formula for conditional probability.
00:53:22.100 --> 00:53:29.600
We have to prove that the probability of Y being bigger than D + M given that Y is bigger than D
00:53:29.600 --> 00:53:33.800
is equal to the probability of Y being bigger than M.
00:53:33.800 --> 00:53:38.600
Somehow, that is supposed to have something to do with the word memoryless.
00:53:38.600 --> 00:53:43.100
The exponential distribution is known as the memoryless distribution.
00:53:43.100 --> 00:53:47.400
We need to interpret that and justify it somehow.
00:53:47.400 --> 00:53:56.400
The first thing I'm going to do with this problem is, remind you of a formula that we derive back in example 2.
00:53:56.400 --> 00:54:04.200
If you have not watched example 2 in the recent past, you should go back and watch that right now
00:54:04.200 --> 00:54:07.800
because we are going to be using the formula for the exponential distribution.
00:54:07.800 --> 00:54:17.700
It tells us that the probability that Y is bigger than C is equal to E ⁻C/β.
00:54:17.700 --> 00:54:22.900
That is going to be very useful, we calculated an integral back in example 2 to find that,
00:54:22.900 --> 00:54:27.700
but we are not going to recalculate it now, I'm just going to use it.
00:54:27.700 --> 00:54:33.700
I'm going to go ahead and start working out the left hand side of this expression.
00:54:33.700 --> 00:54:38.500
It might get a little complicated but hopefully I can simplify it down to the right hand side.
00:54:38.500 --> 00:54:47.000
The left hand side LHS is, remember, we have to use conditional probability here.
00:54:47.000 --> 00:54:56.200
The probability of A given B, this is an old formula, I gave a lecture of video on it many moons ago.
00:54:56.200 --> 00:54:59.600
If you do not remember that, you can always look up on my previous lecture on it.
00:54:59.600 --> 00:55:01.600
It is right here on www.educator.com.
00:55:01.600 --> 00:55:15.100
It is the probability of A and B, or A intersect B, if you want to use symbols for it, divided by the probability of B.
00:55:15.100 --> 00:55:18.500
Let us figure out what that means in this situation.
00:55:18.500 --> 00:55:36.300
It is the probability that Y is bigger than D + M and Y is bigger than D divided by the probability of Y being bigger than D.
00:55:36.300 --> 00:55:42.200
Let us think about that, if Y is bigger than D + M, then Y is definitely bigger than D.
00:55:42.200 --> 00:55:48.900
I did not say it here but I'm assuming that D and M are all positive numbers.
00:55:48.900 --> 00:55:51.800
If Y is bigger than D + M, then it is definitely bigger than D.
00:55:51.800 --> 00:55:54.800
I do not really need to say Y is still bigger than D.
00:55:54.800 --> 00:55:59.900
I can just say the probability that Y is bigger than D + M.
00:55:59.900 --> 00:56:07.200
I do not need to emphasize at that point the Y is still bigger than D because it is automatic, divided by the probability that,
00:56:07.200 --> 00:56:11.700
I do not know why I say Y + D above should have been bigger than.
00:56:11.700 --> 00:56:15.700
Y is still bigger than D.
00:56:15.700 --> 00:56:21.100
We can calculate each one of those and we are going to use this result from example 2.
00:56:21.100 --> 00:56:24.500
We use this result right here from example 2.
00:56:24.500 --> 00:56:39.800
That is E ^-/ our C is D + M, D + M divided by β, all divided by E ⁻D/β.
00:56:39.800 --> 00:56:46.300
We have a fraction of exponents here, we can do a little flip.
00:56:46.300 --> 00:56:48.600
Maybe flip it up to the top there.
00:56:48.600 --> 00:57:00.700
That is E ⁺D/β, since we pulled it out of the denominator – D + M/β.
00:57:00.700 --> 00:57:11.100
Now, that simplifies down a little bit into, D/β canceled and we are left with E ⁻M/β.
00:57:11.100 --> 00:57:19.200
If we use this result from example 2, that is exactly, that 2 sure looks like a1, does in it?
00:57:19.200 --> 00:57:23.500
Let me change that into a real, honest 2.
00:57:23.500 --> 00:57:29.800
This is the probability that Y is bigger than M.
00:57:29.800 --> 00:57:38.300
Low and behold, we have the right hand side appearing here.
00:57:38.300 --> 00:57:46.200
We have proved our equation that we set out to prove here.
00:57:46.200 --> 00:57:53.400
I have not really given much of an interpretation as to what that might mean, but I certainly know it is true.
00:57:53.400 --> 00:57:56.300
I certainly know that this equation is true.
00:57:56.300 --> 00:58:01.900
And now, I have to think about what it really means.
00:58:01.900 --> 00:58:11.800
Let us say that the exponential distribution, what it measures is the waiting time until some random event occurs.
00:58:11.800 --> 00:58:17.600
An example I used earlier on was some unpredictable event,
00:58:17.600 --> 00:58:21.200
sometimes it happens and you never really know when it is going to happen.
00:58:21.200 --> 00:58:26.000
An example I picked was your car being stolen.
00:58:26.000 --> 00:58:38.800
Let us have Y be the waiting time until how long do you have to wait,
00:58:38.800 --> 00:58:44.400
just leaving your car around on the street until your car is stolen.
00:58:44.400 --> 00:58:46.900
What does this equation mean?
00:58:46.900 --> 00:58:51.000
Let me pick THE values for D and M.
00:58:51.000 --> 00:59:05.200
Let us say D is one day and M is one month, D + M would be one month and one day.
00:59:05.200 --> 00:59:09.900
That is why I picked D and M in the first place because I was thinking ahead to this.
00:59:09.900 --> 00:59:15.700
What this is really saying, the probability, we have conditional probability here.
00:59:15.700 --> 00:59:21.400
This means, given that Y is bigger than D.
00:59:21.400 --> 00:59:29.900
Suppose Y is bigger than D, that means you may get through the first day without your car being stolen.
00:59:29.900 --> 00:59:48.800
Suppose your car is not stolen today, that means you made it through the first day, thank goodness.
00:59:48.800 --> 00:59:57.600
Y is bigger than D, you made it through at least 1 day without any theft of your car.
00:59:57.600 --> 01:00:08.600
Given that you made it through today, what is your chance of making it through a whole month more after today?
01:00:08.600 --> 01:00:29.400
Then your chance of surviving, surviving meaning your car is not stolen, surviving another month,
01:00:29.400 --> 01:00:34.100
an extra month on top of today.
01:00:34.100 --> 01:00:43.600
What we are really calculating there is, the probability that your car will now survive a day
01:00:43.600 --> 01:00:49.900
and another whole month given that it is already survive one day.
01:00:49.900 --> 01:01:08.500
What we are seeing here is that, it is equal to, is the same as the chance of surviving a month from today, just starting today.
01:01:08.500 --> 01:01:15.500
It is the same as the chance of surviving a month today.
01:01:15.500 --> 01:01:25.900
I keep trying to spell surviving, maybe I should find a different word, surviving a month today.
01:01:25.900 --> 01:01:32.600
The chances of surviving a month today is the probability of Y being bigger than M.
01:01:32.600 --> 01:01:35.800
What that means, let us think about that.
01:01:35.800 --> 01:01:42.300
It means, you can think of the beginning of it today, what is my chance of surviving a month?
01:01:42.300 --> 01:01:46.800
You can calculate that out, it is the probability of Y being bigger than M.
01:01:46.800 --> 01:01:54.900
Then maybe, at the end of the day, you get through that day and you say what is my chances surviving another month?
01:01:54.900 --> 01:02:01.400
It is the same is your chance as this morning of surviving a month from this morning.
01:02:01.400 --> 01:02:07.500
In other words, if you survive today, you get a fresh start tomorrow.
01:02:07.500 --> 01:02:14.700
You get you get a fresh start tomorrow, if you survive today.
01:02:14.700 --> 01:02:18.600
It means you just got lucky today, you get a fresh start tomorrow.
01:02:18.600 --> 01:02:25.800
Your probabilities of surviving another month do not change tomorrow.
01:02:25.800 --> 01:02:28.500
It is not like the bad luck will build up.
01:02:28.500 --> 01:02:34.100
If you survive today, it does not mean you are more likely to have your car stolen tomorrow.
01:02:34.100 --> 01:02:38.100
It just means you got lucky and you get a fresh start tomorrow.
01:02:38.100 --> 01:02:44.200
Maybe, you will keep getting lucky, your probabilities will keep staying the same.
01:02:44.200 --> 01:02:48.500
That is what it means to be a memoryless distribution.
01:02:48.500 --> 01:02:51.900
The exponential distribution is memoryless.
01:02:51.900 --> 01:02:56.800
At the end of today, it does not remember that you survived one day.
01:02:56.800 --> 01:03:01.800
It just restarts and it calculates a new for the next month.
01:03:01.800 --> 01:03:11.500
The exponential distribution is memoryless.
01:03:11.500 --> 01:03:22.000
It does not remember that you made it through today and hold it against you,
01:03:22.000 --> 01:03:27.200
and make you more likely to have a car theft tomorrow or the next month.
01:03:27.200 --> 01:03:36.200
It just says you got a fresh start today, I will compute the probabilities for the next month just the same as if we had started today,
01:03:36.200 --> 01:03:40.000
this morning, and calculated the probabilities for a month.
01:03:40.000 --> 01:03:44.500
I do not remember that you got through today, I would not hold it against you.
01:03:44.500 --> 01:03:51.900
I will not build up the bad luck, I will just count a new starting tomorrow.
01:03:51.900 --> 01:03:54.600
That is what it means to be memoryless.
01:03:54.600 --> 01:03:57.800
Let me show you again how we did these calculations here.
01:03:57.800 --> 01:04:03.900
At first, I just read this as an equation and I did not try to think what it meant.
01:04:03.900 --> 01:04:10.400
I calculated this probability as a conditional probability and I use my own conditional probability formula.
01:04:10.400 --> 01:04:16.000
If you do not remember the condition probability formula, I got a bunch of problems on that in an earlier video here,
01:04:16.000 --> 01:04:19.600
near the beginning of this probability lecture series.
01:04:19.600 --> 01:04:25.000
Just scroll up to the top and you will see conditional probability.
01:04:25.000 --> 01:04:33.300
I got this condition probability, I say it is the probability of one event and another event divided by the second event.
01:04:33.300 --> 01:04:39.400
But, these particular events, one subsumes the other, one absorbs the other.
01:04:39.400 --> 01:04:44.100
Because if Y is bigger than D + M, Y is automatically bigger than D.
01:04:44.100 --> 01:04:46.300
I do not need to write that Y is bigger than D.
01:04:46.300 --> 01:04:49.700
I can just drop that out, it just disappears.
01:04:49.700 --> 01:04:54.900
I can just include it in the fact that Y is bigger than D + M.
01:04:54.900 --> 01:05:02.500
Each of these probabilities are in a format that is amendable to this formula that I use in example 2.
01:05:02.500 --> 01:05:06.800
That I actually proved in example 2, we get an integral back in example 2.
01:05:06.800 --> 01:05:14.200
If you do not remember example 2, just go back and look, you will see this formula, same videos, just scroll up and you will see it.
01:05:14.200 --> 01:05:18.700
The probability that Y is bigger than C is E ⁻C/β.
01:05:18.700 --> 01:05:23.200
I drop those values as C D + M and D in here.
01:05:23.200 --> 01:05:27.500
I did a little algebra to simplify and I got E ⁻M/β.
01:05:27.500 --> 01:05:30.400
That was example 2 right there to get to there.
01:05:30.400 --> 01:05:40.100
I used example 2 backwards to go from E ^-β back to the probability of Y being bigger than M.
01:05:40.100 --> 01:05:44.800
I noticed, look that is the right hand side of my equation.
01:05:44.800 --> 01:05:47.500
I'm done, I have proved that that equation is true.
01:05:47.500 --> 01:05:53.400
If one thing to prove that the equation is true, it is another thing to interpret it and really understand what it means.
01:05:53.400 --> 01:05:59.000
I said, let us interpret this as a waiting time until something happens.
01:05:59.000 --> 01:06:02.800
In this case, until your car is stolen.
01:06:02.800 --> 01:06:10.000
This is saying that, if your car, if Y is bigger than D, that means your car is not stolen today
01:06:10.000 --> 01:06:13.200
because you are waiting more than one day for it to be stolen.
01:06:13.200 --> 01:06:18.300
What is your chance of surviving an additional month after today?
01:06:18.300 --> 01:06:25.600
Here is that additional month, that D + M is the additional month given that you made it through today.
01:06:25.600 --> 01:06:31.400
What we worked out is that probability is the same as if we had calculated this morning,
01:06:31.400 --> 01:06:37.900
if we come in this morning and calculated what is the probability of lasting one month from today.
01:06:37.900 --> 01:06:42.200
If we come in this morning, we say, what is the probability of lasting one month?
01:06:42.200 --> 01:06:49.200
We calculate a certain number, or if we wait until tonight and say, I made it through one day,
01:06:49.200 --> 01:06:53.200
what is my probability of lasting another month after this?
01:06:53.200 --> 01:06:59.100
We would have gotten the same number either way because those two numbers are equal.
01:06:59.100 --> 01:07:05.200
If we can make it through today, on the condition that we make it through today, we will get a fresh start tomorrow.
01:07:05.200 --> 01:07:10.800
It will still be exactly the same probability of lasting through another month.
01:07:10.800 --> 01:07:14.200
That is why the exponential distribution is called memoryless.
01:07:14.200 --> 01:07:17.100
It does not remember that you got lucky for one day,
01:07:17.100 --> 01:07:25.200
it just restarts and starts calculating the same probabilities this evening that it calculated this morning.
01:07:25.200 --> 01:07:31.500
You kind of get a fresh start, assuming you are lucky enough to survive through today.
01:07:31.500 --> 01:07:43.300
That wraps up our examples on the Gamma distribution, and exponential, and Chi square distribution. Remember that the Gamma distribution is the overall family.
01:07:43.300 --> 01:07:51.000
And then, two special cases within the Gamma distribution are the exponential distribution and the Chi square distribution.
01:07:51.000 --> 01:07:56.900
Probably the most common of all of those in probability is the exponential distribution, and after that,
01:07:56.900 --> 01:08:06.100
you will be using the Chi square distribution if you take a lot more statistics, that is where Chi square distribution comes up.
01:08:06.100 --> 01:08:09.000
That is the end of our Gamma distribution lecture.
01:08:09.000 --> 01:08:18.200
Next up, we have a nice lecture on the β distribution on, as we keep moving through our continuous distributions.
01:08:18.200 --> 01:08:23.600
This is all part of a larger lecture series on probability here on www.educator.com.
01:08:23.600 --> 01:08:27.000
I am your host Will Murray, thank you very much for joining me today, bye.