Sign In | Subscribe

Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Probability
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Transcription

Lecture Comments (8)

1 answer

Last reply by: Dr. William Murray
Mon Nov 10, 2014 3:00 PM

Post by meleksen akin on November 10, 2014

In gamma distribution class, Example II when yıu define u=y/B, you also define du=1/B dy, how you did this. Is there a rule for this?

1 answer

Last reply by: Dr. William Murray
Mon Oct 27, 2014 11:23 AM

Post by Anton Sie on October 25, 2014

Americans really rock in explaining :) You have saved my life Dr Murray! ^^

1 answer

Last reply by: Dr. William Murray
Tue Aug 5, 2014 4:03 PM

Post by Humam Altayeb on August 1, 2014

Hi, I wonder if you will be able to explain the standard gamma distribution & incomplete gamma function ? thanks

1 answer

Last reply by: Dr. William Murray
Wed May 28, 2014 5:04 PM

Post by Danushka Karunarathna on May 28, 2014

Hey, do you guys offer help with assignments?

Gamma Distribution (with Exponential & Chi-square)

Download Quick Notes

Gamma Distribution (with Exponential & Chi-square)

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Gamma Function 0:49
    • The Gamma Function
    • Properties of the Gamma Function
  • Formula for the Gamma Distribution 3:50
    • Fixed Parameters
    • Density Function for Gamma Distribution
  • Key Properties of the Gamma Distribution 7:13
    • Mean
    • Variance
    • Standard Deviation
  • Exponential Distribution 8:03
    • Definition of Exponential Distribution
    • Density
    • Mean
    • Variance
    • Standard Deviation
  • Chi-square Distribution 14:34
    • Chi-square Distribution: Overview
    • Chi-square Distribution: Mean
    • Chi-square Distribution: Variance
    • Chi-square Distribution: Standard Deviation
  • Example I: Graphing Gamma Distribution 17:30
    • Example I: Graphing Gamma Distribution
    • Example I: Describe the Effects of Changing α and β on the Shape of the Graph
  • Example II: Exponential Distribution 27:11
    • Example II: Using the Exponential Distribution
    • Example II: Summary
  • Example III: Earthquake 37:05
    • Example III: Estimate Using Markov's Inequality
    • Example III: Estimate Using Tchebysheff's Inequality
    • Example III: Summary
  • Example IV: Finding Exact Probability of Earthquakes 46:45
    • Example IV: Finding Exact Probability of Earthquakes
    • Example IV: Summary
  • Example V: Prove and Interpret Why the Exponential Distribution is Called 'Memoryless' 52:51
    • Example V: Prove
    • Example V: Interpretation
    • Example V: Summary

Transcription: Gamma Distribution (with Exponential & Chi-square)

Hi, welcome back to the probability lectures here on, my name is Will Murray.0000

We have been working through the continuous distributions.0007

We have done the uniform distribution and the normal distribution.0010

Today, we are going to talk about the Gamma distribution which is actually a whole family of distribution.0014

I will describe that as we get into it.0019

There are a couple of very important special cases of the Gamma distribution,0022

which are the exponential distribution and the Chi square distribution.0027

I will talk about those as we get into it.0031

First, I’m going to talk about the Gamma distribution, in general.0034

And then, I will talk about the specific special cases of the exponential distribution and the Chi square distribution.0038

We will also do plenty of problems on it, I hope you will be an expert by the time we get through this.0045

Before I talk about the Gamma distribution, I have to tell you about the Gamma function.0051

It is a very confusing thing because there is a Gamma distribution which is a probability distribution and0056

there is also something called the Gamma function which is part of the Gamma distribution.0062

It gets a little bit confusing, I will try to keep it straight for you.0067

The Gamma function is defined by this integral formula right here.0071

The input to the Gamma function is a number α.0077

You think of α as being a number like 3 or 2 ½, something like that.0082

You plug in a positive number into that capital Greek letter Γ right there.0089

That is Γ right there.0095

You take a value of Α and you plug it in right here.0098

And then, you work out this integral and since it is a different integral, it comes out to be another number.0103

This whole thing works out to be another number.0111

I want to emphasize here, the Gamma function is just a function.0120

You plug in a number and it spits a number back out to you.0124

It has some very nice properties which is, the first of which is that Γ of N + 1 = N × Γ of N.0128

That is very similar to the factorial function but it is slightly different.0138

Basically, what happens is the Gamma function behaves similarly to the factorial function, but it shifted over by 1.0143

In fact, when N is a whole number, Γ of N is equal to N -1!.0152

For example, Γ of 4 is equal to 4 -1! which is 3! which is 1 × 2 × 3 which is 6.0159

One way to think about the Gamma function is that, it is a close cousin of the factorial function.0171

The difference is that, the factorial function you can only plug in whole numbers.0178

There is no such thing as 3 ½!.0182

For the Gamma function, you can plug in numbers that are not whole numbers.0186

You could find Γ of 3 ½.0191

It will be a little tricky to do the integral but it is possible.0193

People do calculate Γ of numbers that are not whole numbers.0197

I want to remind you again, this is the Gamma function.0203

We have not talked about the Gamma distribution yet.0206

This is just a function that it takes in the number as input and it spits out an answer as output.0209

It takes a number and it spits out an answer.0218

Next, we are going to move on and talk about the Gamma distribution.0222

The Gamma function is just one ingredient in it, be careful not to mix the two up.0226

I'm going to start out with the formula for the Gamma distribution.0233

You start win two parameters, I’m going to call them α and β, they are both positive numbers.0238

They can be anything you want, as long as they are positive.0244

We have this quite complicated density function for the Gamma distribution.0248

Let me look at each ingredient of this.0253

It is a mixed polynomial parts, there is this polynomial term here, Y ⁺α – 1.0257

There is this exponential term, E ⁻Y/β.0266

There is this denominator, β ⁺Α/Γ of Α.0276

Let me remind you that Γ of Α is the Gamma function.0281

That we learn about on the previous slide, that is the Gamma function.0288

Remember that Α and β are both constants, which means Γ of Α is a constant.0293

This entire denominator here is nothing but one being constant.0301

You should think of it as being kind of the less important part of the Gamma distribution.0307

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.0315

It is just a constant to make the area equal to 1, when you graph the Γ density function.0327

When you graph to get the Γ density function, we will graph some of these later but it might look something like this.0336

You remember, in order to be a density function, the area under the graph always has to be equal to 1.0343

If it is not equal 1 then you want to take your function and we will multiply or divide by whatever it takes,0351

in order to make that area equal to 1.0357

In this case, let me start out with, for the Γ density function is this polynomial and this exponential term.0362

Those are the more important terms in the definition of the density function.0370

And then, we just divide by these constants, in order to make the area come out to be 1.0377

It is defined from 0 to infinity, it is only defined on positive numbers but the numbers can get as big as you want.0384

It is always defined on the right hand side, it goes on forever but only in one direction.0394

It cuts off in the other direction.0399

Let me only remind you again, not to mix up the Gamma function and the Gamma distribution.0402

The Gamma function here, is this part right here, that is the Gamma function that we define on the previous slide.0409

And then this whole thing is the density function for the Gamma distribution, which one ingredient of it is the Gamma function.0417

It is rather confusing but we will practice with it, hopefully, you will learn to keep it straight.0427

A key properties of the Gamma distribution, the mean is given in terms of Α and β.0435

The mean and expected values are the same thing, they come out to be α × β.0441

The variance turns out to be α β².0447

The standard deviation is always the square root of variance, that is just the definition.0451

The standard deviation is just the square root of α × β².0457

Now you know the key values associated with the Gamma distribution.0463

I want to move on and talk about the special families of the Gamma distribution.0472

The special cases which are really the most important × when we use the Gamma distribution.0477

The first one of those is the exponential distribution.0484

Let me go ahead and describe the physical situation in which you would invoke the exponential distribution.0488

Essentially, if you are waiting for a random event to occur and this event occurs every so often,0494

and there is no correlation between previous instances and future instances of the event.0501

The waiting time is a random variable which is an exponential distribution.0508

Typical exponential distribution is waiting for just something happen out of the blue,0516

maybe you are waiting for an earthquake.0521

You really have no idea how long it is going to take for an earthquake to strike.0525

We know that we do have earthquakes on average, every many years0529

but there is not a lot of correlation between one earthquake and the next.0534

The waiting time for an earthquake would be an exponential distribution.0539

Maybe you are working in a call center and you are waiting for the next call to come in.0544

That again, is an exponentially distributed.0550

The time for the next call to come in is exponentially distributed.0553

You could be sitting by the side of a country road and waiting for a car to come along.0559

You really have no idea how long it will be, before a car comes along.0564

The waiting time is exponentially distributed random variable.0568

This sounds a lot like something we have talked about before, back when we are talking about discreet distributions.0575

I did a video on the Poisson distribution.0583

You might think, did we use all the same examples to describe the Poisson distribution?0586

The answer is yes, but the thing we are keeping track of is different.0593

In the Poisson distribution, we were keeping track of how many times that random event occurs.0597

If you are working in a call center, how many calls do you get in an hour?0605

With the exponential distribution, we are keeping track of how long it takes for the next call to come in.0610

We are keeping track of the length of time until the next call comes in.0617

That does not have to be a whole number, it can be any number.0622

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.0625

With the Poisson distribution, we are keeping track of how many calls come in, in the next hour.0633

That does have to be a discreet number.0641

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.0644

That is the difference between the exponential and the Poisson distribution.0654

They both describe the same physical situations but they are keeping track of different quantities.0658

The Poisson distribution is keeping track of how many times something occurs.0664

The exponential distribution is keeping track of the waiting time until the next occurrence.0669

That was all just describing the physical situation for the exponential distribution.0676

I have not even started telling you about the math.0681

Here is the way the math works.0683

The exponential distribution, you start out with the Gamma distribution.0686

Let me write down the formula for the Gamma distribution, just to remind you of the density function.0690

F of Y was equal to Y ⁺α – 1 × E ⁻Y/β.0695

Those are the important terms, the exponential term, and the polynomial term.0704

We also had these constants just to keep the area right, β ⁺Α and Γ of Α.0708

The exponential distribution is one of the Gamma distributions.0719

It is the Gamma distribution where you take α equal to 1.0725

The β you still leave it arbitrary, there is still going to be a β in there but the α are all going to turn into 1.0731

What that means is that, we have Y ⁺α -0, that turns into Y =0 which just turns into 1, that term drops out.0739

The β ⁺Α, since α is 1 just turns into β.0751

Γ of α, that is the Gamma function.0755

It is Γ of 1 which is equal to 0!.0760

The Gamma function on whole numbers is the same as the factorial function,0765

except it shifted over by 1 and 0 factorial is just 1.0771

This whole function simplifies down into E ⁻Y/β × 1/β.0778

We still have, that should be Y is greater than or equal to 0 and less than infinity.0785

That is our density function for the exponential distribution.0794

It is a special case of the Γ family but it is probably the one used most often in a probability situation.0799

Once we know that it is a special case of the Γ family, we can immediately say what it is mean, and variance,0808

and standard deviation are because we just look up the mean, and variance, and standard deviation from the Gamma distribution.0815

It was Α β before, plug in α = 1 and you get the mean is just β.0822

The variance was Α β² before, plug in Α = 1 and you get the variance to be β².0829

The standard deviation was the square root of Α β², plug in Α = 1, you get the square root of β² which is just β.0836

Those are all very easy, as long as you remember the corresponding quantities for the Gamma distribution0848

because the exponential distribution is a special case of the Gamma distribution.0856

We are going to be seeing a lot of the exponential distribution.0864

Let me mention another very common sub family of the Gamma distribution of which is chi square distribution.0868

Chi is a Greek letter, it looks like a X.0878

Sometimes people will use the Greek letter Chi for Chi square distribution.0882

Sometimes people spell it out as chi.0889

It is used most often in statistics, and. Because of that, I'm not going to be doing a lot of work0893

with the chi square distribution in these videos.0899

But it is something that is occasionally studied in probability, I wanted to mention it to you.0903

The important thing I want to emphasize is, it is a special case of the Gamma distribution.0909

You have another new Greek letter that you have to learn.0916

It is the Greek letter ν, that is pronounced ν, that is the Greek letter ν.0920

It looks like a V but it is pronounced ν.0927

Do not call it V because people will think you are an idiot if you call it V.0930

It is the Greek letter ν.0934

For each whole number ν, we have a Chi square distribution with new degrees of freedom.0936

Some people will talk about Chi square with 3° of freedom, or Chi square was 17° of freedom.0943

What you do is, you build a Gamma distribution.0950

Remember, the Gamma distribution has an Α and β.0955

The Α is going to be ν/2 and the β is going to bev 2.0958

Then, you can build the formula for the Chi square distribution, out of the formula for the Gamma distribution.0965

I did not bother to do that because we are not going to use the Chi square distribution so much.0973

We will be spending more time with the exponential distribution.0977

I do want to calculate the mean and variance of the Chi square distribution.0981

Remember, the mean of the Gamma distribution was α × β.0988

In this case, if you multiply R Α × R β, you get ν.0992

The variance was α × β².0998

Α × β², in this case is ν/2 × 2².1002

If you multiply that through then you get two ν.1009

That is the variance of the Chi square distribution.1013

The standard deviation of the Chi square distribution, like all standard deviations is just the square root of the variance.1016

You just take the square root of what we have above.1023

Those are kind of the basic facts about the Chi square distribution.1026

I’m not going to spend more time on the Chi square distribution because1030

it is not common in probability classes, as the exponential distribution.1033

That is where we are going to spend most of our time.1037

Now, you have the basic facts on Gamma distributions and their special cases, the exponential and Chi square distributions.1043

Let us jump into some problems.1050

In our first example, we are just going to be drawing some graphs.1052

We want to kind of understand how the density function for the Gamma distribution plays out.1055

Let me remind you what that density function was.1061

It is F of Y is equal to Y ⁺α – 1 × E ⁻Y/β.1063

Those are the two important terms.1075

If you forget everything else, you want to remember those two terms.1077

The less important terms but they are still there are, β ⁺Α Γ of Α.1080

Now, the reason I was a little bit snooty about the importance of those terms, is that there just constants.1090

They are just thrown in there to make the total area equal to 1.1097

They do not really change the shape of the graph that much.1100

The important terms are the ones in the numerator.1104

We are going to draw some combinations of α and β here.1108

I will draw them in different colors.1114

In the first one here, I will draw the first one I n blue.1118

This is Α is equal to ½ and β is equal to 5.1123

That means I'm graphing Y⁻¹/2 × E ⁻Y/5.1132

There is also a constant which I'm not even going to bother to write.1144

I want to figure out what that does.1150

The important thing here is to look at, remember all these are defined from 0 to infinity.1156

When Y is equal to 0, I got this Y⁻¹/2 here.1163

That means I'm dividing by Y because it is like 1/Y ^½.1169

That means, when you try to plug in Y = 0, the thing blows up to infinity.1174

I'm going to show something that blows up to infinity here at Y = 0.1180

As Y increases, here is Y = 0, and here is Y going out to infinity.1189

As Y increases, what happens is the exponential term kicks in pretty fast.1199

Since it is negative, E ⁻Y/5, it pulls it down pretty quickly to 0.1205

It kind of goes down fairly quickly and is asymptotic to 0.1211

That is the Α = ½, β = 5, part of this graph.1220

Let me do the next one in red.1231

This is α is equal 1 and β is still 5.1234

I got Y⁰ × E ⁻Y/5, Y is 0 is just 1.1244

Again, I'm not writing the constants because they do not change the shape in any fundamental way.1253

They just shift the graph up and down, and pull it back to get an area 1.1258

This one, if I plug in Y = 0, the Y⁰ drops out, this is E ⁺Y/5 divided by some constant.1267

I’m not going to worry about the constant.1280

If I plug in Y = 0, that gives me just E⁰ which is 1.1282

Now, I do not want two say that it is actually equal 1 because that value of the constant might affect it.1288

But, I do know that it is going to be some finite number here.1295

Let me draw that, I cannot make it entirely underneath the blue curve.1302

Because then, it would have smaller area and all of these things have area equal to 1 here.1309

I'm going to have a crossing above the blue curve at some point.1319

There it is, that is α = 1 and β = 5 there.1324

I did actually graph these using a computer and I checked that the intercept there turns out to be about 0.2.1334

Even if you plug 0 in here, you get 1 because that constant pulls it down a little bit.1346

It turns out to be about 0.2.1353

That is what that graph looks like.1356

Let me do the last one in green.1360

My α is 3 and my β is 2.1363

What I'm graphing here is Y ⁺α-1 that is Y² × E ⁻Y/β.1367

Again, there is some constant there but I'm not going to worry about the constant.1376

The key thing here is that, when you plug in Y = 0, Y² is going to be 0.1380

This one starts at the origin.1387

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.1390

But it also has to level off at some 0.20.1398

It is going to go down and just like the others, it would asymptotic to 0.1402

That is the graph corresponding to 3, 2.1408

I got my three different graphs here.1414

What can I learn from this and what can I learn by looking at the equation.1416

The difference here is that, the value of α really seems to change the shape of the graph.1423

Because if Α is less than 1, it is seems to blow up.1429

Let me write this down as I'm saying it.1436

Α controls the shape of the graph in some fundamental way, the shape especially at Y = 0.1439

If Α is less than 1, we got that that 1/2 to 5 graph, it blows up to infinity at 0.1463

Α = 1 goes to a finite number, goes to a positive number, positive at 0.1479

Α bigger than o1, it looks like it is going to pull it down to 0.1497

It goes to 0 at 0, let me put a little color coding on here.1503

The blue one was the α less than 1.1510

The read one was the α equal to 1.1512

The green one was the α bigger than 0, I meant α bigger than 1.1518

Now, we know the Α really seems to control the shape, especially around Y = 0.1533

Different values of α will make it go up to infinity, or go a finite number, or be pulled down to 0.1540

Β is not as important, what β does is, I can see the effect of β right here.1548

Β is just a scaling factor on the exponential term. A larger value of β will point out to the right.1558

It does not change the shape in such a fundamental way.1570

It stretches the graph out to the right.1573

If you are going to stretch the graph out to the right, if you going to stretch it out to the right,1585

the total area always has to be 1.1591

It would have to smash the graph down a bit, to maintain area 1.1594

In answer to the question here, where we have our nice graphs, but Α seems to affect the shape when Y = 0.1611

Β stretches it out and stretches it down but it does not fundamentally change the shape of the graph.1621

In example 2, we have an actuarial calculation.1633

We are going to park a car on the streets of Long Beach California.1637

We are going to see how long it takes for that car to get stolen.1642

This is the kind of thing that actuaries working for insurance companies, calculate all the time.1646

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.1651

If you bought car insurance, they will have to pay you to replace the car.1660

They need to know how often they will have to make those kinds of payouts.1665

This is the kind of thing that the exponential distribution works for.1672

Because again, you are waiting for some random event to happen and there is really no telling when it is going to happen.1678

It might happen tomorrow, it might happen a month from, it might not happen for the next 100 years.1683

If you get lucky, you can leave your car out, in 400 years no one will steal it.1689

But if you are very lucky, it might get stolen tomorrow and you might buy a new car the next day,1693

and that new car might be stolen after that.1699

This is an exponential distribution.1703

We have calculated that your car is stolen once every 12 years, you have a bad day and your car will be stolen.1706

Although that is just an average, it might happen twice in a year, if you are in a really bad year.1713

It might not happen for 30 years, if you are very lucky.1718

We want to figure out the chance that our car will last 24 years without being stolen.1721

Can we go for the next 24 years without being stolen.1728

I want to make a little computation using the exponential distribution, kind of in general.1732

And then, I will apply it to this particular example.1738

If I make a general computation, I think it can be useful for several different problems.1741

I’m going to say the answer, the general answer first.1746

The exponential distribution, the density function remember is, F of Y is 1/β × E ⁻Y/β.1751

That is on the range Y goes from 0 to infinity.1761

In order to calculate probabilities with the exponential distribution, we have to integrate that.1773

I would like to calculate the probability that Y will be a bigger than any particular value C.1780

I'm going to say that and use it for several other problems.1791

You are really want to make sure that you understand this computation.1793

By the way, β there is the mean of the distribution.1797

That was something we figured out on a previous side, you can go back and look that up.1801

The probability that Y is greater than or equal the C, we will use an integral for that.1807

It is the integral from C to infinity because it could be any value from C to infinity of the density function.1811

1/β × E ⁻Y/β × DY.1820

This is going to work a lot better, if I make a little substitution.1828

I'm will make u substitution, I will define u, := means defined to be.1832

I'm defining my variable here right now, to be Y/β.1842

Any time I make any kind of substitution in an integral, I also have to find DU.1847

DU would just be 1/β DY.1854

That is quite convenient because I have a 1/β DY in the integral.1858

My integral will convert into the integral of E ⁻u DU.1864

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.1872

We would not actually finish the integrals in terms of u.1879

The integral of E ⁺u is just E ⁻u × – 1.1882

You can work that out doing another little substitution, if you like.1890

Or you can use of the opposite of the chain role which of course is substitution.1895

That is the same as E ^-, u is Y/β.1903

We are supposed to evaluate that from Y =C to, we will take the limit as Y goes to infinity.1911

That is –E ⁻infinity/β – E ⁻C/β.1925

A lot of negatives in here, but fortunately, E ⁻infinity that is 1/E ⁺infinity.1938

This is just 0, that term goes away.1946

These negatives cancel and we get positive E ⁻C/β.1949

I want to hang onto this result, the probability of Y being greater than or equal to C is equal to E ⁻C/β.1958

We are going to use that in several different problems here with the exponential distribution.1967

Make sure you understand that calculation.1971

Make sure you are able to repeat that.1974

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.1977

In this case, what do we want to calculate.1983

We want to calculate the probability that our car will last 24 years without being stolen.1986

The probability that the waiting time for a car to be stolen is more than 24 years.1992

The probability that Y will be greater than or equal to 24.1999

Now, using the formula that we just worked out, that is E ⁻C/β.2005

Β was the mean, that is the average amount of time until somebody's car is stolen.2011

We are given that, it is your car is stolen every 12 years.2017

If you just park your car as usual and go about your daily business, on the average,2021

once every 12 years, you are going to wake up and say oh my gosh, they stole my car.2027

The C value is 24 and the β value is 12, this is E ⁻24/12 here, which is E⁻².2033

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%.2063

The probability that your car will last for 24 years without being stolen is fairly well.2082

Probably, within the next 24 years, it happens to most people sooner or later, you are going to lose a car.2090

Certainly, the actuaries working for the insurance companies want to know what that probability is,2097

so they know how likely is that the company will have to pay you to replace your car.2103

And in turn, they know how much to charge to cover that kind of insurance.2108

That is the answer here, the probability of lasting 24 years is 13%.2115

Let me recap the steps here.2121

In particular, I want to emphasize this initial calculation because we are going to use it over and over again.2123

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.2129

Here is the density function for the exponential distribution, 1/β × E ⁻Y/β.2136

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,2144

we plug in those values for this integral C ⁺infinity because the exponential distribution does go on to infinity.2156

Little substitution got us through that integral, plug in the values, to get this,2164

we took a limit but it is an easy limit because E ⁻Y as Y goes to infinity is just E ⁻infinity.2171

1/E ⁺infinity is 0.2181

Here, the negatives all canceled and we got E ⁻C/B.2184

Let me summarize that, that C/β because that is what I want you to remember.2189

I want you to be able to just recall it for future problems.2195

For this particular problem, our C value was 24, our β was 12 that came from the average of 12 years.2201

The mean of the exponential distribution is β.2209

I just plugged in 24 and 12, and we got E⁻².2214

I convert that into a percentage of 13.5%.2220

In examples 3, we have seismic data indicating that the time until the next major earthquake2227

in California is exponentially distributed.2235

Again, this is kind of a classic application of the exponential distribution.2238

You are waiting for something to happen and it happens kind of randomly.2244

Sometimes it happens, sometimes it does not.2248

In this case, it happens on average once every 10 years but2250

you might have two earthquakes in one decade and no earthquakes in the next decade.2253

We want to find the chance that there will be an earthquake in the next 30 years.2257

In this case, we are not calculating exactly, we are going to estimate.2262

We are going to use our two Russian inequalities, Markov's inequality and Chebyshev’s inequality.2267

Let me remind you what Markov’s inequality went.2276

It is in the probability that a random variable will be bigger than a particular constant,2280

is less than or equal to the expected value of that variable divided by the constant that you are interested in.2286

In this case, the constant we are interested in is 30 years because I am estimating the chance that2295

there will be an earthquake in the next 30 years.2305

My A is 30, the expected value is the mean of the variable.2308

In this case, we are given that there is a mean of 10 years, this is 10.2316

10/30 simplifies down to 1/3.2321

That was the probability that Y is bigger than A.2325

That is the probability that it will take longer than 30 years to have an earthquake.2329

But we want the chance that there will be an earthquake in the next 30 years,2336

meaning the next one comes in less than 30 years.2340

Our Y here is the waiting time.2345

We are trying to estimate the probability that there is an earthquake in the next 30 years.2350

That would be Y less than A, the probability that Y is less than A.2355

We have to flip the inequality here, if the probability that it is greater than A is less than 1/3,2364

this is the probability of being less than A.2372

Let me go ahead and fill in 30 here, is greater than or equal to 1 -1/3, 2/3.2375

That means there is at least a 2/3 chance that there will be an earthquake in the next 30 years.2384

That the waiting time for the earthquake is less than 30 years.2390

Within the next 30 years, we are due with a probability of at least 2/3.2396

Maybe, it is even higher than that, I do not know just by using Markov’s inequality.2401

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.2405

Let me calculate the same thing using Chebyshev’s inequality.2414

Again, I will remind you what that is.2417

This is Markov’s inequality right here, Chebyshev’s tells us that the probability of Y minus μ, the mean, being bigger than K σ.2419

Σ is the standard deviation is less than or equal to 1/K².2434

By the way, I have some earlier lectures right here in the probability lecture series,2439

right here on that cover Markov’s inequality and Chebyshev’s inequality.2445

That is why I'm not developing them from scratch for you here.2450

But if you do not remember Markov’s inequality and Chebyshev’s inequality,2453

you just go back and watch those other lectures on those two inequalities and get all caught up.2457

You will be ready to go with this example.2463

In this case, let us figure out what some of these values are.2467

Our μ is our mean, in this case, it is the mean of the exponential distribution is β which is 10.2470

Σ is our standard deviation, σ for the exponential distribution, I said that a couple of slides ago, is also β, that is 10.2479

We want the probability that Y will be greater than 30.2491

Because, I want to calculate the probability that Y is less than 30 but I will come back to that later.2498

I’m going to start out with the probability that Y is greater than 30.2505

30 is 2 standard deviations bigger than 10 because the mean is 10, then, μ = 10.2509

The mean is 10 and the standard deviation is 10.2528

In order for it to be bigger than 30, it is got to be 2 standard deviations bigger than 10.2531

That means our K value is 2.2538

The probability that Y – μ is bigger than or equal to 2 σ is less than or equal to,2540

Chebyshev’s tells us it is less than or equal 1/K².2550

1/K² which is 1/2² which is ¼.2554

That is the probability that Y is bigger than 30.2560

The probability that Y is less than 30 is, if the probability that it is bigger than 30 is less than ¼,2564

this would be greater than 1 -1/4 which is ¾.2577

That makes our prediction of an earthquake a little more dire.2583

It says that the probability that there would not be an earthquake within the next 30 years is at least ¾,2587

at least 75% chance that we will have an earthquake in the next 30 years, according to Chebyshev’s inequality.2594

It gets us a more accurate prediction, by the way, that is not saying that Markov’s inequality was wrong.2604

Markov said it is at least 66%, Chebyshev’s says it is even bigger than that, it is at least 75%.2609

They are both right but Chebyshev’s gives us the stronger result.2618

The reason it give us a stronger result is because we had to go through a little more work to do it.2622

We had to use more information, the mean and the standard deviation, in order to calculate it.2627

Let me recap how we got these results.2634

First of all, if you do not remember Markov’s inequality and Chebyshev’s inequality,2637

I have got lectures here on

Just scroll up in the probability series and you will see the lectures on Markov’s inequality and Chebyshev’s inequality.2645

You will see where these initial formulas are coming from.2651

The Markov’s inequality said that, the probability Y being bigger than the cutoff is less than the mean divided by that cutoff value.2654

In this case, we are interest in the probability of Y being bigger than 30,2664

because we want to have an earthquake in the next 30 years, whether it comes before 30 or after 30.2668

A is 30, our mean is, we got that here, we fill that in as 10 and we get 1/3.2675

Remember, that is the probability of being bigger than 30, that means we wait more than 30 years to get an earthquake.2683

But that is not we are interested in, we are interested in waiting less than 30 years.2693

We have to flip it around, from 1/3 we flip it around to 1 -1/3 is 2/3.2697

We have to flip the inequality, the probability is more than 2/3 that we will have an earthquake.2705

Here is the formula for Chebyshev’s inequality, it is based on the standard deviation which is 10 and the mean which is 10.2713

And then you ask yourself, how many standard deviations away from the mean am I going?2722

In this case, we are interested in 30.2728

30 is 2 standard deviations away from the mean.2731

That is because 30 – the mean of 10 divided by the standard deviation of 10 is 2.2735

That is where I get my K there.2743

There is K is 2, and I plug in K is equal to 2.2746

The probability is less than 1/K², that is 1/2² is ¼.2751

Again, that is the probability that Y will be greater than 30.2757

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.2761

We have to say it is greater than ¾.2771

Our probability of having an earthquake is at least 75%, that is scary if you live in Southern California.2775

In the next example, we are going to use the same basic setup except we are going to calculate the probability exactly,2784

instead of estimating it, using Markov and Chebyshev’s.2791

You want to make sure you understand this example and understand the same basic setup,2795

before you go on to the next example, example 4.2801

In example 4, we are using the same setup that we had from example 3.2806

You might want to go back and check over example 3.2811

Same thing, we have waiting for an earthquake to happen and we know that they happen once every 10 years on average.2814

That is going to be our mean and that is going to be our β, follows an exponential distribution.2822

We want to find the exact probability that there will be an earthquake in the next 30 years.2827

We want to find the probability that Y is less than or equal to 30.2835

Remember, Y is our waiting time for an earthquake.2841

How long do we have to wait until the earth starts shaking?2849

What is the chance that that will be less than 30 years?2853

Now, I think the easier way to calculate this is to do 1 - the probability that Y is greater than or equal to 30.2857

The reason I frame it like that, is because we have a formula that we worked out back in example 2.2866

Let me show you that formula from example 2.2875

From example 2, we work this out, the probability of Y being bigger than the value C is equal to E ⁻C/β.2880

We did an integral to calculate that, it cost us some work.2895

If you do not remember that or you work that out on your own, just go back and watch example 2 again,2898

and you will see where that result comes from.2905

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,2907

because these are continuous distributions, it does not matter.2921

Continuous distributions, the probability of any exacta value is 0.2926

The probability that it is equal to 30 is 0.2931

What is the chance that you are going to have an earthquake exactly 30 years from now?2934

That is not going to happen, it will not be exactly 30 years, it will be 30.1 years or 29.8 years.2938

You do not have to worry about being exactly equal to 30,2946

which means I do not have to worry about whether I write greater than, or greater than or equal to.2950

Using my formula back from example 2, this is 1 – E ⁻C is 30 that is 30.2957

My β is 10, I got that up here.2966

30/10 is 1- E⁻³, I threw that into my calculator and my calculator spat out the number 0.9502.2971

My probability of having, these are approximations, I guess, there are some small rounding involved.2988

That is just about 95%, what that means is that the exact or very close to exact probability of2995

there being an earthquake in the next 30 years is 95%.3004

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.3009

That is not too surprising, if we have it 10 years on average, it is not very likely that3017

we will survive 3 decades without having an earthquake.3021

It is quite likely that there will be an earthquake, sometime in the next 30 years.3025

Now we know that the exact probability is 95%.3029

Notice that, this does not contradict the answer from the previous problem.3033

In the previous problem, we are calculating the same thing except you are3038

just using rough estimations using Markov's inequality and Chebyshev’s inequality.3042

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.3048

In examples 3, we used Markov to estimate this probability.3054

I have to remember the spelling of Chebyshev’s, fortunately you can spell Chebyshev’s3060

almost any way you like and it will be right according to some of version the name.3064

That is how I’m going to spell it.3069

Markov said that it was greater than or equal to 2/3.3071

Yes, 95% is greater than 2/3, that was not wrong.3077

Chebyshev’s said that the probability was greater than or equal ¾.3082

Yes it is, 95% is greater than ¾, that checks a little bit with our previous answers.3087

But of course, we get a much stronger answer from calculating it exactly and actually doing an integral.3095

We did a rollback in example 2 here.3102

Just to recap here, we want the exact probability that there will be an earthquake in the next 30 years.3106

That means our waiting time would be less than 30.3112

That is 1- the probability of it being greater than 30.3116

We did an exponential distribution, we figure out this nice formula back in example 2 of3120

the probability of a variable being bigger than the cut off.3127

It is E ⁻C/β.3131

I just plug in C = 30 and then β was the mean, that is 10.3133

And then, I simplified that down and I got 95%, that is my exact probability or very close to around a little bit.3140

But, that is basically the exact probability that there will be an earthquake in the next 30 years in California.3148

Of course, I can check that against the answers I got in example 3 where I just estimated using Markov and Chebyshev’s.3154

Those were not exact calculations, those are estimations, but it certainly agrees with those two answers.3161

In example 5, we have an exponential distribution and it does not tell us what the mean is this time.3172

I guess we just have to call it β.3178

D and M are some constants, we will have very little concrete in this problem.3180

We have to prove this strange expression, it says, I see here we have conditional probability.3185

This line is conditional probability, I have to remember that, the formula for conditional probability.3190

We have to prove that the probability of Y being bigger than D + M given that Y is bigger than D3202

is equal to the probability of Y being bigger than M.3209

Somehow, that is supposed to have something to do with the word memoryless.3214

The exponential distribution is known as the memoryless distribution.3218

We need to interpret that and justify it somehow.3223

The first thing I'm going to do with this problem is, remind you of a formula that we derive back in example 2.3227

If you have not watched example 2 in the recent past, you should go back and watch that right now3236

because we are going to be using the formula for the exponential distribution.3244

It tells us that the probability that Y is bigger than C is equal to E ⁻C/β.3248

That is going to be very useful, we calculated an integral back in example 2 to find that,3258

but we are not going to recalculate it now, I'm just going to use it.3263

I'm going to go ahead and start working out the left hand side of this expression.3268

It might get a little complicated but hopefully I can simplify it down to the right hand side.3274

The left hand side LHS is, remember, we have to use conditional probability here.3278

The probability of A given B, this is an old formula, I gave a lecture of video on it many moons ago.3287

If you do not remember that, you can always look up on my previous lecture on it.3296

It is right here on

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.3301

Let us figure out what that means in this situation.3315

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.3318

Let us think about that, if Y is bigger than D + M, then Y is definitely bigger than D.3336

I did not say it here but I'm assuming that D and M are all positive numbers.3342

If Y is bigger than D + M, then it is definitely bigger than D.3349

I do not really need to say Y is still bigger than D.3352

I can just say the probability that Y is bigger than D + M.3355

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,3360

I do not know why I say Y + D above should have been bigger than.3367

Y is still bigger than D.3372

We can calculate each one of those and we are going to use this result from example 2.3376

We use this result right here from example 2.3381

That is E ^-/ our C is D + M, D + M divided by β, all divided by E ⁻D/β.3384

We have a fraction of exponents here, we can do a little flip.3400

Maybe flip it up to the top there.3406

That is E ⁺D/β, since we pulled it out of the denominator – D + M/β.3408

Now, that simplifies down a little bit into, D/β canceled and we are left with E ⁻M/β.3421

If we use this result from example 2, that is exactly, that 2 sure looks like a1, does in it?3431

Let me change that into a real, honest 2.3439

This is the probability that Y is bigger than M.3443

Low and behold, we have the right hand side appearing here.3450

We have proved our equation that we set out to prove here.3458

I have not really given much of an interpretation as to what that might mean, but I certainly know it is true.3466

I certainly know that this equation is true.3473

And now, I have to think about what it really means.3476

Let us say that the exponential distribution, what it measures is the waiting time until some random event occurs.3482

An example I used earlier on was some unpredictable event,3492

sometimes it happens and you never really know when it is going to happen.3497

An example I picked was your car being stolen.3501

Let us have Y be the waiting time until how long do you have to wait,3506

just leaving your car around on the street until your car is stolen.3519

What does this equation mean?3524

Let me pick THE values for D and M.3527

Let us say D is one day and M is one month, D + M would be one month and one day.3531

That is why I picked D and M in the first place because I was thinking ahead to this.3545

What this is really saying, the probability, we have conditional probability here.3550

This means, given that Y is bigger than D.3556

Suppose Y is bigger than D, that means you may get through the first day without your car being stolen.3561

Suppose your car is not stolen today, that means you made it through the first day, thank goodness.3570

Y is bigger than D, you made it through at least 1 day without any theft of your car.3589

Given that you made it through today, what is your chance of making it through a whole month more after today?3597

Then your chance of surviving, surviving meaning your car is not stolen, surviving another month,3608

an extra month on top of today.3629

What we are really calculating there is, the probability that your car will now survive a day3634

and another whole month given that it is already survive one day.3643

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.3650

It is the same as the chance of surviving a month today.3668

I keep trying to spell surviving, maybe I should find a different word, surviving a month today.3675

The chances of surviving a month today is the probability of Y being bigger than M.3686

What that means, let us think about that.3692

It means, you can think of the beginning of it today, what is my chance of surviving a month?3696

You can calculate that out, it is the probability of Y being bigger than M.3702

Then maybe, at the end of the day, you get through that day and you say what is my chances surviving another month?3707

It is the same is your chance as this morning of surviving a month from this morning.3715

In other words, if you survive today, you get a fresh start tomorrow.3721

You get you get a fresh start tomorrow, if you survive today.3727

It means you just got lucky today, you get a fresh start tomorrow.3735

Your probabilities of surviving another month do not change tomorrow.3738

It is not like the bad luck will build up.3746

If you survive today, it does not mean you are more likely to have your car stolen tomorrow.3748

It just means you got lucky and you get a fresh start tomorrow.3754

Maybe, you will keep getting lucky, your probabilities will keep staying the same.3758

That is what it means to be a memoryless distribution.3764

The exponential distribution is memoryless.3768

At the end of today, it does not remember that you survived one day.3772

It just restarts and it calculates a new for the next month.3777

The exponential distribution is memoryless.3782

It does not remember that you made it through today and hold it against you,3791

and make you more likely to have a car theft tomorrow or the next month.3802

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,3807

this morning, and calculated the probabilities for a month.3816

I do not remember that you got through today, I would not hold it against you.3820

I will not build up the bad luck, I will just count a new starting tomorrow.3824

That is what it means to be memoryless.3832

Let me show you again how we did these calculations here.3834

At first, I just read this as an equation and I did not try to think what it meant.3838

I calculated this probability as a conditional probability and I use my own conditional probability formula.3844

If you do not remember the condition probability formula, I got a bunch of problems on that in an earlier video here,3850

near the beginning of this probability lecture series.3856

Just scroll up to the top and you will see conditional probability.3859

I got this condition probability, I say it is the probability of one event and another event divided by the second event.3865

But, these particular events, one subsumes the other, one absorbs the other.3873

Because if Y is bigger than D + M, Y is automatically bigger than D.3879

I do not need to write that Y is bigger than D.3884

I can just drop that out, it just disappears.3886

I can just include it in the fact that Y is bigger than D + M.3890

Each of these probabilities are in a format that is amendable to this formula that I use in example 2.3895

That I actually proved in example 2, we get an integral back in example 2.3902

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.3907

The probability that Y is bigger than C is E ⁻C/β.3914

I drop those values as C D + M and D in here.3919

I did a little algebra to simplify and I got E ⁻M/β.3923

That was example 2 right there to get to there.3927

I used example 2 backwards to go from E ⁻β back to the probability of Y being bigger than M.3930

I noticed, look that is the right hand side of my equation.3940

I'm done, I have proved that that equation is true.3945

If one thing to prove that the equation is true, it is another thing to interpret it and really understand what it means.3947

I said, let us interpret this as a waiting time until something happens.3953

In this case, until your car is stolen.3959

This is saying that, if your car, if Y is bigger than D, that means your car is not stolen today3963

because you are waiting more than one day for it to be stolen.3970

What is your chance of surviving an additional month after today?3973

Here is that additional month, that D + M is the additional month given that you made it through today.3978

What we worked out is that probability is the same as if we had calculated this morning,3985

if we come in this morning and calculated what is the probability of lasting one month from today.3991

If we come in this morning, we say, what is the probability of lasting one month?3998

We calculate a certain number, or if we wait until tonight and say, I made it through one day,4002

what is my probability of lasting another month after this?4009

We would have gotten the same number either way because those two numbers are equal.4013

If we can make it through today, on the condition that we make it through today, we will get a fresh start tomorrow.4019

It will still be exactly the same probability of lasting through another month.4025

That is why the exponential distribution is called memoryless.4031

It does not remember that you got lucky for one day,4034

it just restarts and starts calculating the same probabilities this evening that it calculated this morning.4037

You kind of get a fresh start, assuming you are lucky enough to survive through today.4045

That wraps up our examples on the Gamma distribution, and exponential, and Chi square distribution. Remember that the Gamma distribution is the overall family.4051

And then, two special cases within the Gamma distribution are the exponential distribution and the Chi square distribution.4063

Probably the most common of all of those in probability is the exponential distribution, and after that,4071

you will be using the Chi square distribution if you take a lot more statistics, that is where Chi square distribution comes up.4077

That is the end of our Gamma distribution lecture.4086

Next up, we have a nice lecture on the β distribution on, as we keep moving through our continuous distributions.4089

This is all part of a larger lecture series on probability here on

I am your host Will Murray, thank you very much for joining me today, bye.4103