Calculate the mean as a probability-weighted average, then find the variance from the second moment. The standard deviation is the positive square root of the variance. These measures describe the centre and spread of a random variable.
This is Mathematics: Analysis and Approaches HL content from AHL 4.14: Properties of discrete and continuous random variables. Discrete variables use probability-weighted sums, whereas continuous variables use integrals of a probability density function. Use these formulas after confirming that the probabilities or total density integrate to one.
| Quantity | Discrete random variable | Continuous random variable |
|---|---|---|
| Mean | ||
| Second moment | ||
| Variance | ||
| Standard deviation |
For a discrete example, suppose with probabilities . First verify that the probabilities total one. Then calculate the moments:
Therefore, and . Variance is measured in squared units, whereas standard deviation returns to the original units and is therefore easier to interpret in context.
For a continuous example, let for , and zero otherwise. It is valid because it is non-negative and its total area is one. Calculate:
Hence, and .
Variance is the expected squared distance from the mean. Expanding this definition and using linearity of expectation gives the shortcut, which is usually faster than calculating each deviation directly.
For a piecewise density, split each expectation integral across the stated intervals and add the results. Never integrate beyond the support where the density is non-zero. If a constant is unknown, first use total probability equal to one to determine it; only then calculate the moments. This order prevents avoidable follow-through errors.
Check that variance is non-negative and standard deviation is not negative. A negative result signals an arithmetic or integration error. The common misconception is that ; their difference is the variance.
In an IB response, show both moments before applying the variance formula. On either paper, write the setup before calculating and retain exact values where possible.
