Lesson Explainer: Continuous Random Variables | Nagwa Lesson Explainer: Continuous Random Variables | Nagwa

Lesson Explainer: Continuous Random Variables Mathematics

Join Nagwa Classes

Attend live Mathematics sessions on Nagwa Classes to learn more about this topic from an expert teacher!

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 zero: 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.

When working with a continuous random variable, boundary conditions of events can be neglected. In other words, strict and weak inequalities, and <, describing different events are interchangeable. To see why this is the case, let us examine the probability 𝑃(𝑋𝑎) for some real number 𝑎. Since the events {𝑋<𝑎} and {𝑋=𝑎} are mutually exclusive, we have 𝑃(𝑋𝑎)=𝑃(𝑋<𝑎)+𝑃(𝑋=𝑎).

But because 𝑃(𝑋=𝑎)=0 for the continuous random variable 𝑋, we have the equivalency 𝑃(𝑋𝑎)=𝑃(𝑋<𝑎). Similarly, for any upper bound 𝑎 and lower bound 𝑏, we have the identity 𝑃(𝑎𝑋𝑏)=𝑃(𝑎<𝑋𝑏)=𝑃(𝑎𝑋<𝑏)=𝑃(𝑎<𝑋<𝑏).

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 each 𝑥 in its domain,
  • 𝑓(𝑥)𝑥=1d.

Consider a 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. Any probability function 𝑓(𝑥) satisfies the identity 𝑓(𝑥)𝑥=1.d

Based on our previous discussion, we recall that this identity roots from the rule of probability.

Let us consider a few examples where we use the rule of probability to identify unknown constants within probability density functions.

Example 1: Using the Probability Density Function of a 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

The given probability density function has an unknown parameter 𝑎. We remember that 𝑓(𝑥)=1, which can be used to find 𝑎. We note that 𝑓(𝑥) is only nonzero over the interval 1𝑥5, where it takes the form 𝑎𝑥. So it must be true that 𝑎𝑥𝑥=1.d

Now, we evaluate the integral on the left side: 𝑎𝑥𝑥=12𝑎𝑥|||=12(25𝑎𝑎)=12𝑎.d

Then, we must have 12𝑎=1, which means 𝑎=112.

Let us consider another example to apply the Rule of Probability to compute an unknown constant in the probability density function.

Example 2: Using the Probability Density Function of a Continuous Random Variable to Evaluate an Unknown

Let 𝑋 be a continuous random variable with probability density function 𝑓(𝑥)=4𝑥+𝑘21,3𝑥4,0.otherwise

Find the value of 𝑘.

Answer

This probability density function has an unknown parameter 𝑘. To identify 𝑘, we use the fact that 1=𝑓(𝑥)=4𝑥+𝑘21𝑥.d

Evaluating the integral on the right side, 4𝑥+𝑘21𝑥=1214𝑥+𝑘𝑥=1212𝑥+𝑘𝑥|||=1212×4+4𝑘2×3+3𝑘=121(14+𝑘).dd

So, we must have 121(14+𝑘)=114+𝑘=21, which leads to 𝑘=7.

Say that a continuous random variable 𝑋 has the probability density function 𝑓(𝑥) in the following figure, and that 𝐼 is an interval. Then, the probability of an event for {𝑋𝐼} is equal to the area under the curve 𝑦=𝑓(𝑥) over the given interval 𝐼. We recall that since 𝑓(𝑥) is a nonnegative function, then the area under the curve is equal to the definite integral of 𝑓(𝑥) over the interval 𝐼. For instance, the probability 𝑃(𝑋𝑎) for an upper bound 𝑎 is equal to the area under the curve over the interval ],𝑎], which is pictured below.

This is given by the integral 𝑃(𝑋𝑎)=𝑓(𝑥)𝑥.d

Likewise, to compute the probability 𝑃(𝑎<𝑋<𝑏) for the upper and lower bounds 𝑎 and 𝑏, we compute the area over the interval ]𝑎,𝑏[ as pictured below.

This is given by the integral 𝑃(𝑎<𝑋<𝑏)=𝑓(𝑥)𝑥.d

In general, we have the following formulae.

How To: Computing the Probability of a Continuous Random Variable

Let 𝑋 be a continuous random variable with the probability density function 𝑓(𝑥). Given any real numbers 𝑎 and 𝑏 with 𝑎<𝑏,

  • 𝑃(𝑋𝑎)=𝑓(𝑥)𝑥d,
  • 𝑃(𝑋𝑎)=𝑓(𝑥)𝑥d,
  • 𝑃(𝑎𝑋𝑏)=𝑓(𝑥)𝑥d.

Although the integral formulae above can always be used to compute probabilities, it may be more efficient sometimes to use geometry when possible. This is the case when the graph of the probability density function forms simple geometric shapes such as a triangle, a trapezoid, or a semicircle.

Let us consider an example where the graph of the probability density function is given as a trapezoid. In this example, we will use geometry to compute the probability.

Example 3: 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

We are given the probability density function as a graph, so we begin by highlighting the region under the curve over the interval 4𝑥5. In particular, we can deduce that the height at 𝑥=5 is 18 because it is precisely halfway between 4 and 6.

We recall that the area of a trapezoid is given by the formula areabasetopheight=12×(+)×.

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.

When the graphs of probability density functions are not provided, it is often easier to use the integral formulae to compute the required probabilities. In the next two examples, we will use the given probability density functions with the integral formulae to compute the probabilities.

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

Let 𝑋 be a continuous random variable with the probability density function 𝑓(𝑥)=163,9𝑥72,0.otherwise

Find 𝑃(𝑋>64).

Answer

The probability density function is given as a formula, so we can use an integral to find the probability. That is, 𝑃(𝑋>64)=𝑓(𝑥)𝑥.d

Since 𝑓(𝑥) is a piecewise-defined function, we can split this integral into two regions: 𝑓(𝑥)𝑥=𝑓(𝑥)𝑥+𝑓(𝑥)𝑥.ddd

We note that 𝑓(𝑥)=163 for 64𝑥72, and 𝑓(𝑥)=0 for 𝑥>72. So, 𝑓(𝑥)𝑥=163𝑥+0𝑥=163𝑥|||+0=163(7264)=863.ddd

So, the probability 𝑃(𝑋>64)=863. We note that this is a reasonable answer for probability since 863 is between 0 and 1.

Let us consider another example using the integral formulae to become familiar with different contexts.

Example 5: Using the 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

Since we are given the probability density function, we can write the integral 𝑃(11𝑋24)=𝑓(𝑥)𝑥.d

Over the interval 11𝑥24, we have 𝑓(𝑥)=148. So, 𝑃(11𝑋24)=148𝑥=148𝑥|||=148(2411)=1348.d

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

Key Points

  • A continuous random variable 𝑋 takes any real number values in a continuum.
  • For a continuous random variable 𝑋, 𝑃(𝑋=𝑥)=0 for any value 𝑥. Strict and weak inequalities, and <, in events are interchangeable.
  • A continuous random variable is characterized by its probability density function 𝑓(𝑥), which must satisfy 𝑓(𝑥)0 and 𝑓(𝑥)𝑥=1d.
  • Given the probability density function 𝑓(𝑥) of 𝑋, the probability of an event {𝑋𝐼} for an interval 𝐼 is equal to the area under the graph 𝑦=𝑓(𝑥) over the interval 𝐼.
  • Let 𝑋 be a continuous random variable with the probability density function 𝑓(𝑥). Given any real numbers 𝑎 and 𝑏 with 𝑎<𝑏,
    • 𝑃(𝑋𝑎)=𝑓(𝑥)𝑥d,
    • 𝑃(𝑋𝑎)=𝑓(𝑥)𝑥d,
    • 𝑃(𝑎𝑋𝑏)=𝑓(𝑥)𝑥d.
  • If the graph of 𝑓(𝑥) is provided and takes a simple geometric shape (e.g., triangle, trapezoid, and semicircle), then we can use geometry to compute the probability more efficiently.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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