Skip to main content
Loading Explore guides…
Integration in Probability · Acedra
Home
Explore
Mathematics
Integration in Probability
Sign in to save
Chat
If YouTube asks you to sign in, open the video on YouTube.
Watch on YouTube
Reload player
Transcript
97 segments
Copy
Hide video
0:00
In this video I'm gonna talk about an application of integration to probability. And I'm not assuming that you've taken a course in probability. If you had taken an intro course in probability, this might fill in some of the gaps in terms of why you were using the formulas that you did.
0:16
But, really we're just gonna look at applying integration theory to real world situations. So, burns in hours, before burning out is a continuous random variable x with a probability density function given by p of x equals 1 100th e to the negative x divided by 100 for x being greater than 0. So there are a couple of words in here that you might not be familiar with and I expect that. One is the idea of a continuous random variable.
0:55
Which, in this case, is the amount of time before a light bulb burns out. X, these continuous random variables are the things that you're trying to measure. You're trying to find out the probability of something, and in this case we're trying to find out the probability of something happening before it burns out. The word continuous here is because x in this case is measured in time, but x could take on any one of an incremental number of values.
1:19
It's a little different than like a dice roll could also be considered a random variable, like what's the probability of rolling a one? But that's a discrete random variable because dice can only take on a certain number of fixed values.
1:33
Whereas time can take on any value. Anyway, so in general that's the thing that we're trying to measure the probability of is what our random variable is. And this probability density function is just a function.
1:48
And the reason why it's a probability density function, I have a little.
1:54
It describes the relative likelihood for this random variable, in this case time until burnout to take place on a given value. So graphically sort of what you're thinking about is that we have this function and this is sort of telling me how likely it is to burnout on any give interval. So, if I were to integrate, and maybe I guess I have a definition of this, that the probability that my x value falls between 50 and 150 is the integral from 50 to 150 of my probability density function.
2:36
Let's break down what that means.
2:39
This is a lot of notation for a really simple idea.
2:46
Here on these first set of inequalities, P, of all of this stuff, this is just, this capital P stands for probability. Which is how likely something will happen.
3:12
And so this whole phrase on this side is asking, what's the probability that x is between 50 and 150? In real world language, this is saying, I'll write this down here.
3:35
What is the probability
3:43
That the light bulb
3:50
burns between 50 and 150 hours? Cuz x, our random variable, is measuring how long the light bulb burns and we want to know how likely is it that it burns between 50 and 150 hours.
4:11
And the connection that we're making is that this probability density function is the way that we can measure that probability. And we're saying that if I find the area under my probability density function. So, I'm integrating from in this case 50 to 150. That gives me a measure that how likely it is that my light bulb will burnout within those hours.
4:38
So, let's go ahead and compute that integration, I guess.
4:43
Guess I need a blank sheet of paper for that. [SOUND] So, really we're just computing the integral from 50 to 150, and in this case our function is 1 over 100 e to the negative x divided by 100 d x. So once you strip away all the language we're looking at an integral of something that we actually know how to integrate in this case. I'm going to do a u substitution. I'm gonna let u equal negative x over 100. Because then d u is equal to negative 100th d x.
5:31
I don't have a negative 100th, I actually have just 100th. So I'm going to multiply both the interior and the exterior of this integral by negative one so that I can get my d u.
5:51
And it means that together, this piece and this piece form my d u. So the negative integral of e to the u, d u.
6:09
And I can integrate, this is easy to integrate, integral of e to the u is just e to the u. So I get negative e to the u evaluated from x equals 50 to 150. So I need to go back and plug into my function. So this is negative e to the negative x over 100.
6:33
Evaluated from x equals 50 to 150.
6:46
So, evaluating at the upper bound minus evaluating at the lower bound, minus a negative will end up being a positive. E to the negative 50 over 100. I can simplify this slightly. That's 15 tenths, which is dividing both top and bottom by five, three halves. You do the negative three halves plus
7:20
e to the negative one half, and I can get numerical approximation. This is the exact answer. This is the exact value, but if I wanted to use my calculator, I could look this up. E to the negative three halves plus e to the negative one half.
7:50
Oh, I'm missing a parenthesis. I added an extra parenthesis here. Delete. I'm sorry. And I get my final answer.
8:15
So this is about equal to 0.3834. So let's interpret this back in the context of the situation. Recall that we were looking at a probability that our light bulb burnout time was between 50 and 150. And we used our probability density function to find out that it was the integral of this exponential function. Which we got equal to, about equal to 0.3834. How do I interpret this? Probabilities are values that fall between 0 and 1. Sort of like a 50/50 shot means it's 0.5 is the probability.
9:02
So in this case, a 0.3834 value means that it has a 38.34% likelihood
9:14
Of burning out in that time period. So another question that you might ask and I think that this is thing that we have on the next sheet. What is the probability that the light bulb burns more than 300 hours?
9:36
So looking back to our graph, we can say, oh, well that's gonna be anytime that the light bulb burns more than 300 hours is gonna be maybe this red area, or purple area under the curve.
9:48
It's gonna extend off indefinitely. So this is where we can apply our idea of indefinite integrals, because it's gonna go off to infinity.
10:00
I'm gonna write this out with formal notation. The probability that my random variable x is greater than or equal to 300, because x is how long it takes before it burns out. It's going to be the integral from 300 to infinity.
10:20
And maybe you don't like this notation. But I'm gonna use this notation. It's shorthand of 1 over 100, e to the -x over 100 dx. So here's a nice application of an indefinite integral.
10:37
I'm gonna do our trick and set this as the limit as R approaches infinity of the integral from 300 to R of 1 over 100 e to the -x over 100 dx,
10:54
which is the limit as R approaches infinity. I'm not gonna write out that u-sub like I did before, because we already did the hard work. We know that this integral ends up being -e to the -x over 100. Evaluated from x = 300 to R.
11:19
Which is (-e to the -R over 100) + e to the -300/100. So before evaluating the limit, I actually think it's easier first to rewrite this limit as R approaches infinity because this is e being raised to the negative exponent. That's the same thing as 1 over, or -1 over e to the R/200, plus e to the -300/100. Because now that we see when I plug in infinity down here this is going off exponentially. This becomes a really, really large value.
12:10
So -1 divided by a really, really, really large value just becomes 0. So when I take this limit, this first term becomes 0 and I get e to the -3. Which is about equal to e to the -3, is about equal to 0.04978, which, going back to our probabilities, what is this saying? It's saying that the probability that the light bulb burns more than 300 hours is really a little bit less than 5%. So this is about equal to 5%. I'm moving the decimal place over two places. This is written as a decimal.
12:53
If I want to convert decimals into percents, I can move the decimal place over.
12:57
So one result that is an interesting result from this work, or something that's worth mentioning, is the fact that going back and looking at this original graph, we know if I were to ask what's the probability that the light bulbs burned, somewhere between zero and an infinite number of hours. You would want that probability to be one. It's sure to burn out at some time, so that's one property that we have, and really, that's the important property that we have,
13:25
of these probability density functions. And maybe I'll write it here under the definition. We have these probability density functions, and we know that the integral, well in this case only, this is a special case cuz the mean started at zero, that we only examine positive values of x. There are gonna be other probability density functions where you can use both negative and positive, but on it's domain.
13:55
The area under a probability density function curve, under its integral, is always equal to one. Or maybe I'll write this p(x) dx on the probability density function's domain.
14:28
Another thing that you might ask is what is the expected life span of a light bulb? That's a question that's slightly different than what we were asking before. Before we were asking how likely is it to burnout in a specific time period, where this is asking, sort of, what's the average value that you would expect it to last? And this has a special symbol. This mu here stands for average value. So this is the average value of our random variable.
15:01
Mu is an average value, I guess, or the mean value.
15:05
And it's going to be the integral from negative infinity to infinity of x times p(x). So, in our function, we would have to multiply our function by x to be able to get the average value.
15:22
And graphically, you can sort of see this, that what is the average value? Well, it's going to be the amount of time times the height at those times. So if we were to sort of level this out and find out, well, over this time period, sort of how tall is this? That's sort of what this is asking.
15:43
And for this particular question, we can apply our formula. We know what p(x) is. P(x) in this case is equal to 1 over 100 e to the -x over 100, so our average value, our expected lifespan of a light bulb, is gonna be the integral It's not gonna go from negative infinity to infinity, because like I said, the domain for this probability density function goes from 0 to infinity of x times 1 over 100 e to the negative x over 100 dx.
16:24
So like I said, the pieces of this section is that we're gonna practice a lot of the techniques of integration that we've all ready seen. We can't just do straight integration because we have a product of these two variables. When I see a product of two things, the first thing I think of is integration by parts. So I'm gonna parse this apart. I'm gonna set u equal to x. And that means that du is just equal to 1dx. And then I'm gonna set dv equal to e to the negative x over 100dx.
17:00
I'm gonna throw this 1 100th out in front of the integral. I think that that just makes it easier. That way I don't have to worry about doing it within the integration by parts. But, it means that in order to take the anti-derivative of this, I need to do a u substitution. So, over in my head maybe I'll call it a double u substitution. Negative x over 100. So dw is equal to negative 1 100th.
17:32
And I don't have that negative 1 100th sitting here so I'm gonna have to multiply it by negative 100 and I end up, I'm sort of skipping steps in my head. This becomes negative 100, e to the negative x over 100. This might be dv, so
17:51
when I integrate this, remember I pulled that coefficient out front. So it's 1 100th times uv minus the integral of vdu, uv ends up being negative 100x e to the negative x over 100. Minus the integral of vdu becomes minus the integral of negative 100 e to the negative x over 100dx. I threw that 100th out front, but I notice that it cancels nicely with each of these terms so I'm gonna rewrite this as negative xe to the negative x over 100 minus a negative and the 100th cancels out.
18:44
So that becomes plus the integral of e to the negative x over 100dx. And like I said, this is an integral that we already solved.
18:59
Negative xe to the negative x over 100 plus, recall that this integral we would have to do the u substitution and it becomes minus, minus e to the negative 100 times. Maybe I should do this out, because it's actually a little different. Now I'm getting ahead of myself, right, cuz that wasn't exactly our original integral. I don't want to confuse people. So, let's go ahead and do this out again. So, I've already used a w.
19:40
I guess I'll do a y substitution that y will be equal to negative x over 100. So dy is equal to negative 1 100th.
19:54
I don't have a negative 1 100th there so I have to multiply this by negative 100 to be able to compute the integral. So I get, negative 100 out front.
20:07
And then negative 1 100th. E to the negative x over 100, dx, now that I've plugged in that u substitution.
20:23
So notice that I get
20:32
I can do my u. This becomes my, I guess y in this case. My dy, whoops.
20:40
The x, so the integral of y is just either the y. So my integral ends up being negative 100e to the negative x over 100. Whew.
20:53
But, recall that in this case it was a definite integral. I'm evaluating it from x equals 0 to infinity. When I evaluate this to infinity, I have to take the limit.
21:09
New sheet of paper.
21:15
So, I'm looking at the limit as r approaches infinity of negative r e to the negative r over 100 minus 100 e to the negative r divided by 100. So that's evaluating the upper bound and infinity is taking the limit.
21:50
And then I'm going to find the lower bound.
21:55
So I subtract out, plugging in 0.
21:58
Negative 0, e to the negative 0 over 100 minus 100 e to the 0.
22:09
Almost there.
22:17
Let's rewrite each of these as fractions so that we can apply L'Hospital's rule. Negative r, the numerator divided by e to the r over 100 minus, this one we can evaluate the limit outright, but I'll rewrite it anyway.
22:38
e to the r over 100 minus a negative 0. It's just 0. Minus a negative e to the 0 is 1, so now I'm gonna add 100.
22:51
So to evaluate this limit is easy. As r goes off into infinity, this numerator becomes infinite in the exponent and so the denominator goes off to infinity which means that this term goes to 0. This one I'm actually going to use L'Hospital's Rule to evaluate because both of these go off to infinity when I plug in infinity. So I'm gonna write star, L'Hospital's Rule. I'm gonna take the derivative of the numerator here. The derivative of the numerator is negative 1.
23:26
The derivative of the denominator is gonna be r divided by 100, times, whoops. 1 over 100 times e to the 1 over 100. Taking the derivative with respect to r. So the derivative of e to the stuff is just e to the stuff. By chain rule I'm also multiplying by 1 over 100, cuz that's the derivative of the numerator.
23:50
Minus all of this stuff. So now we can evaluate the limit. When I plug in r going to infinity, I see that this is going off Infinitely, so this goes to zero. This is also going off infinitely, so this goes to zero, plus 100 gives me a value of 100. So what does that tell me? It tells me that in this case, my average value, my average expected value for this function, u of x, is equal to 100.
24:25
And looking back on my original graph, that seems sort of reasonable. It's saying sort of that if were to average out sort of this area on this side of the graph and this area on this side of the graph that extends out infinitely, the midpoint between those would be right at a hundred. And that makes sense in terms of, graphically. This is tapering off really quickly so this area could be equal to that area.
24:56
So one final step, we just did a bunch of computations, hopefully that was just a review. We're also going to look at different types of probability density functions. We've all ready talked about the exponential model. That's the one we just did the example of,and they're always in the form p of t equals one over r times e to the negative t over the r.
25:19
In our case we used x instead of t and we also used a hundred instead of r. A hundred was our rate. Which as we saw was our expected value, that's not a coincidence.
25:31
And this is often used to model wait times. So how long until a light bulb burns out or how long until a train arrives. Things like that to see how long from your starting waiting point into infinity.
25:47
The other curve that I wanna talk about is the bell-shaped curve. This is something that comes up a lot in probability theory, and you probably hear about it from everyday life as well. But here's a formal mathematical formula for describing what a bell-shaped curve is. The standard normal curve Is one that is, is really basic, because we've centered it at zero, and each standard deviation is just given by one unit.
26:15
So this models things that are normally distributed,
26:19
test scores in particular are things that could be centered at zero.
26:23
A more general form of the general normal curve is this bell curve that has been shifted and squished or straightened is given by this function. Notice it's exactly the same as this function only I've added in a couple of symbols that shifted. This new symbol, which appears right here is the mean or the average value. And for the bell curve, it's right at the center of the curve. Visually you can see that half will be below and
26:54
half will be above, just like what we saw with our previous wait time example.
27:01
So that's labeled as mu. Sigma is your standard deviation. It's a measure of spread. And if you have- If you have a really high standard deviation, it means that your curve is more spread out. And if you have a really low standard deviation, it means that your curve is more squished. So, for example if I had a sigma value of 0.3, it would be something that what's really squished around the mean, whereas if you had a sigma value of, eight or something like that,
27:36
then that would be something that would be a much more flat bell curve. You could picture a bell curve that looks like that, that's been flattened out. So this is the specific case where sigma is equal to one, your standard deviation is one, and mu is equal to zero, it's centered around zero.
27:57
So we're gonna finish up with one final example of looking at a general normal distribution instead of an exponential distribution. So let's say that we have exam scores with a mean of mu equals 500 and a standard deviation of 100. And we wanna know what's the probability of scoring at or above 500. There are a couple of liberties that we take with describing exam scores in terms of a probability density function. This is something from a theoretical perspective that I want to point out.
28:33
One of the things is that for a probability density function, we typically want our domain to go from negative infinity to. For a bell curve, and here we are assuming that once you get down to
28:45
negative values on the test. Or maybe the test even allows for negative values.
28:51
They've gone out so far
28:54
that it's essentially probability zero that you could score down there, right?
29:00
Another thing that we're taking for granted is that this is a continuous random variable. Which isn't exactly true because you probably couldn't get a score of 500 pi on an exam. Let's talk about how exams are scored. They're usually just scored in points increments or tens or hundreds. But we can approximate it by this curve and pretend that it's actually able to take on every single value. Anyway, maybe you don't care about those things, but those are things that I think are important.
29:23
Let's set this up in terms of our probability theory. So we're asking in this case, our random variable x is a score on the exam. And we wanna know what's the probability that x is greater than or equal to 500.
29:43
And so we can set that up as the integral, and the integral in this case has a lower bound of 500 and a upper bound of infinity. Of our probability density function, which in this case is one divided by sigma. Sigma is a 100 times the square root of two pi, multiplied by e to the negative x minus 500, x minus mu, squared, all over twp times sigma squared, 100 squared, dx. So it's like a really messy function, and it is. It's a very messy function. One of the problems with this
30:37
function is that it's not something that is of closed form. Let's see if I can come up with an anti-derivative of this. I'm simplifying this slightly. Two times 100 squared is 20,000. But, I have an x squared in the numerator of this exponential function. And if I think about this, you can't do a u substitution because if u was this exponent, du would still have an x in it. And I don't have an x to work with. You could try doing integration by parts, but it turns out that because e is
31:18
the self-replicating function, it doesn't matter if I put it as du or as u. When I take successive derivatives or anti-derivatives of it, it just continues to be equally complex. But this is a particular function that you would have to evaluate using a computer algebra system. And I'll do a video in a second of how we can use either GeoGebra or Wolfram|Alpha to be able to compute integrals that we don't have closed forms of.
31:47
That's a valuable skill moving forward in this course. I tried to do it actually on my TI-89, and it took a really long time to process. So this is another thing that you could do. You could use your calculator. So TI89s, if you go into math mode, so F3 is calc. You can differentiate or integrate. And maybe I'll write this. For TI89s, if I press F3 for calc my notation is always, it'll give me a drop down that says integral. And you type in the function, comma x.
32:34
Like this is sort of your dx thing. So I would type in this thing, well I guess this whole thing, cuz that's my function. And x cuz that sort of stands for the dx. And then I type in my lower bound, which is 500. And then I would type in my upper bound, and I would just give a numerical approximation of the upper bound. You can't actually type into infinity. Oh maybe you can in an 89. In an 84, you can't type an infinity. But because we're gonna get a numerical approximation anyway,
32:58
I just type in a really large number. You can see, maybe, can you read the calculator?
33:03
That I just typed in 99999999 [NOISE] and then pressed Enter, and it thought for a really long time, and then it gave me my output, which was, oh, I can't press Cancel, can I? Can I go to Quit? An output which was 0.5. I tried to do the exact same thing on my 84. Let's see if it's here. Oh. I guess I got rid of it. And it didn't work, it gave me an error, that I think it just didn't have the computational power to be able to do it. But in general, if you're working on a TI84,
33:34
you can do a similar thing, you go into math.
33:41
And then you can select fn int, that's a function integral, so you type in the function.
33:54
And you have the same syntax, x, the lower bound, and in this case, an approximation of a really large number for the upper bound, and I think mine ended up giving me value of zero, which is not true. But you can always check this with Wolfram Alpha or something else. The exact value is 0.5. And we knew this graphically by looking at what the mean was. The bell shaped curve is symmetric. So, what is the probability of scoring at or above 500? It should be exactly 50%.
34:27
It's exactly half of the area under the curve. And if the total area is 100%, then scoring above a 500 should be at 50%. So, this is a 50% probability of scoring above 500.
Here to help you learn
Sign in to keep a private conversation with your course tutor.
Ask me anything about the material…
Sign in to chat