# Continuous Random Variables

> Mathematics · CIE A-Level 9709
> Source: https://www.owlsprep.com/study/cie-9709-u4-continuous-random-variables/

This module covers core properties of continuous random variables, probability density functions, cumulative distribution functions, and calculation of key statistical measures for CIE 9709 exam problems.

**Prerequisites:** [Basic definite integral calculation](https://www.owlsprep.com/study/cie-9709-p3-integration-techniques/); [Discrete random variables foundational concepts](https://www.owlsprep.com/study/cie-9709-u4-discrete-random-variables/)

## Learning objectives

- Define probability density functions (PDF) for continuous random variables and verify their validity
- Calculate cumulative distribution functions (CDF) from given PDFs and vice versa
- Compute expectation, variance, median, mode and percentiles for continuous distributions
- Solve practical probability problems involving continuous random variables aligned to CIE exam requirements

## How often is this tested?

Based on OwlsPrep's analysis of official CIE 9709 S2 past papers (2016–2025): **Continuous Random Variables** appears **131 times** in the last 10 years — **30.6%** of all S2 questions (131 of 428).

Most-tested forms: Sampling distribution of sample mean; CLT applications (81), Confidence intervals for population mean (known/unknown variance) (43), 由 pdf 求均值与方差 (28).

## Core Properties of Probability Density Functions (PDF)

Unlike discrete random variables, continuous random variables cannot have their probability represented at single points, as the total number of possible outcomes is uncountably infinite. The probability density function f(x) must satisfy two non-negotiable conditions for all values of x in its domain.

$$f(x) \geq 0 \text{ for all } x, \quad \int_{-\infty}^{\infty} f(x) dx = 1$$

**Valid Probability Density Function** — A function that is non-negative across its entire domain, and the total area under the curve over the full range of the random variable equals exactly 1

**Worked example:** Verify that the function f(x) = k(4 - x^2) defined for 0 ≤ x ≤ 2, and 0 otherwise, is a valid PDF, and find the value of constant k

1. First confirm f(x) is non-negative over 0 ≤ x ≤ 2: 4 - x² ranges from 4 to 0, so f(x) ≥ 0 for all x in the domain
2. Set the total definite integral over the domain equal to 1 to solve for k:

   $$\int_{0}^{2} k(4 - x^2) dx = 1$$
3. Evaluate the integral:

   $$k \left[ 4x - \frac{x^3}{3} \right]_0^2 = k \left( 8 - \frac{8}{3} \right) = \frac{16k}{3} = 1$$
4. Rearrange to find k:

   $$k = \frac{3}{16}$$

**Check your understanding**

Test your understanding of PDF validity rules:

1. Which of the following functions meets the basic requirements for a valid PDF over 1 ≤ x ≤ 3?

   - f(x) = -0.5x + 2
   - f(x) = 0.5x - 1
   - f(x) = 2x - 1
   - f(x) = x²

   *Why:* This function is non-negative across 1 ≤ x ≤3, and the total integral equals 1

## Cumulative Distribution Functions (CDF)

The cumulative distribution function F(x) gives the probability that the random variable X takes a value less than or equal to x, calculated as the definite integral of the PDF from the lower bound of the domain up to x. For piecewise PDFs, you will derive piecewise CDFs for each interval.

$$F(x) = P(X \leq x) = \int_{a}^{x} f(t) dt, \quad \text{for domain } a \leq X \leq b$$

**Derivation:** Derive CDF from the PDF f(x) = 3/16 (4 - x²) for 0 ≤ x ≤ 2

1. Integrate the PDF from 0 to x:

   $$F(x) = \int_{0}^{x} \frac{3}{16}(4 - t^2) dt$$
2. Evaluate the antiderivative:

   $$F(x) = \frac{3}{16} \left[ 4t - \frac{t^3}{3} \right]_0^x = \frac{12x - x^3}{16}$$
3. Add boundary conditions: F(x) = 0 for x < 0, F(x) = 1 for x > 2

*Conclusion:* The full CDF is a piecewise function that increases monotonically from 0 to 1 across the domain

**Worked example:** Given F(x) = \frac{x^2}{9} for 0 ≤ x ≤ 3, find P(1 ≤ X ≤ 2)

1. Recall that for continuous variables, P(a ≤ X ≤ b) = F(b) - F(a)
2. Substitute b=2 and a=1:

   $$P(1 \leq X \leq 2) = F(2) - F(1) = \frac{4}{9} - \frac{1}{9} = \frac{3}{9} = \frac{1}{3}$$

**Exam command terms**

CIE exam questions use specific command terms for CDF problems:

- **Show that the CDF is...** — You must fully show every step of integration and boundary condition definition to earn full marks

- **Hence find P(X > 1.5)** — Use the derived CDF, do not re-integrate the PDF from scratch

## Expectation and Variance for Continuous Random Variables

The expected value E[X] (mean) of a continuous random variable is calculated by integrating x multiplied by the PDF across the full domain. Variance is calculated as E[X²] - (E[X])², the same identity used for discrete variables.

$$E[X] = \int_{-\infty}^{\infty} x f(x) dx, \quad E[g(X)] = \int_{-\infty}^{\infty} g(x) f(x) dx$$

**Worked example:** Calculate E[X] and Var(X) for the PDF f(x) = 3/16 (4 - x²) defined over 0 ≤ x ≤ 2

1. Compute E[X] first:

   $$E[X] = \int_{0}^{2} x \cdot \frac{3}{16}(4 - x^2) dx = \frac{3}{16} \int_{0}^{2} 4x - x^3 dx$$
2. Evaluate the integral:

   $$E[X] = \frac{3}{16} \left[ 2x^2 - \frac{x^4}{4} \right]_0^2 = \frac{3}{16} (8 - 4) = \frac{12}{16} = 0.75$$
3. Compute E[X²] for variance:

   $$E[X^2] = \int_{0}^{2} x^2 \cdot \frac{3}{16}(4 - x^2) dx = \frac{3}{16} \int_{0}^{2} 4x^2 - x^4 dx$$
4. Simplify to find variance:

   $$E[X^2] = \frac{3}{16} \left[ \frac{4x^3}{3} - \frac{x^5}{5} \right]_0^2 = \frac{3}{16} \left( \frac{32}{3} - \frac{32}{5} \right) = 0.8$$
5. Apply the variance identity:

   $$Var(X) = 0.8 - (0.75)^2 = 0.8 - 0.5625 = 0.2375$$

> **tip**
>
> Always use the Var(X) = E[X²] - (E[X])² identity instead of integrating (x - μ)² f(x) dx, it will save you 2-3 minutes in the exam

## Median, Mode and Percentiles

The median m of a continuous distribution is the value where F(m) = 0.5, the point where half the total area under the PDF lies to the left. The mode is the value of x where f(x) reaches its maximum, found via differentiation for differentiable functions.

**Worked example:** Find the median of the distribution with CDF F(x) = (12x - x³)/16 for 0 ≤ x ≤ 2

1. Set F(m) = 0.5:

   $$\frac{12m - m^3}{16} = 0.5$$
2. Rearrange to form a cubic equation:

   $$m^3 - 12m + 8 = 0$$
3. Solve the cubic numerically (as expected in CIE exams) to find m ≈ 0.694, which lies inside the domain 0 ≤ m ≤ 2

> **mnemonic**
>
> MMM: Median from CDF set to 0.5, Mode from maximum of PDF, Mean from integral of x f(x)

## Common pitfalls

- **Wrong:** Treating P(X = a) as a non-zero value for continuous variables
  - Why it fails: Single points have zero width under the PDF curve, so their probability is always 0
  - Correct: Always calculate probability over an interval [a, b] instead of a single point
- **Wrong:** Forgetting to add boundary conditions when deriving CDF
  - Why it fails: CIE exam markers deduct 1 mark for missing F(x)=0 for x < lower bound and F(x)=1 for x > upper bound
  - Correct: Explicitly state all piecewise intervals for the full CDF in your solution
- **Wrong:** Calculating variance as E[X²] without subtracting (E[X])²
  - Why it fails: This gives you the second moment, not the variance, leading to an incorrect value
  - Correct: Write the variance identity at the top of your working before you start calculations
- **Wrong:** Finding the median by locating the maximum of the PDF
  - Why it fails: That gives you the mode, not the median, which is based on cumulative probability
  - Correct: Set the CDF equal to 0.5 and solve for the median value
- **Wrong:** Integrating the PDF over the entire real line for piecewise functions
  - Why it fails: This wastes time and can lead to arithmetic errors for functions zero outside a narrow interval
  - Correct: Only integrate over the non-zero domain of the PDF

## Cheatsheet

| Measure | Formula for continuous X |
| --- | --- |
| PDF Validity | $f(x) \geq 0$, $\int_{dom} f(x) dx = 1$ |
| CDF | $F(x) = \int_{a}^{x} f(t) dt$ |
| Expectation $E[X]$ | $\int_{dom} x f(x) dx$ |
| Variance $Var(X)$ | $E[X^2] - (E[X])^2$ |
| Median $m$ | $F(m) = 0.5$ |
| Mode | Value of $x$ that maximises $f(x)$ |

## What's next

Mastering continuous random variables is the critical foundation for all subsequent continuous distribution topics in your CIE 9709 exam, including the normal distribution, uniform distribution, and continuous sampling concepts. You will regularly combine these core PDF and CDF skills with integration techniques you learned in Pure Mathematics to solve 8-12 mark extended response questions that appear on almost every Statistics paper. These problems are high yield, as they often allow partial marks even if you make an error solving for the initial constant k, as long as your subsequent working follows correct rules. Move on to practice targeted problem sets to reinforce your understanding, then progress to the next related sub-topics to build your full statistics toolkit.

- [Normal Distribution Fundamentals](https://www.owlsprep.com/study/cie-9709-u4-normal-distribution/)
- [Discrete Random Variables Revision](https://www.owlsprep.com/study/cie-9709-u4-discrete-random-variables/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/cie-9709-u4-continuous-random-variables/
