For more information, please see full course syllabus of Probability

For more information, please see full course syllabus of Probability

### Beta Distribution

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
- Beta Function
- Beta Distribution
- Key Properties of the Beta Distribution
- Example I: Calculate B(3,4)
- Example II: Graphing the Density Functions for the Beta Distribution
- Example III: Show that the Uniform Distribution is a Special Case of the Beta Distribution
- Example IV: Show that this Triangular Distribution is a Special Case of the Beta Distribution
- Example V: Morning Commute

- Intro 0:00
- Beta Function 0:29
- Fixed parameters
- Defining the Beta Function
- Relationship between the Gamma & Beta Functions
- Beta Distribution 3:31
- Density Function for the Beta Distribution
- Key Properties of the Beta Distribution 6:56
- Mean
- Variance
- Standard Deviation
- Example I: Calculate B(3,4) 8:10
- Example II: Graphing the Density Functions for the Beta Distribution 12:25
- Example III: Show that the Uniform Distribution is a Special Case of the Beta Distribution 24:57
- Example IV: Show that this Triangular Distribution is a Special Case of the Beta Distribution 31:20
- Example V: Morning Commute 37:39
- Example V: Identify the Density Function
- Example V: Morning Commute, Part A
- Example V: Morning Commute, Part B
- Example V: Summary

### Introduction to Probability Online Course

### Transcription: Beta Distribution

*Hello, you are watching the probability lectures here on www.educator.com, my name is Will Murray.*0000

*Currently, we are working our way through the continuous distributions.*0005

*We have already had videos on the uniform distribution and the Gamma distribution *0009

*which included the exponential distribution, and the Chi square distribution.*0014

*Today, we are going to talk about the last of the continuous distributions which is the β distribution.*0018

*It is similar to the Gamma distribution, you will see some of the same elements but of course, it is also different.*0024

*Let us check it out. *0030

*Before we jump into the actual β distribution, we have to learn what the β function is.*0032

*The first thing that you have to keep straight here is that, there is a β function and then there is β distribution.*0037

*They are not exactly the same thing.*0044

*We are going to use the β function in the process of defining the β distribution.*0046

*In that sense, it is like the Gamma distribution where we had a Gamma function and then we also had a Gamma distribution.*0051

*The Gamma function was just one part of the Gamma distribution.*0057

*Let us see what the β function is.*0061

*We had two fixed parameters, there is always an Α and there is a β.*0063

*The β distribution and the β function, it is the whole family of things.*0069

*Because you could pick any different value for α you want and any different value for β you want.*0075

*Let us define the β function.*0080

*What we do is, you want to think of Α and β as being numbers.*0083

*You take these numbers α and β, and you plug them into this integral.*0088

*We have the integral of Y ⁺α – 1 × 1 – Y ⁺β – 1 DY, that is just some integral.*0092

*Remember, α and β are constants.*0101

*We plug in constant values and then, you have an integral that *0105

*you can solve using calculus 2 methods and you will get some constant number.*0109

*The idea is that you plug in Α and β, the β function will spit out a particular number, a constant value.*0114

*There is a relationship between the Γ and the β functions, *0125

*which often makes it quite easy to evaluate the β function, which is that B of Α × β is equal to Γ of Α × Γ β ÷ Γ of Α + β.*0129

*That is very convenient if you have whole numbers because this relationship between Γ of N and the factorial function.*0145

*Γ of a whole number is exactly equal to N -1!.*0156

*If you know the numbers for Α and β here, you can just drop them into these 3 Gamma functions, *0162

*and evaluate those using factorials, and it turns out to be something fairly easy to evaluate.*0169

*You can find B of α and β fairly quickly as a number, just by calculating out some factorials.*0176

*If they are not whole numbers then it is a much more difficult proposition.*0183

*We are not going to get into that.*0186

*Remember, this is just the β function, I have not talked yet about the β distribution.*0188

*β function is just something we plug in two numbers, Α and β, and it spits out a number as an answer.*0193

*Next to a step is to see how that is incorporated into the β density function, *0201

*which is the density function for the β distribution.*0208

*Now, we are going to talk about the β distribution.*0213

*Remember, we already talked about the β function, that is different from the β distribution but*0215

*it is part of the β distribution.*0220

*The idea here is that, we want to define the double polynomial distribution.*0222

*It is always on the interval from 0 to 1, we always have Y going from 0 to 1.*0229

*We want to define this double polynomial distribution using essentially the function Y ⁺α -1 and 1 - Y ⁺β -1.*0232

*The point there is that, it is symmetric between 0 and 1.*0247

*Whatever the function does at 0, the 1 - Y behaves similarly at 1, depending on what the values of α and β are.*0253

*That is the basic function that we want to look at.*0263

*The problem is that, if we integrate that, we might not necessarily get it exactly equal to 1.*0265

*The probability density function must always satisfy the property that, when you integrate it,*0272

*we take the integral over the whole domain with the answer has to come out to be 1.*0279

*In order to fix that, what we do is we take this Y ⁺α -1 and 1 – Y ⁺β-1.*0285

*We just divide by the value of the integral, in order to make the integral come out to be 1.*0292

*That is how we create the density function for the β distribution.*0299

*We start out with Y ⁺α -1 × 1 – Y ⁺β -1.*0303

*And then, we divide it by the integral of that function, in order to not make the total integral come out to be 1.*0309

*You really want to think of this B of Α β in the denominator here, *0316

*it is just a correction term that we put in there to make the total integral come out to be 1.*0321

*It is just a constant and it is just sort of a fudge factor really, *0326

*that is probably the best way to think of it as a fudge factor to make the integral come out to be 1,*0336

*the integral of F of Y DY equal to 1.*0344

*It is not really the most important part of the function here.*0349

*The most important part are these two polynomial terms, the Y ⁺α -1 and 1 – Y ⁺β -1.*0354

*You want to think of those as the really important part of the function.*0362

*Those are the ones that give its shape and we will explore some of the graphs later.*0365

*This denominator is just a constant, it is a fudge factor the gets thrown in there, *0370

*in order to make the total integral come out to be 1.*0374

*The denominator is exactly the β function that we learn on the previous slide.*0379

*It is read up exactly to be the integral of Y ⁺α -1, 1 –Y ⁺β -1.*0385

*We divide by that constant, the whole integral now comes out to be 1.*0393

*That is the density function for the β distribution.*0397

*Remember, it is a kind of a polynomial thing and also remember that,*0401

*the density function and the β function are two different things, let us try to keep those straight.*0405

*We have the β distribution, we should figure out the key properties, I have listed them here.*0414

*Remember, the mean is always the same as expected value.*0419

*Expected value and mean are synonymous, they mean the same thing.*0423

*The mean for the β distribution is Α/Α + β.*0427

*That is a fairly easy formula to keep track of.*0433

*The variance is much more complicated and much harder to remember.*0437

*The variance turns out to be Α × β ÷ α + β² × Α + β + 1.*0440

*Much messier formula for the variance, we will see an example of that in the problems later on.*0450

*You will see how that gets used.*0456

*The standard deviation is usually not worth remembering, because you can always figure it out,*0458

*if you remember the variance.*0463

*The standard deviation is always the square root of the variance.*0465

*That is true for any distribution not just the β distribution.*0469

*The standard deviation, what we do is we just take that complicated formula for the variance *0472

*and we slap a square root around everything.*0477

*It is really not that enlightening by itself, it is more useful to remember the mean and variance of the β distribution.*0481

*In example 1, we are going to calculate B of 3, 4.*0492

*Just little practice with the β function first, before we jump into actually solving any probability problems.*0498

*The solution here is to, there are two ways you can do it.*0505

*One way would be to solve this as an integral.*0510

*Here is α, and here is β.*0516

*You could solve this out as an integral, the integral from 0 to 1 of Y ⁺α – 1 1 – Y ⁺β-1 DY.*0518

*Because that is the definition of B of Α β, that is the definition there.*0533

*You can solve out this integral, it would not be too bad because you plug in Α = 3 and β = 4.*0538

*You just do a little calculus and it would come out to be some number.*0547

*I'm not going to do it that way because I do not want to do that much calculus.*0552

*Let me show you another method to do it, instead.*0555

*The other method is, to remember this relationship between the β function and the Gamma function.*0559

*We learn that several slides ago, you can go back and check that if you did not pick up on that and register it the first time.*0567

*But, the relationship between the β function and the Gamma function is that, B of α and β is Γ of Α × Γ of β ÷ Γ of Α + β.*0574

*That is where it translates everything here into Gamma function.*0591

*I will go ahead and fill in α = 3 and β = 4.*0595

*Our Gamma of α + β will be Γ of 3 + 4 is 7.*0602

*I have to solve some Gamma functions but remember that Gamma function is, *0609

*it can be thought of as a generalization of the factorial function.*0615

*Γ of N is just N -1!.*0619

*This is, Γ of 3 would be 2!, Γ of 4 would be 3!, and Γ of 7 would be 6!.*0624

*Now, it is very easy just to calculate those factorials.*0635

*2! Is just 2, 3! Is 6, 6! is 9 × 2 × 3 × 4 × 5 × 6. *0638

*I'm writing it like that because now, I can cancel some things, I will not have to multiply by big numbers.*0654

*I will cancel the 6 there and I will cancel that 2 with that 2.*0659

*And now, I have got 1/3 × 4 × 5 which is 3 × 4 is 12 × 5 is 60, 1/60.*0664

*To remind you how that worked.*0681

*There are two ways I could have solve this.*0683

*I could use the original definition of the β function which is an integral formula.*0685

*And then, I would just plug in the values of the Α and β and done some calculus to work out the integral formula.*0691

*I see that with the benefit of having gotten the other way, that my integral better has worked out to be 1/60.*0698

*The way I actually calculated it, was to use this relationship between *0708

*the β function and Gamma function which I gave you a couple slides ago.*0713

*Translates a β function into three computations using Gamma functions.*0719

*I dropped in the values for Α and β, and converted those into factorials.*0725

*Remember, the Gamma function is just like the factorial function except offset by 1, *0730

*when you have a whole number in there.*0735

*I plugged in those factorials, calculated it out, and simplified it down to a relatively nice fraction there.*0738

*In example 2, we are asked to graph several density functions for the β distribution,*0747

*using several combinations of Α and β.*0753

*Let me first remind you what the density function is for the β distribution.*0756

*The density function for the β distribution is F of Y is equal to Y ⁺α – 1 1- Y ⁺β -1.*0763

*Those are really the important factors in the density function for the β distribution.*0777

*There is one other factor but it is just a constant, and it is the sort of correction term.*0782

*This fudge factor that gets introduced, in order to make the total integral be 1.*0787

*I'm just going to write that as a constant here.*0793

*I’m not going to even bother to work that out for the different combinations here because *0795

*that is not so important to determining the shape.*0800

*What is really important to determining the shape is the values of Α and β, *0803

*and those factors of Y ⁺α -1 and 1 - Y ⁺β -1 in the numerator.*0808

*Let me set up some axis here and we will take a look at these different combinations of Α and β.*0817

*Here are my axes.*0826

*Remember, the β distribution is always defined from Y equal 0 to Y = 1.*0828

*Up at Y here, it is a little confusing on the X axis.*0835

*But here is Y = 0 and here is Y = 1.*0839

*The important thing to look at here, are the different values of Α and β.*0845

*In particular, whether they are greater than 1 or less than 1.*0850

*Here is why, let us look at the key part of the density function here is Y ⁺α – 1.*0856

*Let us think about what that does for different values of Α.*0868

*At Y = 0, let us think about what that does.*0876

*If Α is bigger than 1, that means our exponent Y ⁺α -1 is positive.*0882

*Y ⁺α-1 will go to 0.*0890

*If Α is equal to 1 then Y ⁺Α -1 would just be Y at 0 go to 1.*0900

*If Α is less than 1 then Y ⁺α -1 will be Y to a negative number.*0910

*0 to negative power, it is like trying to divide by 0, that will go to positive infinity.*0917

*That helps me characterize the behavior at Y = 0 depending on the different values of Α.*0927

*The same kind of thing happens, if we look at 1 - Y ⁺β -1.*0934

*This similar kinds of phenomenon will occur at Y = 1, because if Y goes to 1 then 1 - Y goes to 0.*0944

*If β is bigger than 1 then 1 - Y ⁺β -1 goes to 0.*0956

*If β is equal to 1 then 1 - Y ⁺β -1 goes to 1.*0964

*If β is less than 1 then 1 - Y ⁺β -1 goes to infinity, because we are trying to take 0 to a negative exponent there.*0972

*Now, we will look at the different combinations of α and β.*0985

*In the first combination here, I see I got an Α of ½ and a β of 2.*0988

*Α of ½ is less than 1 that means it is going to go to infinity at Y = 0.*0994

*A β of 2 is bigger than 1, that means that Y = 1, it is going to go to 0.*1002

*I got something that goes to infinity as Y goes to 0.*1012

*And then, it comes down, let me make it a little steeper and in it is declined *1021

*because we are only allowed at the total area 1 here.*1027

*We are allowed to have total area 1.*1033

*It has to come down and hit 0 at Y = 1.*1037

*What we got right there is the graph of Α = ½ and β is equal to 2.*1043

*Let me do the next one in a different color.*1052

*I will do 1 and 4 in green, that Α is 1 and β is 4.*1055

*I see when α is equal to 1 and Y is equal to 0, it goes to 1.*1064

*Now, that is a little bit misleading.*1070

*I cannot say it is exactly equal to 1 because I'm kind of ignoring the effect of this constant here.*1072

*It is going to be 1 ÷ some constant.*1079

*Let me just show it at some finite value.*1084

*The important thing there is, it is not going 0 and it is not going to infinity.*1088

*I see that, as it goes to Y = 1, the β value is still bigger than 1.*1093

*It still going to go down to 0 there.*1100

*Let me make that a little more rounded, more curved, it is not a completely straight line.*1116

*That is my combination for Α is equal to 1 and β is equal to 4.*1128

*And that means that, at 0 it is going to go to a finite limit and at 1 it is going to go down to 0.*1140

*I will do the next one in red, α is 10 and β is 2.*1151

*What is that mean, Α is 10, that is way bigger than 1 which means at Y = 0, it is definitely going to go to 0.*1159

*It is so much bigger than 1 that, that term is going to sort of drag it down for a long time.*1168

*Here it is at 0, at Y = 0 and it is going to drag along near 0 for quite a long time.*1174

*Since β is 2, that means when it gets to the right hand and point here, it is still going down to 0.*1184

*It does have to have area equal to 1, the area underneath the curve has to be equal 1 because all of these functions do.*1193

*At some point, it is going to get some area.*1200

*Let me show it getting some area right at, as it approaches 1 there.*1203

*It is skewed to the right hand side, that Α = 10 drags it down on the left.*1213

*The β = 2 does drag it down at Y = 1 but we have to have an area of 1 in there, somewhere.*1220

*That is my 10, 2, α = 10 and β = 2.*1228

*I’m going to try out my new purple marker for that.*1237

*Here is α and that looks a lot like a blue to me.*1243

*Α is 1.1 and β is 2.*1247

*What that means, α is 1.1 and it is going to behave very similarly to the Α = 1, *1251

*which means it is going to trying to go into a finite limit.*1262

*Β = 2 means it is also going to be tied down at 0.*1267

*Let me show this graph that sort of trying to go a finite limit, as it approaches Y is equal to 0.*1272

*There it is, as it approaches Y = 0, it is trying to go to a positive limit.*1281

*What happens is, when it gets right down to Y = 0, that 1.1 is still bigger than 1 which means it is forced to go to 0.*1287

*Here is this graph that sort of trying to go to a finite limit and then at the last moment, *1298

*it has to turn sharply downwards and go to 0.*1303

*This purple graph, if you can tell the difference between the purple and the blue, *1310

*this purple graph is Α = 1.1 and β is equal to 2.*1313

*Let me recap all the different of things we are exploring here.*1323

*I have to highlight them in yellow, as I go along.*1327

*The important thing is to remember the general form of the β density function.*1329

*Here it is right here, Y ⁺α-1 1 - Y ⁺β -1.*1335

*And then, that constant in the denominator is really not important.*1341

*I’m not going to worry about it, it does not affect the shape of the graph.*1345

*There are two sub components there, the Y ⁺Α -1 determines what happens at Y = 0.*1351

*You want to look at the value of Α to determine what happens at Y= 0.*1358

*If Α is bigger than 1, then you got a positive exponent on Y, it is going to go to 0.*1363

*If α is equal to 1, that terms drops out and it goes to a finite limit.*1369

*If α is less than 1, then you got 0 to a negative number which means you are trying to divide by 0, *1374

*which means you are going to go to infinity.*1381

*If you look at the first graph here, there is an Α less than 1 and that is why it is going to infinity.*1383

*The second graph, α is equal to 1, goes to a finite limit.*1391

*The third graph, Α is much bigger than 1 which is why it starts off at 0 and stays at 0 for a long time.*1396

*Finally, the 4th graph, Α is bigger than 1 but very close to 1, that is why it is sort of *1408

*trying to go to a finite limit and then at the last minute, it has to drop down to 0.*1414

*The second component of this function is the 1 - Y ⁺β -1.*1420

*That determines what the graph does at Y = 1, in very much asymmetric fashion to the Y = 0,*1426

*except that it is looking at the value of β, instead.*1434

*If β is bigger than 1, you got something going to 0.*1437

*If β is equal to 1, you got something going to 1, and or at least a constant.*1441

*If β is less than 1, then you are trying to divide by 0, you are going to go to infinity again.*1447

*In this case all, of the β that we looked at were all bigger than 1, which means all of these graphs sort of tied down to 0 at Y = 1.*1455

*That is why all these graphs tie down here, but they all exhibit different behavior on their way to getting to that point, *1466

*which is why we get this sort of interesting of differences in all these graphs up to that point.*1475

*It is worth trying some of these out in your calculator, if you want to try graphing some of these in your calculator,*1481

*just throw these values of α and β into the density function, and put the graphs on your calculator, *1486

*and see what kinds of shapes you get.*1492

*You get quite a lot of riots, it is kind of fun.*1494

*In example 3 here, we are going to make a connection to a previous distribution that *1498

*we learn which was the uniform distribution.*1504

*It turns out that it is a special case of the β distribution.*1507

*I did a whole video on the uniform distribution.*1511

*If you do not remember the definition of the uniform distribution, or if you do not know what is it all,*1515

*you can go back and look at the previous video covering the uniform distribution.*1521

*You will see lots of information about the uniform distribution.*1525

*You just need a quick refresher on the uniform distribution.*1528

*I will remind you that the uniform distribution, the density function is just F of Y*1531

*is always equal to 1/θ2 - θ1, where θ1 and θ2 are constants here.*1539

*Those tripe lines there, the triple = means it is always equal to something.*1548

*It is not varying at all, it is equal to this constant the whole way.*1554

*That is where Y varies between θ1 and θ2.*1560

*What we are going to do now is show how the β distribution, if you choose the right parameters*1569

*turns into the uniform distribution.*1575

*That was the uniform distribution that I showed you up above.*1578

*Now, let me show you the formula for the β distribution which is much more complicated.*1581

*F of Y is equal to Y ⁺Α -1 × 1 - Y ⁺β -1 ÷ B of Α β and that goes from Y between 0 and 1.*1589

*I want to show you how you can choose the right parameters and turn the β distribution into the uniform distribution.*1615

*I'm going to choose my Α is equal to 1 and my β is also equal to 1.*1621

*Let us see how that worked out.*1630

*First of all, let us find the constant value B of Α β.*1631

*I'm going to use the relationship with the Gamma function, in order to figure that out.*1637

*That is Γ of 1 × Γ of 1 ÷ Γ of 1 + 1.*1643

*This is the relationship between the β function and the Gamma function, *1653

*that I mentioned back in one of the earlier slides in the lecture.*1656

*If you do not remember this, just go back and check your earlier slide and you will see the β and Γ relationship.*1659

*Also, remember here that Γ of N is N -1!, when N is a whole number.*1667

*This is 0! × 0! ÷ Γ of 2 would be 1!.*1676

*Of course, all those factorials, 0 and 1 are just 1, this is all just 1.*1684

*The β and density function is F of Y, that denominator is now going to be 1, we just work that out.*1690

*Y ⁺α -1, α is 1 so α-1 is 0 × 1 - Y ⁺β -1 is also 0.*1698

*And, that just comes out to be 1.*1710

*It looks like it is going to be constant.*1714

*Notice, by the way that, if it is constant then I can put three lines there,*1717

*that is equal to 1/1 -0 that is 1/θ2 – θ1, where θ1 is 0 and θ2 is 1.*1723

*What I found is that, I got the same density function for the β distribution as I would have gotten for the uniform distribution.*1738

*This is the same as the uniform distribution.*1757

*I discovered the uniform distribution as a special distinguished member of the β family.*1769

*If you choose your α and β right, the β distribution just turns into the uniform distribution.*1775

*Let me recap that, first of all, I recalled the uniform distribution and we did have a whole lecture on the uniform distribution.*1783

*You can check the video on that, if you do not really remember how that worked out.*1791

*The idea is you take Y between two values, θ1 and θ2.*1794

*F of Y is just 1 ÷ θ2 – θ1.*1800

*It is a constant distribution, there is no Y term appearing in there.*1804

*And then, I reminded myself of the density function for the β distribution.*1809

*That is our density function for the β distribution.*1814

*I picked good values in the parameters, I pick α to be 1 and β to be 1.*1817

*Then, I just plug those in.*1823

*First, I had to calculate B of Α β and I turn that into an expression using Gamma functions.*1825

*In turn, the Gamma functions turn into factorial.*1832

*It just reduced down to 1 which why my denominator here was 1, that is where that one came from.*1835

*And then, I plugged in my values of Α and β into the exponent, I got 0 is for the exponents, *1843

*which why everything just disintegrated into big old 1 here.*1848

*We just got that constant distribution F of Y is equal to 1, all the way across, *1854

*which is the same as the uniform distribution on the interval 0-1.*1859

*If you take θ1 = 0 and θ2 = 1, then we get the uniform distribution of 1 on that interval.*1866

*The uniform distribution, it turns out, is a special case of the β distribution.*1875

*In example 4, we are going to look at the triangular distribution F of Y = 2Y from 0 to 1,*1882

*and show that that is also a special case of the β distribution.*1889

*Let me just draw a quick graph of that triangular distribution.*1893

*It is obvious why we are calling it the triangle distribution.*1896

*Let me make my axis in black, I think that will show things a little better.*1901

*We are going from Y = 0 to Y = 1 here.*1909

*You always do that with the β distribution, it always goes from 0 to 1.*1912

*F of Y = 2Y, that is just a straight line is not it.*1917

*Probably, a little bit steeper than that, let me make that a little bit steeper.*1923

*F of Y = 2Y, and then, the challenge here is to recognize that as a special case of the β distribution.*1932

*Let me remind you of the density function for the β distribution.*1944

*And then, we will take a look at it and see if we can make it match what we have here.*1948

*For β distribution, F of Y is equal to Y ⁺Α -1 × 1 – Y ⁺β -1 ÷ B of Α, β.*1954

*I want that to match 2Y, and I think what I want to do there is I want to pick Α equal to 2.*1967

*That will make the exponent on the Y match.*1978

*That 1 - Y does not really seem to match.*1981

*In order to make that dropout, I'm going to take my β equal to 1.*1983

*Let us plug those in and see how it works out.*1989

*B of Α β, I could use the original integral definition to calculate that but I'm fond of the relationship *1992

*between the β function and the Gamma function.*2000

*I’m going to use that.*2003

*It is Γ of Α × Γ of β ÷ Γ of α + β.*2004

*Those are the relationship that we had back on one of the earlier slides in this lecture.*2013

*You can look that up, if you do not remember it.*2017

*Γ of Α is Γ of 2 × Γ of 1, β is 1 here.*2020

*Γ of 2 + 1 is Γ of 3.*2028

*Now, let us remember that the Gamma function is just a sort of *2031

*a generalized version of the factorial function, except it shifted over by 1.*2036

*This is 1! × 0! ÷ 2!.*2041

*I’m shifting everything back by 1 that is because Γ of N is equal to N -1!, for whole numbers there.*2047

*This is easy to solve, 1! Is 1, 0! Is 1, and 2! Is 2, that is ½.*2057

*F of Y, now I know what my constant is, it is ½, is Y ⁺Α – 1.*2066

*That is Y¹, 1 - Y ⁺β – 1, that is 1 - Y = 0 ÷ ½.*2074

*That simplifies, the 1 - Y = 0 is just 1, it goes away.*2083

*What we get here is Y by itself, but then, ÷ ½ is the same as multiplying by 2.*2089

*It is 2Y, and of course Y is trapped between 0 and 1 here.*2101

*That is very encouraging because that is the distribution, that is the density function that we are looking at.*2107

*We started out with F of Y is 2Y, we found that to occur, if we pick the right parameters in the β distribution.*2119

*Let me recap here, we started out wanting F of Y is equal 2Y.*2130

*I wrote down the density function for the β distribution, Y ⁺α -1 1- Y ⁺β – 1/B of α, β.*2136

*I’m trying to make it match to Y, I kind of looked at this exponent α -1.*2145

*And I said, how can I make that be equal to 1, that will work if α is equal to 2.*2150

*That 1 - Y really is not represented over here.*2156

*The 1 - Y has a power of 0 here, I will take β equal 1 to make that work out.*2160

*And then, I had to calculate the constant B of Α, β.*2167

*I did that, by converting that into Gamma functions, according to the formula *2171

*that we had on the earlier slides for this lecture.*2175

*It is Γ of α × Γ of β ÷ Γ of α + β.*2178

*If you drop the values of α and β data in there, then you will get something that we can simplify into factorials.*2183

*Remember, there is a relationship between the Gamma function and the factorial function.*2190

*Once, you simplified it into factorials, it simplifies quite nicely down into a fraction.*2197

*The F of Y, if I fill in my α is 2 then I get Y¹.*2204

*Β is 1 so I get 1 – Y = 0.*2211

*That Y ÷ /2 which is 2Y.*2217

*2Y from Y going from 0 to 1 is exactly the density function that we started with.*2221

*It does match what we are given, we do achieve this triangular distribution as a special case of the β distribution.*2229

*Let me show you quickly why it is called the triangular distribution.*2241

*If you look at all the area there, the area is a triangle.*2244

*The density is sort of spread out over a triangle there, which is why we call it the triangular distribution.*2251

*In example 5, we got morning commute, maybe this is you driving to work in the morning or driving to school in the morning.*2261

*It is a random variable, apparently, that has a β distribution with α and β both being 2.*2269

*This is measuring your commune in hour.*2277

*Remember, Y is always between 0 and 1 in the β distribution.*2280

*I guess that means that your commute could be 0 or it could be up to an hour.*2286

*In part A, we are going to find the chance that it will take longer than 30 minutes.*2293

*What we will actually be looking for there is the probability that Y is bigger than or equal*2298

*to 30 minutes is ½ an hour, it is bigger than or equal to ½.*2304

*In part B, apparently, you have a rage level which is a function of how long your commute is.*2310

*You want to find the expected value of rage that you will arrive at work tomorrow.*2316

*Let us work this out.*2324

*The first thing I'm going to do is try to identify the density function for this distribution.*2326

*We got F of Y, the generic density function for the β distribution is Y ⁺α – 1 1- Y ⁺β – 1 ÷ B of Α, β.*2333

*Let me go ahead and find the value of that constant, B of Α, β.*2348

*I think the easiest way to calculate these, if you have whole numbers, is to convert it into Γ.*2355

*Let me convert that into Γ of Α × Γ of β ÷ Γ of α + β.*2364

*That is a formula that we learn back on one of the first slides in this lecture.*2374

*In this case, we got Γ of 2 × Γ of 2 ÷ Γ of 4.*2378

*Because α and β are both 2, that was given in the problem.*2385

*This is 1! × 1!.*2389

*Γ of 4 would be 3!.*2395

*Remember, a part of the Gamma function is, it sort of the generalization of the factorial function but it is offset by 1.*2398

*Γ of 4 is 3!, 1! Is 1, 3! Is 6, this is 1/6 here.*2406

*This F of Y is Y ⁺α – 1, that is Y¹, 1 - Y ⁺β -1 is also 1.*2415

*And now, we know that we are dividing it by 1/6.*2425

*This simplifies down into 6Y × 1 - Y is Y - Y².*2429

*I can go ahead and distribute that, 6 Y - 6 Y².*2439

*That is my density function for this distribution.*2445

*We are going to go ahead and use that to solve these two problems.*2450

*I'm going to jump over onto next slide and use that density function to solve these two problems.*2453

*But, let me recap where these came from.*2461

*First, I was writing out the generic density function for the β distribution.*2463

*There is the formula there.*2468

*I have to figure out what B of Α, β was, I did that down below.*2470

*I converted that into a bunch of Γ because I know easily how to solve the Gamma function,*2473

*when you have a whole number in there.*2481

*It is just the corresponding factorial, except you have to shift it down by 1 to plug the number into factorial.*2483

*That is why B of Α, β turns out to be 1/6.*2494

*I plugged that into my density function.*2498

*I also plugged in the values of Α and β.*2510

*2 -1 is 1, and I got 6 × Y - Y², that is the density function that I'm going to work with,*2513

*in order to solve these two problems.*2521

*On the next page, I’m not going to copy the problems because I need the space.*2526

*We are going to solve the probability that Y is greater than ½.*2529

*And then, we are going to find the expected value of R.*2533

*Those are the two things that we are going to solve on the next page there.*2537

*We are still working on example 5, we have the setup on the previous side.*2545

*What we figured out was the density function is equal to 6 × Y - Y².*2549

*For part A, we want to find the probability that your commute will be longer than 30 minutes.*2556

*The probability that Y will be bigger than or equal to, we are measuring things in terms of hours.*2562

*I converted 30 minutes into an hour, it is ½, that is the integral. *2570

*Our range is from 0 to 1, ½ to 1 because you want it bigger than ½ of 6Y -6Y² DY.*2576

*We have a little calculus problem to solve and it is not a hard one at all.*2589

*Let us see, integral of 6Y is 3Y².*2594

*The integral of 6Y² is 2Y³.*2602

*We want to integrate that, to evaluate that from Y = ½ to Y = 1.*2607

*That is 3 -2 -3 × ½² is ¾.*2614

*+ 2 × ½³, ½³ is 1/8.*2626

*2 × 1/8 is ¼.*2631

*We get ¼ there.*2635

*3 -2 is 1 - ¾ is ¼.*2641

*This is ¼ + ¼, and that is ½, that is the probability that you are going to spend more than 30 minutes in traffic tomorrow morning.*2647

*For part B, we had this rage level, your rage level was R is equal to Y² + 2Y + 1.*2661

*What we want to calculate there was your expected rage level.*2672

*How angry you expected to be, when you get to work?*2675

*What we will use heavily here is the linearity of expectation.*2679

*The expected value of R is the expected value Y² + 2Y + 1.*2683

*But that is equal to the expected value of Y², this is linearity now, + 2 × the expected value of Y +,*2693

*We can say that the expected value of 1 is just going to be 1.*2704

*We need to find expected value of Y and Y².*2710

*In order to figure out those, I'm going to remember what we learned on one of the very early slide.*2714

*You can flip back and I think the slide was called key properties of β distribution.*2721

*What we learn was that the expected value of Y was equal to Α ÷ Α + β.*2726

*In this case, α and β are both 2.*2735

*This is 2 ÷ 2 + 2, that is 2 ÷ 4 is ½.*2738

*That was the easy one, the expected value of Y² is a little trickier.*2745

*What we are going to do is use the variance.*2749

*Σ², and that was kind of complicated formula, let me remind you what it was.*2752

*This is coming from, I think it was the third slide in this lecture,.*2758

*It was called key properties of the β distribution.*2761

*(α + β)² × α + β + 1.*2763

*We are going to work that out, α × β.*2771

*Α and β are both 2, that was given to us on the previous slide.*2773

*2 × 2 is 4 ÷ 2 + 2² is 16, and then 2 + 2 + 1 is 5.*2779

*This 4 ÷ 16 is ¼ × 1/5 is 1/20.*2789

*That is not the expected value of Y², that is the variance.*2797

*Let me remind you how we use to calculate the variance.*2802

*That is the expected value of Y² - the expected value of (Y)².*2806

*What we can do is, we can use this to solve for the expected value of Y².*2814

*This is a little old trick in probability is, if you know the variance, you can sort of reverse engineer for E of Y².*2821

*E of Y² is equal to 1/20 + (E of Y)².*2828

*We can write that as 1/20, we figure out what E of Y is, that is ½.*2840

*We figure that out up above, ½², this is 1/20 + ¼ which is my common denominator, there is 20, 1/20 + ¼ is 5/20.*2845

*I get here 6/20 and that reduces down to 3/10.*2864

*My rage level, I decomposed it into E of Y² + 2E of Y + E of 1.*2870

*Now, I can solve that, E of R is E of Y² + 2 E of Y + 1.*2878

*I can solve that E of Y² is 3/10.*2890

*2 E of Y is 2 × ½, I should have written E of 1 up above, here is E of 1.*2896

*E of 1 is just 1 because that is the expected value of a constant.*2907

*A constant is always going to be a constant, it is 1.*2912

*This is 3/10 + 1 + 1, 3/10 + 2 is 23/10.*2916

*All the Y is known as 2.3.*2927

*I do not know what the units are there, I’m just going to leave them.*2930

*I guess 2.3 range units is what you are going to carry into work, *2934

*or at least the expected value of your rage as you could work tomorrow morning.*2939

*2.3 is the expected value there.*2945

*That answers both things that we were looking for here in this problem.*2950

*Let me remind you where everything came from.*2953

*This F of Y, this density function is something we figure out on the previous side.*2957

*You can check back on the previous idea and see all the steps calculating that.*2961

*In part A, we had to find the probability that it will take longer than 30 minutes to drive to work.*2965

*30 minutes is ½ an hour and we want it to be longer than 30 minutes.*2971

*We are going to integrate from ½ to 1, the density function, and that turns out to be a fairly straightforward integral.*2977

*I’m going to keep the fractions straight.*2985

*We get that the probability there is exactly ½.*2989

*Half the time your commute will be longer than 30 minutes, half the time it would be shorter than 30 minutes.*2993

*In part B, we had to find the expected value of your rage level, where it is defined like this.*3001

*The expected value decomposes into these three terms.*3008

*That is using linearity of expectation, very useful for this kind of problem.*3013

*The expected value of Y, I am looking at the formulas for mean and variance on earlier slide from this talk.*3019

*If you go back, just scroll up and you will see a slide called key properties of β distribution, *3027

*and that is where I got these formulas, these complicated formulas using α and β.*3032

*But then, I just plug in Α = 2 and β = 2, that was given to me in the problem.*3036

*And, simplify those down into fractions ½ and 1/20.*3042

*However, this was the variance, it was not the expected value of Y² directly.*3048

*Remember, the old way to calculate variance is to find the expected value of Y² - the expected value of (Y)².*3053

*What we can do is reverse engineer this, in order to solve for the term we want.*3062

*Here is it, the term we want is the expected value of Y².*3069

*I bring this E of Y² over to the other side and that is where I get 1/20 + E of Y².*3073

*And then, this half right here is that half right there.*3081

*That is where that half comes from.*3086

*That is some more fractions, doing little simplification of the fractions.*3088

*We get that E of Y² is exactly 3/10.*3092

*I drop that into our expected value for R, and then this ½ is also that ½ from the E of Y.*3096

*The expected value of 1 is always 1 because 1 is constant.*3109

*You expect it to have its value.*3113

*And then, simplifying down 3/10 + 1 + 1 is 23/10 or 2.3.*3116

*That wraps up this lecture on the β distribution.*3124

*This was the last of the continuous distributions.*3128

*We worked through the uniform distribution, and the normal distribution, and the Gamma distribution.*3131

*The Γ, of course, includes the exponential and the Chi square distribution.*3137

*We had one big lecture on all of those.*3142

*Finally, we got the β distribution.*3144

*You are supposed to be an expert now on the continuous distributions.*3147

*I got one more lecture in this chapter, it is going to cover moment generating functions.*3151

*That is what you will see, if you stick around for the next lecture.*3155

*In the meantime, you have been watching the probability lectures here on www.educator.com.*3158

*My name is Will Murray, thank you for joining me today, bye.*3163

1 answer

Last reply by: Dr. William Murray

Mon Mar 9, 2015 9:32 PM

Post by Nick Nick on March 6, 2015

Why are we assuming theta2 = 1 and theta1 = 0 ?