Foundation lesson

Mean, variance and RMS

The mean says where the centre is. The variance says how widely the values spread around it. The RMS says how far, typically, the values lie from zero.

Written for this edition, not translated from Einstein.

If particles wander both ways, which average shows how far they got?

Four particles move −3, −1, +1 and +3 micrometres. Their average position has not changed, yet they have spread out. Three averages answer three different questions.

⟨x⟩=1M ∑i=1Mxi\left\langle x\right\rangle = \frac{1}{M}\,\sum_{i=1}^{M} x_{i}

Add the M signed displacements and divide by M.

⟨x2⟩=1M ∑i=1Mxi2\left\langle x^{2}\right\rangle = \frac{1}{M}\,\sum_{i=1}^{M} x_{i}^{2}

Square each displacement before adding and dividing by M.

Var⁡(x)=⟨x2⟩−⟨x⟩2\operatorname{Var}\left(x\right) = \left\langle x^{2}\right\rangle - \left\langle x\right\rangle^{2}

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

RMS means root mean square: average the squares, then take the square root. The standard deviation is the square root of the variance, so it measures spread around the mean, where the RMS measures distance from zero. The two are equal only when the mean is zero. The average of the distances, ignoring sign, is a third statistic and gives a different number.

Worked example: Four displacements, four different averages

  1. For −3, −1, +1, +3 the signed sum is 0, so the mean is 0.
  2. The distances, ignoring sign, 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, about 2.236. With a mean of 0, the variance is also 5 and the standard deviation is also about 2.236.
  5. A small random sample need not have a signed mean of exactly zero, even when the model's mean is zero.

One question, three answers

The four displacements the lesson counts, on a ruler through the start. Two went left and two went right, by matching amounts.

-30+3average position 0

Now the three averages on one scale of distance from the start. They are three different numbers because they answer three different questions.

01234mean 0mean distance 2RMS 2.236micrometres from the start

The mean square, 5 square micrometres, is not on that scale and could not be: it is an area. Taking its square root is what brings it back to a distance, and that root, about 2.236, sits a little beyond the average distance of 2.

What it shows, in words

The first drawing puts the four displacements, -3, -1, 1, 3 micrometres, on a ruler through the start. Two are left of zero and two right of it at matching distances, so the average position is 0: the particles have spread out and their average has not moved at all.

The second puts three averages on one scale of distance. The average position is 0. The average of the distances, ignoring sign, is 2. The root mean square is about 2.236, a little farther out, because squaring weighs the two particles that went three micrometres more heavily than the two that went one. The mean square, 5 square micrometres, is not drawn there: it is an area, and putting it beside two lengths would be the mistake the lesson exists to prevent.

What it does not show: these four are one sample, not the model behind it. A small random sample need not have a signed average of exactly zero even when the model's is zero, and nothing in either drawing distinguishes a real cancellation from a lucky one. The root mean square and the standard deviation are the same number here only because this average happens to be zero; where it is not, they part company, and neither drawing shows that.

Where this lesson stops

Say which average you mean. Squaring then averaging, averaging then squaring, and averaging the distances give three different numbers.

Going further: One sample's mean square, and what the microscope adds

In the Brownian problem the model's mean square displacement along one coordinate is 2Dt. A sample's mean square is an estimate of it: average the squares of the displacements actually measured, then divide by 2t to estimate D. If the four displacements above, −3, −1, +1 and +3 μm, were measured after t = 1 s along one coordinate, their mean square of 5 μm² would give D = 5 ÷ 2 = 2.5 μm² per second.

Averaged over many samples, this estimate lands on the true value: it has no bias. One sample scatters, and the scatter shrinks only with the square root of the number q of independent squared displacements. For displacements drawn from the bell curve, the spread of the estimate, as a fraction of the true value, is:

spreadD=2q\frac{\mathrm{spread}}{D}=\sqrt{\frac{2}{q}}

The spread of the estimate, divided by D, equals the square root of two over q.

  1. With q = 4, as above, the spread is about 71 per cent of D, so four particles say little.
  2. With q = 100 it is about 14 per cent.
  3. To halve the spread, measure four times as many independent displacements.

If the particles might also drift, the mean has to be estimated from the same numbers. The average squared deviation from that estimated mean then comes out too small, by the factor (M − 1)/M on average, because the estimated mean sits closer to the sample than the true one does. Dividing the sum by M − 1 instead of M removes that bias.

The microscope adds an error of its own. A measured step is the difference of two position readings, so if each reading is off by an error of spread σ in each coordinate, the step's mean square gains 2σ² per coordinate. For D = 0.5 μm² per second and t = 1 s the true mean square is 2Dt = 1 μm². A reading error of σ = 0.1 μm adds 0.02 μm², 2 per cent; σ = 0.3 μm adds 0.18 μm², 18 per cent. Unless it is subtracted, all of it is read as extra diffusion.

Two neighbouring steps share the reading between them, so their errors are related, with a covariance of −σ². The steps are then not independent, and cutting one path into overlapping windows does not help: the windows reuse the same readings, so they do not add independent squares to q.

If you came here from a passage, Back returns you to the exact place you left.

All foundation lessons · Read as Markdown