 This is a video looking at some past paper questions about continuous random variables. The first question is question 4 from June 2010. It tells us that the lifetime x in tens of hours of a battery has the cumulative distribution function f of x, given by f of x is 0 when x is less than 1. 4 ninths of x squared plus 2x minus 3 when x is between 1 and 1.5 and 1 when x is greater than 1.5. The first part of the question tells us to find the median of x, giving our answer to three significant figures. Well to find the median we need to solve the equation f of x is equal to a half because the cumulative probability at the median will be a half and f of x is telling us the cumulative probability. So we need to find when f of x is a half. But f of x is 4 ninths of x squared plus 2x minus 3, so we need to solve 4 ninths of x squared plus 2x minus 3 is equal to a half. And we can do that by cross multiplying, multiplying the left hand side by 2 and the right hand side by 9, giving that 8 times x squared plus 2x minus 3 is equal to 9 and multiplying that out 8x squared plus 16x minus 24 is 9 and so 8x squared plus 16x minus 33 equals 0. Now we can't factorize that or anything, so the thing now is to use the formula, which tells us that x will be minus 16 plus or minus the square root of 16 squared minus 4 times 8 times minus 33 all over 2 times 8. And that gives us two answers, 1.26 and minus 3.26. But obviously minus 3.26 isn't a valid answer. The only correct answer here is 1.26. Okay, the next part of the question asks us to find the probability density function for the random variable x. And to answer this, you need to remember that the probability density function is found by differentiating the cumulative distribution function. So we need to differentiate f of x. Now when x is between 1 and 1.5, the derivative of the cumulative distribution function is d by dx of 4 ninths times x squared plus 2x minus 3. And we can differentiate that by taking the fraction outside the derivative. It's 4 ninths times d by dx of x squared plus 2x minus 3, which is 4 ninths times 2x plus 2 or more simply 8 ninths of x plus 1. So when x is between 1 and 1.5, the derivative of the cumulative distribution function is 8 ninths of x plus 1. And therefore the probability density function is 8 ninths of x plus 1 when x is between 1 and 1.5 and 0 otherwise. The next part of the question asks us to find the probability that x is greater than or equal to 1.2. The one way of doing this is to see that that's the same as 1 minus the probability that x is less than or equal to 1.2. And that's useful because the probability that x is less than or equal to 1.2 is the same as f of 1.2. Because remember that that's what f of 1.2 means. It's the cumulative probability at 1.2. The probability that x is less than or equal to 1.2. So we need to calculate one take away f of 1.2. And that would be one take away 4 ninths times 1.2 squared plus 2 times 1.2 take away 3, which turns out to be 47 over 75. The last part of the question tells us that a camping lantern runs on four batteries, all of which need to be working, and that four new batteries have just been put in the lantern. He wants to know the probability that the lantern will still be working after 12 hours. Well, the probability that one battery will still be working after 12 hours is the thing we just calculated. It's the probability that x is greater than or equal to 1.2. And the probability that all four will still be working will be the probability that x is greater than or equal to 1.2 to the power of 4. So the calculation that we need to do is 47 over 75 to the power of 4. And that turns out to be 0.154 to 3 significant figures. Okay, the other question that I like to look at is question 4 from the January 2010 paper. This time we're given the probability density function for a continuous random variable. And we're told that f of x is k times x squared minus 2x plus 2 when x is between 0 and 3, 3k when x is between 3 and 4, and 0 otherwise where k is some constant. And the first part of the question is asking us to show that k is 1 9th. Okay, well, the way to do this is to remember that the total probability must be 1. The total area under a graph of the probability density function must be 1. So if we integrate f of x over all possible values, we must get the answer 1. Now to integrate f of x over all possible values, we first of all need to integrate k times x squared minus 2x plus 2 with the limits 0 and 3. If we do that, we'll see that that's k times a third of x cubed minus x squared plus 2x evaluated with the limits 0 and 3. That's k times a third of 3 cubed minus 3 squared plus 2 times 3 take away 0. Because when you substitute d and x equals 0, the answer is nothing. If you simplify that, you'll get the answer 6k. Okay, so that's the total area under the graph between 0 and 3. But we also need to find the area under the graph between 3 and 4, the probability that x is between 3 and 4. That's going to be the integral of 3k dx with limits 3 and 4. Okay, well, when we integrate that, we get 3kx evaluated with limits 3 and 4, which is 12k minus 9k in other words 3k. So now we can say the total area under the graph, the integral of f of x over all possible values, and that's the sum of the two things we've just worked out. It's 6k plus 3k, which is 9k. So the total area under the graph is 9k, and we know that that must equal 1. So it follows that k must be a ninth. Okay, the next part of the question asks us to find the cumulative distribution function f of x. And to do that, you need to remember that the cumulative distribution function can be obtained from the probability density function by integrating. Now, there are actually a couple of methods for working this out, but one method is to use indefinite integration and to remember that there will be some constants of integration which we need to find out. So we can say that when x is between 0 and 3, the cumulative distribution function will be the integral of a ninth times x squared minus 2x plus 2, which is a ninth of a third of x cubed minus x squared plus 2x plus c. The thing is, we need to find out what c is. And to do that, we must remember that f of 0 is equal to 0. The cumulative probability at 0 is nothing. Now, think about it. If f of 0 has to be 0, then substituting 0 into the above formula must give us the answer 0. And the only way that can happen is if c is 0. So therefore, c is 0. In this case, the constant of integration turns out to be nothing. That's good news, just in case you forgot to include it in the first place. So now we can say that when x is between 0 and 3, f of x is a ninth of a third of x cubed minus x squared plus 2x. Okay, so that's the cumulative distribution function when x is between 0 and 3. What about when x is between 3 and 4? Well, this time, we have to integrate a third dx, and that gives us the answer a third of x plus d plus some other constant of integration. And again, we need to find out what this is. The key is to remember that f of 4 must be 1, the cumulative probability at 4 must be 1, because at that stage, we've included all the probabilities. So now if we substitute 4 into the formula we've just obtained, we can make an equation. We can say that 4 thirds plus d equals 1, and therefore that d is minus a third. Note that this time the constant of integration isn't 0, so it was essential to remember it. We're not going to get away with that twice. So now we can say that when x is between 3 and 4, the cumulative distribution function is a third of x minus a third. And now we know the cumulative distribution function for x between 0 and 3, and also for x between 3 and 4. And so now we can say the cumulative distribution function for all values of x. We can say that it's 0 when x is less than or equal to 0. Obviously the cumulative probability at that stage is still 0. A ninth of a third of x cubed minus x squared plus 2x when x is between 0 and 3. A third of x minus a third when x is between 3 and 4. And finally 1 when x is greater than 4, because the cumulative probability at that stage is everything, it's 1. And this is the cumulative distribution function for x. Okay, the next part of the question asks us to find the mean of x. And to do this, you need to remember that the mean is the expected value of x, which is the integral of x times the probability density function evaluated over all possible values of x. So again we need to do this in two stages because the probability density function is defined in pieces. First of all we need to evaluate this integral between 0 and 3. And that gives us the integral between 0 and 3 of a ninth of x times x squared minus 2x plus 2. Remember that k was 1 ninth, so I've replaced k with a ninth, and I've multiplied the probability density function by x. Okay well we can integrate this by first multiplying out the brackets so that we need to find the integral of a ninth of x cubed minus 2x squared plus 2x evaluated between 0 and 3. And if you work that out, that's equal to a ninth of a quarter of x to the power of 4 minus 2 thirds of x cubed plus x squared evaluated between 0 and 3. Which is a ninth of a quarter times 3 to the power of 4 minus 2 thirds times 3 cubed plus 3 squared take away nothing. Take away nothing because when you substitute in x equals 0, the answer is 0. And that comes to 5 quarters. So that's the integral of x times the probability density function for x between 0 and 3. But now we need to evaluate x times the probability density function for when x is between 3 and 4. So this is the integral between 3 and 4 of a third of x dx. Again remember that k was a ninth, so 3k is a third, and then we need to multiply that by x. So that integral is a sixth of x squared with limits 3 and 4. And so what we've got is a sixth times 4 squared minus a sixth times 3 squared, which turns out to be 7 sixths. Okay, so now we've evaluated the integral of x f of x when x is between 0 and 3 and also for when x is between 3 and 4. So therefore we can say that the total integral of x f of x, the integral over all possible values of x, is going to be 5 quarters plus 7 sixths, which turns out to be 29 twelfths. And therefore that is the mean of x. Right, the final part of the question tells us to show that the median of x lies between x equals 2.6 and x equals 2.7. Now sometimes when you have to find the median, you have to solve the equation f of x is equal to a half. You have to find where the cumulative distribution function is equal to a half. But in a situation like that, it's easier because all we have to do is to show that x equals 2.6 is too small an answer and x equals 2.7 is too big an answer. And we can do that by substituting these numbers into the expression for the cumulative distribution function. We've found that when x is between 0 and 3, the cumulative distribution function is a ninth times a third of x cubed minus x squared plus 2x. So first of all let's substitute 2.6 into that and find the cumulative probability at 2.6. The cumulative probability at 2.6 turns out to be 0.477629 and so on, which is less than a half. So that shows that 2.6 is too small and it's less than the median because at that stage the cumulative probability hasn't reached a half yet. On the other hand, if we substitute in 2.7 we end up with the answer 0.519 and that's too big, that's greater than a half. So now we've gone too far, we've gone beyond the median and we've got a probability that's more than a half. So that enables us to say that the median must be somewhere between 2.6 and 2.7 because the median is the place where the cumulative probability is exactly equal to a half. OK, that's the last part of the question. I hope you found looking at those questions useful and hope you now understand how to do them. Thank you very much for watching. I hope you enjoy the next video.