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, 𝑃(𝑋=π‘₯)=0 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

  • 𝑓(π‘₯)β‰₯0 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 𝑓(π‘₯)=ο¬π‘Žπ‘₯,1≀π‘₯≀5,0.otherwise

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:

  • 𝑓(π‘₯)β‰₯0 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.

𝑓(π‘₯)=0 outside the interval [1,5], which means that the condition 𝑓(π‘₯)β‰₯0 is satisfied here. So, we only need to verify that 𝑓(π‘₯)β‰₯0 for the values of π‘₯ inside the interval [1,5].

For π‘₯ in the interval [1,5], we know that 𝑓(π‘₯)=π‘Žπ‘₯. Since π‘₯ is positive in this interval, this requires π‘Žβ‰₯0 so that 𝑓(π‘₯)=π‘Žπ‘₯β‰₯0. Hence, the first condition requires π‘Žβ‰₯0.

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 π‘Ž=0 since this would lead to 𝑓(π‘₯)=0 for all π‘₯, in which case the area under the graph 𝑦=𝑓(π‘₯) would be 0.

This gives us π‘Ž>0, which tells us that the graph of 𝑓(π‘₯) over the interval [1,5] 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 areabasetopheight=12Γ—(+)Γ—.

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 π‘₯=1 and π‘₯=5 into the function 𝑓(π‘₯). We compute 𝑓(1)=π‘ŽΓ—1=π‘Ž,𝑓(5)=π‘ŽΓ—5=5π‘Ž.

This leads to the coordinates of the vertices (1,π‘Ž) and (5,5π‘Ž), 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 5βˆ’1=4. We can add these values to our graph.

Substituting these values into the formula for the area of a trapezoid, we obtain area=12(5π‘Ž+π‘Ž)Γ—4=12π‘Ž.

Hence, the area of this trapezoid is 12π‘Ž. Since we want this area to equal 1, we must have 12π‘Ž=1, which means π‘Ž=112.

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 𝑃(4≀𝑋≀5).

Answer

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

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 4≀π‘₯≀5.

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 areabasetopheight=12Γ—(+)Γ—.

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 14 and the height is given by 5βˆ’4=1. It remains to find the length of the top of the trapezoid, which is the 𝑦-coordinate of the point on the graph at π‘₯=5.

This point lies on a straight line between the two points ο€Ό4,14 and (6,0). Since π‘₯=5 is exactly halfway between π‘₯=5 and π‘₯=6, the 𝑦-coordinate at π‘₯=5 must be the average of the 𝑦-coordinates of the two endpoints. This gives us 𝑦=12ο€Ό14+0=18.

Hence, we obtain the coordinates of this point to be ο€Ό5,18. Let us add the corresponding lengths on the graph.

The provided graph of our probability density function is a trapezoid with base 14, top 18, and height 1. So, the area of the trapezoid is 12Γ—ο€Ό14+18οˆΓ—1=316.

Then, the probability 𝑃(4≀𝑋≀5)=316. We note that this is a reasonable answer for probability since 316 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 𝑓(π‘₯)=163,9≀π‘₯≀720.otherwise

Find 𝑃(𝑋>64).

Answer

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

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 [64,∞[. However, since this function is equal to 0 for π‘₯>72, we only need to find the area over the interval [64,72]. 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 72βˆ’64=8.

The height of this rectangle is 163. Multiplying these numbers together, the area of this rectangle is 8Γ—163=863.

Hence, the probability 𝑃(𝑋>64)=863. We note that this is a reasonable answer for probability since 863 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 𝑓(π‘₯)=⎧βŽͺ⎨βŽͺ⎩π‘₯8,2<π‘₯<3,148,3<π‘₯<36,0.otherwise

Find 𝑃(11≀𝑋≀24).

Answer

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

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 [11,24]. 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: 𝑓(π‘₯)=148,3<π‘₯<36.

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

We can highlight the region over the interval [11,24].

The area of the highlighted rectangle equals the probability of the given event. We can see that the base of this rectangle has length 24βˆ’11=13.

The height of this rectangle is 148. Multiplying these numbers together, the area of this rectangle is 13Γ—148=1348.

Hence, we have the probability 𝑃(11≀𝑋≀24)=1348.

We note that this is a reasonable answer for probability since 1348 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 𝑓(π‘₯)=16(π‘₯βˆ’5),7≀π‘₯≀9,0.otherwise

Find 𝑃(𝑋≀8).

Answer

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

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 ]βˆ’βˆž,8]. However, since this function is equal to 0 for π‘₯<7, we only need to find the area over the interval [7,8]. 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 areabasetopheight=12Γ—(+)Γ—.

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 π‘₯=7 and π‘₯=8 into the function 𝑓(π‘₯). We compute 𝑓(7)=16(7βˆ’5)=13,𝑓(8)=16(8βˆ’5)=12.

This leads to the coordinates of the vertices ο€Ό7,13 and ο€Ό8,12, 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 8βˆ’7=1. We can add these values to our graph.

So, the area of the trapezoid is 12Γ—ο€Ό12+13οˆΓ—1=512.

Then, the probability is 𝑃(7≀𝑋≀8)=512. We note that this is a reasonable answer for probability since 512 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
    • 𝑓(π‘₯)β‰₯0 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.