Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Maths Advanced (2027) Random variables

Expected Value & Variance (Continuous)

20 practice questions 0 video lessons Theory + worked examples
NSW · Year 12 Mathematics Advanced · Random variables

Expected value and variance for continuous variables use integration: \(E(X)=\displaystyle\int x\,f(x)\,dx\), with variance from \(E(X^{2})-\big(E(X)\big)^{2}\).

Part of the NSW Year 12 Mathematics Advanced course, in the Statistical analysis area of study (Random variables focus area) of the 2024 syllabus. Work through practice questions with fully worked solutions and video lessons, or scroll down for the theory summary and worked examples.

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

Theory

For a continuous variable, expected value and variance use integrals. This Year 12 Mathematics Advanced topic (MAV-12-07) computes \(E(X)\) and \(\mathrm{Var}(X)\) by integration.

\(E(X)=\mu=\int_a^b x\,f(x)\,dx\) and \(\mathrm{Var}(X)=\int_a^b x^{2}f(x)\,dx-\mu^{2}\). A continuous uniform on \([a,b]\) has mean the midpoint \(\dfrac{a+b}{2}\).

A density curveThe density f = 3x squared on 0 to 1, whose mean and variance are found by integration. xy f=3x^2
\(E(X)\) and \(\mathrm{Var}(X)\) come from integrating against \(f(x)\).
\[E(X)=\int_a^b x f(x)\,dx,\qquad \mathrm{Var}(X)=\int_a^b x^{2}f(x)\,dx-\mu^{2}\]
continuous expected value integral of x f; variance integral of x squared f minus mu squared

Method

  1. Integrate \(x f(x)\) for \(E(X)\).
  2. Integrate \(x^{2}f(x)\) for \(E(X^{2})\).
  3. Subtract \(\mu^{2}\) for the variance.
Example 1 — Uniform mean
Find \(E(X)\) for a uniform variable on \([0,4]\).
Solution
\(E(X)\)\(=\)\(\dfrac{0+4}{2}=2\)
Example 2 — Mean by integration
\(f(x)=3x^{2}\) on \([0,1]\). Find \(E(X)\).
Solution
\(\int_0^1 3x^{3}\,dx\)\(=\)\(0.75\)
Example 3 — E(X^2)
For the same \(f\), find \(E(X^{2})\).
Solution
\(\int_0^1 3x^{4}\,dx\)\(=\)\(0.6\)
Example 4 — Variance
Using \(\mu=0.75,\ E(X^{2})=0.6\), find \(\mathrm{Var}(X)\).
Solution
\(\mathrm{Var}(X)\)\(=\)\(0.6-0.5625=0.0375\)

Common pitfalls

Multiply by \(f(x)\) inside the integral.
\(E(X^{2})\) integrates \(x^{2}f(x)\).
Integrate over the whole domain.

Frequently asked questions

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

Integrate x times the density f of x over the domain.

How do you find the variance?

Integrate x squared times f of x, then subtract the mean squared.

What is the mean of a continuous uniform distribution?

The midpoint of the interval, (a plus b) over 2.

Do you multiply by the density inside the integral?

Yes, the integrand is x times f of x for the mean and x squared times f of x for E of X squared.