Mathwords logoMathwords

Continuous Random Variable — Definition, Formula & Examples

A continuous random variable is a random variable that can take any value in an interval, such as a person's height or a wait time. It does not take only separate, countable values the way a die roll does.

A random variable XX is continuous if there is a probability density function ff with f(x)≥0f(x) \ge 0 for all xx and ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1, such that P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx for all a≤ba \le b. It follows that P(X=c)=0P(X = c) = 0 for every single value cc.

Key Formula

P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx
Where:
  • XX = the continuous random variable
  • f(x)f(x) = the probability density function (the height of the density curve at x)
  • a,ba, b = the endpoints of the interval, with a ≤ b

Worked Example

Problem: A bus arrives at a random time within a 20-minute window, so your wait time XX (in minutes) is uniform on [0,20][0, 20] with density f(x)=120f(x) = \frac{1}{20}. Find the probability that you wait between 5 and 12 minutes.
Step 1: Check that the density is valid. The total area under the curve must equal 1. Here the region under the curve is a rectangle with width 20 and height 1/20.
20×120=120 \times \frac{1}{20} = 1
Step 2: The probability is the area under the curve from 5 to 12. That region is a rectangle with width 12 − 5 = 7 and height 1/20.
P(5≤X≤12)=7×120=720=0.35P(5 \le X \le 12) = 7 \times \frac{1}{20} = \frac{7}{20} = 0.35
Step 3: Because a single point has zero width, it adds no area. So whether you include the endpoints does not change the answer.
P(X=12)=0⇒P(5<X<12)=P(5≤X≤12)P(X = 12) = 0 \quad\Rightarrow\quad P(5 < X < 12) = P(5 \le X \le 12)
Answer: The probability of waiting between 5 and 12 minutes is 0.350.35.

Why It Matters

In AP Statistics, every normal-model calculation treats the variable as continuous. When you convert to a z-score and read a table, you are finding an area under a density curve. The same idea gives p-values for t-tests and chi-square tests, and engineers use it to model component lifetimes with the exponential distribution.

Common Mistakes

Mistake: Treating the density value f(x)f(x) as the probability that X=xX = x.
Correction: Only areas under the curve are probabilities, and P(X=x)=0P(X = x) = 0. A density can even exceed 1. For example, a uniform variable on [0,0.5][0, 0.5] has f(x)=2f(x) = 2, yet its total area is 0.5×2=10.5 \times 2 = 1.

Related Terms