Lesson Video: Continuous Random Variables Mathematics

In this video, we will learn how to describe the probability density function of a continuous random variable and use it to find the probability for some event.

14:43

Video Transcript

In this video, we’ll learn how to describe the probability density function of a continuous random variable and use it to find the probability of an event. We’ll begin by reminding ourselves of the properties of discrete random variables and then define those of continuous random variables. We’ll then use the properties of continuous random variables in some examples to find an unknown constant and probabilities for events given a probability density function.

We recall that a discrete random variable is a random variable that can take only discrete values. There may be a finite number of these possible values or a countably infinite number of possible values. We can find the probability that 𝑋 is a particular value, and this is defined by a probability distribution function 𝑓 of π‘₯. And the sum of the probabilities is equal to one. Suppose, for example, that 𝑋 is the number thrown on one toss of a fair die. Then the possible π‘₯-values are one, two, three, four, five, and six. Then the probability that 𝑋 is equal to one of these values is one over six. And that’s the value of the probability distribution function 𝑓 of π‘₯ for 𝑋 equal to π‘₯𝑖. The sum of all of the 𝑓 of π‘₯𝑖 is equal to one.

For a discrete random variable then, the variable values are discrete. The variable values for a continuous random variable, on the other hand, can take any value within a given range. And this means that between any two of our values of π‘₯, there’s an infinite number of other values of π‘₯. A continuous random variable 𝑋 is characterized by a probability density function 𝑓 of π‘₯. That is where 𝑓 of π‘₯ is greater than or equal to zero for all values of π‘₯. And the total area under the graph of 𝑦 is equal to 𝑓 of π‘₯ is equal to one. So for a continuous random variable, the function is never negative and the total area under the graph is equal to one. In our first example, we’ll see how we can use this definition to find an unknown constant in a given function.

Let 𝑋 be a continuous random variable with probability density function 𝑓 of π‘₯ is equal to π‘Žπ‘₯ if one is less than or equal to π‘₯ is less than or equal to five and zero otherwise. Determine the value of π‘Ž.

In this example, we’re given that 𝑓 of π‘₯ is a probability density function of a continuous random variable. And we’re asked to find the constant π‘Ž. To do this, let’s recall the properties of a probability density function. 𝑓 of π‘₯ is a probability density function if 𝑓 of π‘₯ is greater than or equal to zero for all values of π‘₯ and the total area under the graph of 𝑦 is equal to 𝑓 of π‘₯ is equal to one. So let’s begin by examining the first condition; that’s the positivity condition.

We know that 𝑓 of π‘₯ is equal to zero outside of the interval one to five. And this means that our first condition is satisfied for π‘₯ not in the interval one to five. For π‘₯ inside the interval one to five, we know that 𝑓 of π‘₯ is equal to π‘Žπ‘₯. We know that π‘₯ is greater than zero in this interval. And so π‘Ž also must be greater than or equal to zero, since 𝑓 is a probability density function. Our first condition then requires that π‘Ž is greater than or equal to zero. Now let’s look at our second condition, which tells us that the total area under the graph of 𝑦 is 𝑓 of π‘₯ is one. In order to satisfy this condition, we see that π‘Ž cannot be equal to zero, since if π‘Ž is equal to zero, 𝑓 of π‘₯ is equal to zero for all π‘₯. This in turn means that the area would be equal to zero.

Hence, to satisfy the second condition that the total area is equal to one, we cannot have π‘Ž equal to zero. This means that π‘Ž must be greater than zero. And since 𝑓 of π‘₯ is equal to π‘Žπ‘₯ for π‘₯ between one and five, the graph of 𝑓 of π‘₯ over the interval one to five must be a straight line with a positive slope. Now, from this graph, we see that the area under the graph is a trapezoid. And we recall that the area of a trapezoid is one over two multiplied by the sum of the lengths of the base and the top multiplied by the height. And so to find the area of this trapezoid, that’s the area under the curve, we must find the lengths of the base, the top, and the height.

To do this, we begin by finding the coordinates of the vertices of the trapezoid. And to do this, we substitute π‘₯ is equal to one and π‘₯ is equal to five into our function 𝑓 of π‘₯. 𝑓 of one is equal to π‘Ž multiplied by one, which is equal to π‘Ž. And 𝑓 of five is equal to π‘Ž multiplied by five, which is five π‘Ž. And this gives us the coordinates of our vertices, which are one, π‘Ž and five, five π‘Ž. And so the top of our trapezoid has a length π‘Ž and the base has a length five π‘Ž.

The height of our trapezoid is the length that lies along the π‘₯-axis. That is five minus one, which is four. And so we have the top π‘Ž, the base five π‘Ž, and the height four, which we can now substitute into the formula for the area of the trapezoid. And so we have the area is one over two multiplied by five π‘Ž plus π‘Ž multiplied by four. That is two multiplied by six π‘Ž, which is 12π‘Ž.

Now to satisfy our second condition, 12π‘Ž must be equal to one because that’s the area. Dividing both sides by 12, we can solve for π‘Ž. And so the value of π‘Ž is equal to one over 12.

In this example, we found an unknown constant in a probability density function. Let’s turn our attention now to calculating probabilities for continuous random variables.

When calculating probabilities for a continuous random variable 𝑋, we consider the probability that 𝑋 lies within a particular interval. And if we call this interval 𝐼, then the probability that π‘₯ one is less than or equal to 𝑋 is less than or equal to π‘₯ two is equal to the area under the curve 𝑓 of π‘₯ on the interval with boundaries π‘₯ one and π‘₯ two. So the probability is the area under the probability density function 𝑓 of π‘₯.

Now we recall that the total area under the probability density curve is equal to one. And in the sample space, the sum of all the probabilities must be one. Unlike for a discrete random variable, however, for a continuous random variable, we cannot specify the probability that 𝑋 is a particular value. And that’s because the area under the curve for a specific value of 𝑋 doesn’t really exist. It corresponds to the area carved out by an infinitesimally thin line. So instead, we calculate the probability that 𝑋 is between two values. That is the area under the curve between two values of π‘₯.

Now, when the graph of a probability density function forms a simple geometric shape, such as a triangle, a trapezoid, or a rectangle, we can use geometric formulae for the area to find the probabilities of events. Let’s look at an example.

Let 𝑋 be a continuous random variable with the probability density function 𝑓 of π‘₯ represented by the following graph. Find the probability that four is less than or equal to 𝑋 is less than or equal to five.

In this example, we need to find the probability of an event for a continuous random variable, where the event is given by four is less than or equal to 𝑋 is less than or equal to five. Now we recall that the probability of the event π‘₯ one is less than or equal to 𝑋 is less than or equal to π‘₯ two for a continuous random variable is the area under the probability density function 𝑓 of π‘₯ on the interval with boundaries π‘₯ one and π‘₯ two. Since our interval is bounded by π‘₯ is equal to four and π‘₯ is equal to five, we begin by highlighting the region under the curve over this interval.

To find the probability of our event, we must find the area of the highlighted region, which is a trapezoid. Recalling that the area of a trapezoid is one over two multiplied by the sum of the lengths of the base and top multiplied by the height, so we’ll need to find the lengths of our base, top, and height. We can see straight away from the graph that the length of the base is one-quarter. The height is given by five minus four; that is one unit. And it remains to find the length of the top of the trapezoid. And this is the 𝑦-coordinate of the point on the graph at π‘₯ is equal to five.

Now this point lies on a straight line between the points with coordinates four, one-quarter and six, zero. Now, since π‘₯ is equal to five is exactly halfway between π‘₯ is equal to four and π‘₯ is equal to six, the 𝑦-coordinate at π‘₯ is equal to five must be the average of the 𝑦-coordinates of the two endpoints. That is the average of one-quarter and zero. And so we have 𝑦 is equal to one over two times one-quarter plus zero, which is one over eight. And so the length of the top of the trapezoid is one over eight units. And so the base of our trapezoid is one over four units, the top is one over eight units, and the height is one unit.

Now we have everything we need to calculate the area of our trapezoid. And that’s one over two multiplied by one over four plus one over eight multiplied by one. And this evaluates to three over 16 units squared. And so for the probability density function 𝑓 of π‘₯ represented by the graph, the probability that four is less than or equal to 𝑋 is less than or equal to five is three over 16.

In this example, we were given the graph of a probability density function. In our next example, we will find the probability of an event when the probability density function is given in its algebraic form.

Let 𝑋 be a continuous random variable with the probability density function 𝑓 of π‘₯ is equal to one over 63 when π‘₯ is greater than or equal to nine and less than or equal to 72 and zero otherwise. Find the probability that 𝑋 is greater than 64.

In this example, we need to find the probability of an event for a continuous random variable when the event is 𝑋 is greater than 64. We’re given a probability density function, so let’s begin by graphing this function. The function takes the value one over 63 when π‘₯ is between nine and 72 and a zero otherwise.

We recall that the probability of an event for a continuous random variable is given by the area under the graph of the probability density function 𝑓 of π‘₯ over the interval representing the event. In our case then, we need to find the area under this graph over the interval 64 to ∞. However, since we know that this function is equal to zero for π‘₯ greater than 72, we need only find the area under the curve for 𝑋 between 64 and 72. That is the area of the highlighted area on the graph, which is a rectangle. And this area gives us the probability of the given event.

We see that the base of the rectangle has length 72 minus 64; that is eight units. And the height of the rectangle is one over 63. And we know, of course, that the area of a rectangle is the base times the height, which in our case is eight multiplied by one over 63. And that’s eight over 63 squared units. Hence, the probability that 𝑋 is greater than 64 is eight over 63. And we note that this is a reasonable answer for a probability, since eight over 63 lies between zero and one.

Sometimes the graph of a probability density function is a piecewise-defined function consisting of numerous subfunctions. In such cases, to find the probability of an event, we only need to draw the portion of the graph relevant to the given event. Let’s see how this works in our final example.

Let 𝑋 be a continuous random variable with the probability density function 𝑓 of π‘₯ is equal to π‘₯ over eight for π‘₯ between two and three, 𝑓 of π‘₯ is one over 48 for π‘₯ between three and 36, and 𝑓 of π‘₯ is zero otherwise. Find the probability that 𝑋 is between 11 and 24.

In this example, we need to find the probability of an event for a continuous random variable when the event is 𝑋 is between 11 and 24. Now we recall that the probability of an event for a continuous random variable is given by the area under the graph of the probability density function 𝑓 of π‘₯ over the interval representing the event, that is, with boundaries π‘₯ one and π‘₯ two.

In our case then, this means that we need to find the area under the graph over the interval with boundaries 11 and 24. And since we do only need to find the area over this interval, we don’t need to find the graph of the function outside of this region. In particular, the smallest possible π‘₯ in our region is 11 and the largest is 24. And both of these values lie within the range of the second subfunction for 𝑓 of π‘₯. That is the function defined between three and 36.

And so we need to only draw the graph for this subfunction. For values of π‘₯ between three and 36 then, 𝑓 of π‘₯ is the constant function one over 48. Now highlighting the region under the curve between π‘₯ is 11 and 24, we see that our area is that of a rectangle. And the area of this rectangle is the probability of the given event.

We see that the base of our rectangle has length 24 minus 11; that is 13 units. And the height of the rectangle is one over 48 units. And we know that the area of a rectangle is its base times its height. And so the area of our rectangle is 13 multiplied by one over 48; that is 13 over 48 units squared. And so we find that, with the probability density function as shown, the probability that 𝑋 is between 11 and 24 is 13 over 48. And we know that this is a reasonable answer for a probability, since 13 over 48 lies between zero and one.

Let’s complete this video by recapping a few of the important concepts we’ve covered. We know that a continuous random variable takes values in a continuum. A function 𝑓 of π‘₯ is a probability density function if 𝑓 of π‘₯ is greater than or equal to zero for all values of π‘₯ and the total area under the graph 𝑦 is equal to 𝑓 of π‘₯ is equal to one. And finally, the probability of the event that 𝑋 lies between π‘₯ one and π‘₯ two is the area under the curve 𝑦 is equal to 𝑓 of π‘₯ on the interval 𝐼 with boundaries π‘₯ one and π‘₯ two.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.