Suppose that 𝑋 is 𝑎 continuous random variable with probability density function 𝑓 of 𝑥 equals a quarter of 𝑥 plus 𝑎, if 𝑥 is greater than or equal to zero but less than or equal to two and zero otherwise. Find i) the value of 𝑎, and ii) the probability that 𝑋 is greater than or equal to a half and less than or equal to three over two.
For a continuous random variable, probabilities can be found by calculating the area below the graph of the probability density function 𝑓 of 𝑥. In this question, the probability density function 𝑓 of 𝑥 is a linear function of 𝑥. And therefore, a graph of 𝑥 against 𝑓 of 𝑥 will be a straight line. The probability density function is zero outside of the interval zero to two. So, zero and two will be the limits on the 𝑥-axis.
In part one of the question, we’re asked to work out the value of 𝑎 which is used here in the definition of 𝑓 of 𝑥. To do so, we need to recall that the total area below the graph will be equal to one. Because the sum of all probabilities in a distribution must be one. So, the total area below the straight line is one. Now let’s think about how we can calculate this area.
If we look at this shape, we see that it is a trapezium. So, we need to recall our formula for finding the area of a trapezium. It’s this, one-half of 𝑎 plus 𝑏 multiplied by ℎ, where 𝑎 and 𝑏 are the two parallel sides in the trapezium and ℎ is the perpendicular distance between them. Note here that this value of 𝑎 in the definition of the area of a trapezium is not the same as the 𝑎 given in the question.
On our 𝑥-axis, we know that the values are zero and two. So, ℎ, the distance between these values, is two minus zero, which is equal to two, the two parallel sides of this trapezium will be the function 𝑓 evaluated at each of these 𝑥-values. So, that’s 𝑓 of zero and 𝑓 of two. To work each of these values out, we need to substitute the 𝑥-values into the definition of 𝑓 of 𝑥.
𝑓 of zero is equal to one-quarter of zero plus 𝑎. That’s just 𝑎 over four. And 𝑓 of two is one-quarter of two plus 𝑎. Now we’re ready to substitute the relevant values into our formula for the area of a trapezium. First, we have a half the sum of the parallel sides, that’s one-half multiplied by 𝑎 over four plus two plus 𝑎 over four. Then, we’ll multiply by the height of the trapezium. That’s two. And, remember, we said that this whole area will be equal to one.
We can simplify this equation. We have a half, and then we’re multiplying this by two. A half multiplied by two is equal to one. So, these just cancel one another out, leaving 𝑎 over four plus two plus 𝑎 over four is equal to one. These fractions have a common denominator. So, we can add their numerators, giving two 𝑎 plus two, that’s 𝑎 plus two plus 𝑎, over four is equal to one. To solve this equation, we first need to multiply both sides by four, giving two 𝑎 plus two is equal to four. Next, we can subtract two from each side to give two 𝑎 is equal to two. And finally, divide both sides by two to give 𝑎 equals one.
So, by recalling that the total area under the graph of a probability density function must be equal to one, we found that the value of 𝑎 in the definition of this probability density function is one. Now let’s consider part b where we’re asked to find the probability that this random variable 𝑋 takes a value greater than or equal to one-half but less than or equal to three over two.
This probability will correspond to the area below the graph of 𝑓 of 𝑥 between the 𝑥-values of one-half and three over two. Now this shape is again a trapezium. So, we can apply the same method as we did in part one. This time the value of ℎ is three over two minus one over two, which gives two over two, or just one. The values of 𝑎 and 𝑏 will again be the function 𝑓 of 𝑥 evaluated at each of these 𝑥-values. So, they’ll be 𝑓 of one-half and then 𝑓 of three over two.
Remember that we now know the value of 𝑎. 𝑎 is equal to one. So, we can substitute this value into the definition of 𝑓 of 𝑥. 𝑓 of one-half then will be a quarter of one-half plus one. One can be thought of as two over two, so one-half plus one, or one-half plus two over two, is three over two. And then, multiplying this by one-quarter gives the value three-eighths. 𝑓 of three over two will be one-quarter of three over two plus one. Again, if we think of one as two over two, then adding three over two to this gives five over two. And multiplying by one-quarter gives five-eighths.
The area then and the probability that we’re looking to calculate is equal to one-half multiplied by three-eighths plus five-eighths multiplied by one. Three-eighths plus five-eighths is eight-eighths, or just one. So, we have one-half multiplied by one multiplied by one, which is just equal to one-half. So, the required probability, the probability that 𝑋 is greater than a half but less than or equal to three over two, is one-half.
Now there is actually another method that we could use. And this method is a bit more general. It would help if the graph of the probability density function 𝑓 of 𝑥 was not a straight line. In general, the area below a graph can be found by integrating the equation of that graph. So, that’s 𝑓 of 𝑥 between the limits. We could, therefore, find the probability in part two of this question by integrating 𝑓 of 𝑥 between limits of one-half and three over two.
We could also have answered part one of this question in the same way by integrating 𝑓 of 𝑥 between zero and two and setting this integral equal to one. If you’re familiar with integration, you can, of course, perform this integration yourself and confirm that it does indeed give the same answers. Our answer to part one is that 𝑎 is equal to one. And our answer to part two is that the probability that 𝑋 is greater than or equal to a half but less than or equal to three over two is one-half.