# Mean, variance and RMS

Authored explanation; editorial review pending.

$$
\langle x\rangle=\frac{1}{M}\sum_{i=1}^{M}x_i
$$

Add the M signed displacements and divide by M.

$$
\langle x^2\rangle=\frac{1}{M}\sum_{i=1}^{M}x_i^2
$$

Square each displacement before adding and dividing by M.

$$
\operatorname{Var}(x)=\langle x^2\rangle-\langle x\rangle^2
$$

Variance is the mean square minus the square of the mean.

RMS means root mean square: take the square root after averaging the squares. RMS and standard deviation coincide only when the mean is zero. The average absolute displacement is yet another statistic.

## Worked example

1. For −3, −1, +1, +3, the signed sum is 0, so the mean is 0.
2. The absolute values are 3, 1, 1, 3; their mean is 2.
3. The squares are 9, 1, 1, 9; their mean is 5.
4. The RMS is the square root of 5, approximately 2.236.
5. A small random sample need not have a signed mean of exactly zero even when the model mean is zero.

Specify whether you square before averaging, average before squaring, or take absolute values.
