Expected Value & Variance (Continuous)
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.
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}\).
Method
- Integrate \(x f(x)\) for \(E(X)\).
- Integrate \(x^{2}f(x)\) for \(E(X^{2})\).
- Subtract \(\mu^{2}\) for the variance.
| \(E(X)\) | \(=\) | \(\dfrac{0+4}{2}=2\) |
| \(\int_0^1 3x^{3}\,dx\) | \(=\) | \(0.75\) |
| \(\int_0^1 3x^{4}\,dx\) | \(=\) | \(0.6\) |
| \(\mathrm{Var}(X)\) | \(=\) | \(0.6-0.5625=0.0375\) |
Common pitfalls
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.