Mean, variance, mode, median and quartiles

Mean, variance, mode, median and quartiles

Spec 2.4–5 · Edexcel International A Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • E(X)=∫xf(x) dxE(X)=\int xf(x)\,dx and Var(X)=E(X2)−[E(X)]2\text{Var}(X)=E(X^2)-[E(X)]^2.
  • The mode is where f(x)f(x) is greatest.
  • The median mm solves F(m)=12F(m)=\frac12.
  • Quartiles solve F(Q1)=14F(Q_1)=\frac14 and F(Q3)=34F(Q_3)=\frac34.
  • Median above mean means negative skew; below means positive skew.

Mean and variance

Integrate xf(x)xf(x) for the mean and x2f(x)x^2f(x) for E(X2)E(X^2), then subtract [E(X)]2[E(X)]^2.

For a continuous random variable with pdf f(x)f(x), the mean is E(X)=∫xf(x) dxE(X)=\int xf(x)\,dx and E(X2)=∫x2f(x) dxE(X^2)=\int x^2f(x)\,dx. In practice, integrate only over the interval where ff is not 0.

The variance is E(X2)−[E(X)]2E(X^2)-[E(X)]^2.

0.20.40.60.811.21.41.61.820.20.40.60.811.21.41.61.8xymean 1.5f(x) = 3x²/8
Illustrative pdf f(x) = 3x²/8 on 0 ≤ x ≤ 2: total area 1, mean E(X) = ∫xf(x)dx = 1.5.
  • E(X)∫x f(x) dx\int x\,f(x)\,dx
  • Var(X)E(X2)−[E(X)]2E(X^2)-[E(X)]^2

Worked example

f(x)=3x28f(x)=\dfrac{3x^2}{8} on [0,2][0,2]. Find E(X)E(X) and Var(X)\text{Var}(X).

E(X)=3E(X)=3 and E(X2)=11E(X^2)=11. What is Var(X)\text{Var}(X)?

The mode

The mode is where the pdf is greatest: a turning point, or an end of the interval.

The mode is the value of xx at which f(x)f(x) is greatest. If ff has a turning point inside the interval, solve f′(x)=0f'(x)=0 and check it is a maximum. If ff is increasing (or decreasing) throughout, the mode is at an end of the interval.

For f(x)=12x2(1−x)f(x)=12x^2(1-x), f′(x)=12x(2−3x)=0f'(x)=12x(2-3x)=0 at x=0x=0 and x=23x=\frac23. At x=0x=0, f=0f=0, so the mode is 23\frac23.

0.10.20.30.40.50.60.70.80.910.20.40.60.811.21.41.61.82xymode, x = 2/3f(x)
f(x)=12x2(1−x)f(x)=12x^2(1-x) on [0,1][0,1] peaks at x=23x=\frac23, so the mode is 23\frac23.

f(x)=x2f(x)=\dfrac{x}{2} on [0,2][0,2]. What is the mode?

The median

The median mm is the value with half the probability below it: F(m)=12F(m)=\frac12.

The median mm satisfies F(m)=12F(m)=\frac12, equivalently ∫−∞mf(x) dx=12\int_{-\infty}^mf(x)\,dx=\frac12. Find F(x)F(x) first, then solve for mm.

0.20.40.60.811.21.41.61.820.20.40.60.811.21.41.61.8xymedian ≈ 1.587f(x) = 3x²/8
Same pdf: the median m = ∛4 ≈ 1.587 leaves an area of 1/2 to its left (shaded), so F(m) = 1/2.
  • Median mF(m)=12F(m)=\dfrac12

Worked example

f(y)=y2f(y)=\dfrac y2 on [0,2][0,2]. Find the median.

What equation defines the median mm?

Quartiles and skew

The lower and upper quartiles solve F=14F=\frac14 and F=34F=\frac34; compare mean and median for skew.

The lower quartile Q1Q_1 and upper quartile Q3Q_3 satisfy F(Q1)=14F(Q_1)=\frac14 and F(Q3)=34F(Q_3)=\frac34. The interquartile range is Q3−Q1Q_3-Q_1. For F(y)=y24F(y)=\frac{y^2}{4}: Q1=1Q_1=1, Q3=3Q_3=\sqrt3, so the interquartile range is 3−1\sqrt3-1.

For f(t)=3t264f(t)=\frac{3t^2}{64} on [0,4][0,4] the mean is 33 and the median is 3.173.17. The median is above the mean: negative skew, a longer tail on the left.

0.20.40.60.811.21.41.61.820.20.40.60.811.2xyQ1 = 1median = √2Q3 = √3F(y)
F(y)=y24F(y)=\frac{y^2}{4}: the quartiles and median read off at 14\frac14, 12\frac12 and 34\frac34.

F(y)=y24F(y)=\dfrac{y^2}{4} on [0,2][0,2]. What is Q1Q_1?

Try an exam question

The continuous random variable XX has pdf f(x)=3x28f(x)=\dfrac{3x^2}{8} for 0≤x≤20\le x\le2, and 00 otherwise. Find the median of XX.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find E(X)E(X).

1 mark, marked against the mark scheme

Revision notes