All subjects · Mathematics · WST02 Statistics 2

Mean and variance of a continuous random variable

Edexcel IAL Mathematics · WST02 Statistics 2

The mean and variance of a continuous random variable are found by integration, replacing the sums used for discrete variables.

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

Formulae

Integrate over the range where f(x) is not zero; for a piecewise pdf, add the integrals for each piece. More generally E(g(X)) = ∫ g(x) f(x) dx.

Example

f(x) = 3x2/8 for 0 ≤ x ≤ 2:

E(X) = ∫ 3x3/8 dx = [3x4/32] = 3/2

E(X2) = ∫ 3x4/8 dx = [3x5/40] = 12/5

Var(X) = 12/5 - 9/4 = 3/20.

Examiners want the substituted values written down (such as 12/5 - (3/2)2) before the answer, not a bare calculator result.

Linear functions and symmetry

As in S1: E(aX + b) = aE(X) + b and Var(aX + b) = a2 Var(X).

If the pdf is symmetrical about x = c, then E(X) = c with no integration needed. Examiners report that many students miss this shortcut.

Worked example

f(x) = 3x2/8 for 0 ≤ x ≤ 2. Find E(3X - 2) and Var(3X - 2).

  1. E(X) = 3/2 and Var(X) = 3/20 (from above)
  2. E(3X - 2) = 3 × 3/2 - 2 = 5/2
  3. Var(3X - 2) = 9 × 3/20

Answer: E(3X - 2) = 5/2, Var(3X - 2) = 27/20

Key idea: E(X) = ∫ x f(x) dx, Var(X) = ∫ x2 f(x) dx - [E(X)]2. Use symmetry when you can.

Check yourself

  1. f(x) = 3x2/8 for 0 ≤ x ≤ 2 and 0 otherwise. Find E(X). Give your answer as a fraction in its simplest form.
    Show answer

    3/2. ∫ from 0 to 2 of 3x3/8 dx = [3x4/32] = 48/32 = 3/2.

  2. f(x) = 3x2/8 for 0 ≤ x ≤ 2 and 0 otherwise. Find E(X2). Give your answer as a fraction in its simplest form.
    Show answer

    12/5. ∫ from 0 to 2 of 3x4/8 dx = [3x5/40] = 96/40 = 12/5.

  3. f(x) = 3x2/8 for 0 ≤ x ≤ 2 and 0 otherwise. Find Var(X). Give your answer as a fraction in its simplest form.
    Show answer

    3/20. 12/5 - (3/2)2 = 48/20 - 45/20 = 3/20.

  4. f(x) = 3x2/8 for 0 ≤ x ≤ 2 and 0 otherwise. Find the standard deviation of X. Give your answer to 3 significant figures.
    Show answer

    0.387. sqrt(3/20) = 0.3873.

  5. f(x) = 3x2/8 for 0 ≤ x ≤ 2 and 0 otherwise. Find Var(3X - 2). Give your answer as a fraction in its simplest form.
    Show answer

    27/20. 9 × 3/20 = 27/20. The -2 does not change the spread.

  6. f(x) = 3x2/8 for 0 ≤ x ≤ 2 and 0 otherwise. Find E(1/X). Give your answer as a fraction in its simplest form.
    Show answer

    3/4. ∫ from 0 to 2 of (1/x)(3x2/8) dx = ∫ 3x/8 dx = [3x2/16] = 3/4.

  7. The pdf in the table is symmetrical about x = 2. Write down E(X).
    Show answer

    2. By symmetry, E(X) = 2.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.