# Lesson Explainer: Continuous Random Variables Mathematics

In this explainer, 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.

Continuous random variables take an infinite number of real number values in a continuum. The probability of a continuous random variable taking a particular value is 0—that is, for any value . The fact that the random variable has a zero probability of taking any one value is what distinguishes the continuous random variables from the discrete ones.

A continuous random variable is characterized by its probability density function, which is a nonnegative function whose total area under the curve is 1. The area under the curve of the probability density function represents the probability of the whole sample space. We recall the rule of probability, which states that the probabilities of mutually exclusive events add up to 1. This rule necessitates the total area under the curve to be 1.

### Definition: Probability Density Function

A function is a probability density function if

• for all values of ,
• the total area under the graph is equal to 1.

Consider the probability density function whose graph is given below.

We note that this function is never negative and the total area under the curve is equal to 1. So, this graph is a probability density function by the definition above.

When a probability density function contains an unknown constant, we can often identify the unknown constant using one of the conditions in the definition above.

In our first example, we will identify an unknown constant in a given function so that it satisfies the conditions for a probability density function.

### Example 1: Using Probability Density Function of Continuous Random Variable to Evaluate an Unknown

Let be a continuous random variable with probability density function

Determine the value of .

### Answer

In this example, we are given that is a probability density function of a continuous random variable. Recall that a function is a probability density function if it satisfies the following conditions:

• for all values of ,
• the total area under the graph is equal to 1.

Since the given function is a probability density function, it must satisfy both conditions. Let us examine the first condition.

outside the interval , which means that the condition is satisfied here. So, we only need to verify that for the values of inside the interval .

For in the interval , we know that . Since is positive in this interval, this requires so that . Hence, the first condition requires .

Let us examine the second condition, which states that the total area under the graph is equal to 1. Immediately, we can see that we cannot have since this would lead to for all , in which case the area under the graph would be 0.

This gives us , which tells us that the graph of over the interval is a straight line with a positive slope. Let us draw such a graph.

From this graph, we can see that the area under the graph is a trapezoid. We recall that the area of a trapezoid is given by the formula

Hence, we can find the area of this trapezoid if we can find the lengths of the base, top, and height of the trapezoid. We can find the coordinates of the vertices of the trapezoid by substituting and into the function . We compute

This leads to the coordinates of the vertices and , respectively, which gives us the lengths of the top and bottom of the trapezoid. Lastly, the height of this trapezoid is the length that lies along the -axis, which is given by . We can add these values to our graph.

Substituting these values into the formula for the area of a trapezoid, we obtain

Hence, the area of this trapezoid is . Since we want this area to equal 1, we must have , which means .

In the previous example, we found an unknown constant in a probability density function. Let us turn our attention to the method of computing the probability of an event using the probability density function.

### How To: Finding the Probability of an Event from a Probability Density Function

Consider a continuous random variable with probability density function , and consider that is an interval representing an event. Then, the probability of the event is equal to the area under the curve over the interval .

When the graph of the probability density function forms simple geometric shapes such as a triangle, a trapezoid, or a rectangle, we can use geometric formulas for the area to find probabilities of events.

Let us consider an example where we will find the probability of an event for a continuous random variable whose probability density function has a trapezoidal graph.

### Example 2: Computing the Probability of a Continuous Random Variable Using Graphs

Let be a continuous random variable with the probability density function represented by the following graph. Find .

### Answer

In this example, we need to find the probability of an event for a continuous random variable where the event is given by

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 over the interval representing the event. Let us begin by highlighting the region under the curve over the interval .

We can find the probability of our event by finding the area of the highlighted region, which is a trapezoid. We recall that the area of a trapezoid is given by the formula

Hence, we can find the area of this trapezoid if we can find the lengths of the base, top, and height of the trapezoid.

From the graph, we can see the length of the base of the trapezoid is and the height is given by . It remains to find the length of the top of the trapezoid, which is the -coordinate of the point on the graph at .

This point lies on a straight line between the two points and . Since is exactly halfway between and , the -coordinate at must be the average of the -coordinates of the two endpoints. This gives us

Hence, we obtain the coordinates of this point to be . Let us add the corresponding lengths on the graph.

The provided graph of our probability density function is a trapezoid with base , top , and height 1. So, the area of the trapezoid is

Then, the probability . We note that this is a reasonable answer for probability since is between 0 and 1.

In the previous example, we computed the probability of an event for a continuous random variable when the graph of its probability density function was provided. In the next examples, we will find the probability of an event when the probability density function is given in its algebraic form.

### Example 3: Using Probability Density Function of a Continuous Random Variable to Find Probabilities

Let be a continuous random variable with the probability density function

Find .

### Answer

In this example, we need to find the probability of an event for a continuous random variable when the event is

Let us begin by graphing the probability density function.

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 over the interval representing the event. This means that we need to find the area under this graph over the interval . However, since this function is equal to 0 for , we only need to find the area over the interval . We highlight this portion of the graph.

The area of the highlighted rectangle equals the probability of the given event. We can see that the base of this rectangle has length

The height of this rectangle is . Multiplying these numbers together, the area of this rectangle is

Hence, the probability . We note that this is a reasonable answer for probability since is between 0 and 1.

Sometimes, the graph of a probability density function is a piecewise-defined function with many subfunctions. If all we want to do is to find the probability of an event, we only need to draw the portion of the graph relevant to the given event.

Let us consider another example where we will find the probability of an event where the probability density function contains three subfunctions.

### Example 4: Using Probability Density Function of a Continuous Random Variable to Find Probabilities

Let be a continuous random variable with the probability density function

Find .

### Answer

In this example, we need to find the probability of an event for a continuous random variable when the event is

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 over the interval representing the event. This means that we need to find the area under this graph over the interval . Since we only need to find the area over this interval, we do not need to find the graph of the function outside the relevant region. In particular, we only need to draw the graph of the following subfunction:

Let us begin by graphing this portion of the probability density function.

We can highlight the region over the interval .

The area of the highlighted rectangle equals the probability of the given event. We can see that the base of this rectangle has length

The height of this rectangle is . Multiplying these numbers together, the area of this rectangle is

Hence, we have the probability

We note that this is a reasonable answer for probability since is between 0 and 1.

In the final example, we will find the probability of an event by finding the area of a trapezoidal region under the probability density function.

### Example 5: Using Probability Density Function of a Continuous Random Variable to Find Probabilities

Let be a continuous random variable with probability density function

Find .

### Answer

In this example, we need to find the probability of an event for a continuous random variable when the event is

Let us begin by graphing the probability density function.

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 over the interval representing the event. This means that we need to find the area under this graph over the interval . However, since this function is equal to 0 for , we only need to find the area over the interval . We highlight this portion of the graph.

We can find the probability of our event by finding the area of the highlighted region, which is a trapezoid. We recall that the area of a trapezoid is given by the formula

Hence, we can find the area of this trapezoid if we can find the lengths of the base, top, and height of the trapezoid. We can find the coordinates of the vertices of the trapezoid by substituting and into the function . We compute

This leads to the coordinates of the vertices and , respectively, which gives us the lengths of the top and bottom of the trapezoid. Lastly, the height of this trapezoid is the length that lies along the -axis, which is given by . We can add these values to our graph.

So, the area of the trapezoid is

Then, the probability is . We note that this is a reasonable answer for probability since is between 0 and 1.

Let us finish by recapping a few important concepts from this explainer.

### Key Points

• A continuous random variable takes values in a continuum of real numbers.
• A function is a probability density function if
• for all values of ,
• the total area under the graph is equal to 1.
• Consider a continuous random variable with probability density function , with being an interval representing an event. Then, the probability of the event is equal to the area under the curve over the interval .

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