Expected Value & Variance (Continuous)
Learn expected value and variance for continuous random variables in NSW Year 12 Mathematics Advanced (NESA outcome MAV-12-07). With a probability density function in place of a table, integrals replace sums when finding the centre and spread of the distribution.
You will learn to find the mean by integrating \(x\) times the density over its domain, find the variance from the integral of \(x^2\) times the density minus the square of the mean, and take the standard deviation — the integral version of the discrete methods.
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.