Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Methods (Unit 3 & 4) Continuous random variables

Measures of spread

20 practice questions 0 video lessons Theory + worked examples

In Year 12 Mathematical Methods (Queensland, QCAA), the measures of spread of a continuous random variable are the variance \(\operatorname{Var}(X)=\sigma^2=E(X^2)-\mu^2\) and the standard deviation \(\sigma=\sqrt{\operatorname{Var}(X)}\), together with the quartiles and interquartile range read from the area under the probability density function, and the range of the support. Each is computed as an integral of the pdf; the standard deviation and IQR measure how far the values spread from the centre.

The variance of a continuous random variable \(X\) with probability density function \(f(x)\) is the mean squared distance from the mean \(\mu\): \(\operatorname{Var}(X)=\int (x-\mu)^2 f(x)\,dx\). Expanding gives the quicker working form \(\operatorname{Var}(X)=E(X^2)-\mu^2\), where \(E(X^2)=\int x^2 f(x)\,dx\). The standard deviation \(\sigma=\sqrt{\operatorname{Var}(X)}\) puts the spread back into the original units of \(X\).

The quartiles split the total area of \(1\) under \(f\) into quarters. The lower quartile \(Q_1\) has lower-tail area \(\tfrac14\) (\(\int_a^{Q_1} f=\tfrac14\)); the upper quartile \(Q_3\) has lower-tail area \(\tfrac34\). The interquartile range \(\text{IQR}=Q_3-Q_1\) is the width of the middle \(50\%\). The range of the support is the width \(b-a\) of the interval on which \(f>0\).

A large standard deviation or IQR means the values are spread widely; a small one means they cluster near the centre. The mean \(\mu\) (a measure of location) is assumed known here — the focus is on how far the values spread from it.

Key idea. Spread is measured from the mean: \(\operatorname{Var}(X)=E(X^2)-\mu^2\), \(\sigma=\sqrt{\operatorname{Var}(X)}\). Quartiles and the IQR come from the area under \(f\), not its height.
pdf with the mean plus or minus one standard deviation shadedA rising probability density curve with a dashed vertical line at the mean mu and a shaded band from mu minus sigma to mu plus sigma. x f μ μ±σ
Standard deviation: the shaded band is \(\mu\pm\sigma\), the typical distance of \(X\) from the mean
pdf with the interquartile range shadedA ramp density with dashed vertical lines at the lower quartile Q1 and upper quartile Q3, and the middle region between them shaded as the interquartile range. x f Q1 Q3 IQR
Interquartile range: \(Q_1\) and \(Q_3\) cut off area \(\tfrac14\) and \(\tfrac34\); \(\text{IQR}=Q_3-Q_1\)

Variance (definition and quick working form):

\[\operatorname{Var}(X)=\sigma^2=\int_{-\infty}^{\infty}(x-\mu)^2 f(x)\,dx=\int_{-\infty}^{\infty}x^2 f(x)\,dx-\mu^2\]
Var(X)=E(X2)-μ2

Standard deviation (square root of the variance):

\[\sigma=\sqrt{\operatorname{Var}(X)}\]
σ=Var(X)

Quartiles (lower-tail area) and the interquartile range:

\[\int_{a}^{Q_1} f(x)\,dx=\tfrac14,\qquad \int_{a}^{Q_3} f(x)\,dx=\tfrac34,\qquad \text{IQR}=Q_3-Q_1\]
IQR=Q3-Q1
Uniform & scaling. For a continuous uniform distribution on \([a,b]\): \(\operatorname{Var}(X)=\dfrac{(b-a)^2}{12}\), and the range of the support is \(b-a\). Under a linear change, \(\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)\) and \(\sigma(aX+b)=|a|\,\sigma(X)\) — a shift \(b\) leaves the spread unchanged.

How to find the spread of a continuous random variable

  1. Have the mean ready. Find \(\mu=E(X)=\int x f(x)\,dx\) (or use the value given). The spread is measured from \(\mu\).
  2. Compute \(E(X^2)\). Integrate \(\int x^2 f(x)\,dx\) over the support — the second moment, so multiply by \(x^2\), not \(x\).
  3. Subtract and square-root. \(\operatorname{Var}(X)=E(X^2)-\mu^2\); then \(\sigma=\sqrt{\operatorname{Var}(X)}\) for the standard deviation.
  4. Quartiles from area. Solve \(\int_a^{Q} f=\tfrac14\) for \(Q_1\) and \(\int_a^{Q} f=\tfrac34\) for \(Q_3\); then \(\text{IQR}=Q_3-Q_1\).
Uniform shortcut. If \(f\) is constant on \([a,b]\) the distribution is continuous uniform, so \(\operatorname{Var}(X)=\dfrac{(b-a)^2}{12}\) directly — no integration needed — and each quartile is found by equal areas.
Example 1 — Variance and standard deviation
\(f(x)=\dfrac{x}{2}\) on \([0,2]\) has mean \(\mu=\dfrac43\). Find \(\operatorname{Var}(X)\) and \(\sigma\).
Solution

Find \(E(X^2)\), subtract \(\mu^2\), then square-root.

\(E(X^2)\)\(=\)\(\displaystyle\int_0^2 x^2\cdot\dfrac{x}{2}\,dx=2\)
\(\operatorname{Var}(X)\)\(=\)\(2-\left(\dfrac43\right)^2=\dfrac29\)
\(\sigma\)\(=\)\(\sqrt{\tfrac29}=\dfrac{\sqrt2}{3}\approx0.47\)
Var=29
Example 2 — Uniform variance
\(X\) is uniform on \([0,4]\), \(f(x)=\dfrac14\). Find \(\operatorname{Var}(X)\) and \(\sigma\).
Solution

Use the uniform formula \(\dfrac{(b-a)^2}{12}\).

\(\operatorname{Var}(X)\)\(=\)\(\dfrac{(4-0)^2}{12}=\dfrac{16}{12}=\dfrac43\)
\(\sigma\)\(=\)\(\sqrt{\tfrac43}\approx1.15\)

Range of the support \(=4-0=4\).

Var=43
Example 3 — Quartiles and IQR
\(f(x)=\dfrac{x}{8}\) on \([0,4]\). Find \(Q_1\), \(Q_3\) and the interquartile range.
Solution

Set the lower-tail area \(\dfrac{Q^2}{16}\) to \(\tfrac14\) and \(\tfrac34\).

\(\dfrac{Q_1^2}{16}=\tfrac14\)\(\Rightarrow\)\(Q_1=2\)
\(\dfrac{Q_3^2}{16}=\tfrac34\)\(\Rightarrow\)\(Q_3=2\sqrt3\)
\(\text{IQR}\)\(=\)\(2\sqrt3-2\approx1.46\)
Quartiles of f(x)=x/8 on [0,4]Ramp density with dashed lines at Q1=2 and Q3=2 root 3 and the interquartile region shaded. x f Q1 Q3
IQR=23-2
Example 4 — Scaling the spread
\(\operatorname{Var}(X)=4\). Find \(\operatorname{Var}(3X-1)\), \(\sigma(3X-1)\) and \(\operatorname{Var}(X+5)\).
Solution

Use \(\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)\); a shift changes nothing.

\(\operatorname{Var}(3X-1)\)\(=\)\(3^2\times4=36\)
\(\sigma(3X-1)\)\(=\)\(\sqrt{36}=6\)
\(\operatorname{Var}(X+5)\)\(=\)\(4\)
Var(3X-1)=36

Common pitfalls

Do not forget to subtract \(\mu^2\). \(\operatorname{Var}(X)=E(X^2)-\mu^2\). Stopping at \(E(X^2)=\int x^2 f\,dx\) gives a value that is too large; the mean must be squared and subtracted.
Standard deviation is the square root. \(\sigma=\sqrt{\operatorname{Var}(X)}\). Leaving the variance as the answer when the standard deviation is asked (or vice versa) is the most common slip.
A quartile is an area, not a height. \(Q_1\) satisfies \(\int_a^{Q_1} f=\tfrac14\) — the accumulated area is a quarter. Setting \(f(x)=\tfrac14\) finds the wrong point entirely.

Frequently asked questions

How do you find the variance of a continuous random variable?

Compute \(E(X^2)=\int x^2 f(x)\,dx\), then \(\operatorname{Var}(X)=E(X^2)-\mu^2\) (equivalently \(\int(x-\mu)^2 f\,dx\)).

How is the standard deviation related to the variance?

It is the square root: \(\sigma=\sqrt{\operatorname{Var}(X)}\). Always take the root at the very end.

How do you find the quartiles and interquartile range?

\(Q_1\) has lower-tail area \(\tfrac14\) and \(Q_3\) has area \(\tfrac34\); solve \(\int_a^{Q} f=\tfrac14\) and \(\tfrac34\). Then \(\text{IQR}=Q_3-Q_1\).

What is the variance of a continuous uniform distribution?

On \([a,b]\), \(\operatorname{Var}(X)=\dfrac{(b-a)^2}{12}\), and \(\sigma\) is its square root. The range of the support is \(b-a\).

How does a linear change affect the variance?

\(\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X)\) and \(\sigma(aX+b)=|a|\,\sigma(X)\). A shift \(b\) does not change the spread.

Why subtract \(\mu^2\) when finding the variance?

Expanding \(\int(x-\mu)^2 f\,dx\) gives \(E(X^2)-\mu^2\), which is faster. Forgetting the \(-\mu^2\) leaves \(E(X^2)\), which overstates the spread.

Create a free accountTrack your progress and save your work as you go.
Create free account