Mean & variance of a CRV
The mean is the balance point of the curve. You cannot sum (every point has probability 0), so integrate instead. Variance is the same trick with : the S1 formula with replacing .
Integrate x·f and x²·f
E(X) = ∫x·f, Var = ∫x²·f − [E(X)]². E(X²) is a NEW integral, not E(X)²; keep E(X) exact before squaring.
Worked example
Easiest first: mean and variance of one curve
on . Multiply by for the mean, by for .
- .
- .
- .
Worked example
Keep E(X) exact before you square
on . The mean lands on an ugly fraction — do not round it before squaring.
- .
- .
- .
Worked example
Mean of a piecewise pdf, then judge a claim
Taxi arrival pdf: on , on , on . The firm claims “a taxi arrives within 5 minutes on average”. True?
- Multiply each piece by , integrate, add: .
- .
- The claim is about the mean: , so it is true.
Piecewise mean = sum of the per-piece integrals of x·f (then x²·f for the variance) — do each piece on its own limits and add.
Worked example
Turn a probability into an expected count (×N)
A pond-quality index has on . Frogspawn thrive when . Out of 150 ponds, how many are ideal?
- .
- Expected count .
- Round to a whole number of ponds.
“Expected number out of N” = N × P(event). Find the probability by integrating, then multiply and round.
Mean vs median, and skew (drag the widget)
Mean and median coincide only when is symmetric. For the mean sits below the median : the long thin left tail drags the mean toward it. The slider below makes the rule physical — pull the outlier out and the mean chases it while the median barely moves.
mean = 22.0·median = 20·mean > median → positive skew
Examiner note
Common mistake
Your turn— tap to reveal the worked answer (expected count)
Components have acceptable length on . Find the mean.
— multiply by , integrate, evaluate.