Data Analysis

Chapter 4 of 11 · 10 min read

Statistics of repeated measurements

Means, standard deviations, standard errors, weighted means, outliers, and how to decide whether two results really differ.

Mean, spread and the error of the mean

For NN measurements xix_i:

xˉ=1N∑xi,s=∑(xi−xˉ)2N−1,σxˉ=sN.\bar x = \frac{1}{N}\sum x_i, \qquad s = \sqrt{\frac{\sum(x_i-\bar x)^2}{N-1}}, \qquad \sigma_{\bar x} = \frac{s}{\sqrt N}.

ss describes the scatter of single measurements, while σxˉ\sigma_{\bar x} is the uncertainty of the mean. Use N−1N-1 (the sample standard deviation), as the IOAA papers do: one degree of freedom is used up by computing xˉ\bar x.

In 2017 D1, five LMC Cepheids give distances with dˉV=46.2\bar d_V = 46.2 kpc and sV=4.1s_V = 4.1 kpc, so the mean is good to 4.1/5=1.84.1/\sqrt5 = 1.8 kpc.

Weighted mean

When measurements have different uncertainties σi\sigma_i, weight each by wi=1/σi2w_i = 1/\sigma_i^2:

xˉw=∑wixi∑wi,σxˉw=1∑wi.\bar x_w = \frac{\sum w_ix_i}{\sum w_i}, \qquad \sigma_{\bar x_w} = \frac{1}{\sqrt{\sum w_i}}.

A measurement twice as precise counts four times as much. If one point has a tiny error bar, it will dominate. Check that it deserves to.

Scatter about a model

After a fit, the residuals Δi=yi−ymodel(xi)\Delta_i = y_i - y_{\rm model}(x_i) measure how well the model works. The 2018 IRX–β problem defines

σ=∑Δi2N−1\sigma = \sqrt{\frac{\sum\Delta_i^2}{N-1}}

and finds 0.28 dex. Since IRX is a logarithm, 0.28 dex means a typical factor of 100.28=1.910^{0.28} = 1.9 in flux ratio.

That scatter then sets the bar for any new object. CR7's IRX limit sits only 0.18 dex below the relation, less than one σ\sigma, so it is not a significant deviation.

Are two results different?

Two values a±σaa\pm\sigma_a and b±σbb\pm\sigma_b differ significantly if

z=∣a−b∣σa2+σb2z = \frac{|a-b|}{\sqrt{\sigma_a^2+\sigma_b^2}}

is large. A useful rule: z<1z<1 means consistent, z>2z>2 is suspicious, and z>3z>3 is a real difference.

In 2017 D1.3, dV=46.2±4.1d_V = 46.2\pm4.1 kpc and dW=48.1±0.9d_W = 48.1\pm0.9 kpc give z=0.45z = 0.45: not different. Their standard deviations, 4.1 and 0.9 kpc, clearly are different, so the Wesenheit band is the better distance indicator.

Outliers

Do not delete points just because they spoil a fit. Reject a point only with a reason: it lies more than about 3σ3\sigma from the trend, there is a physical cause (a blend, a flare, a different population), or the problem flags it (open symbols in a figure, for example). Always say which points you excluded and why, and check whether the answer changes.

Key formulas

Sample standard deviation
s=1N−1∑i=1N(xi−xˉ)2s = \sqrt{\frac{1}{N-1}\sum_{i=1}^N (x_i-\bar x)^2}
Standard error of the mean
σxˉ=sN\sigma_{\bar x} = \frac{s}{\sqrt N}
Weighted mean
xˉw=∑xi/σi2∑1/σi2,σxˉw=(∑1/σi2)−1/2\bar x_w = \frac{\sum x_i/\sigma_i^2}{\sum 1/\sigma_i^2}, \qquad \sigma_{\bar x_w} = \Big(\sum 1/\sigma_i^2\Big)^{-1/2}
Significance of a difference
z=∣a−b∣σa2+σb2z = \frac{|a-b|}{\sqrt{\sigma_a^2+\sigma_b^2}}

Common mistakes

  • Quoting the standard deviation s when the question asks for the uncertainty of the mean.
  • Dividing by N instead of N − 1 for a small sample.
  • Dropping inconvenient points without saying so.
  • Calling a 1σ difference a discovery.

Practise this chapter

Past IOAA problems that use these skills.

Saved in this browser only.