Data Analysis

Chapter 3 of 11 · 14 min read

Uncertainties and error propagation

Random and systematic errors, propagating uncertainties through formulas, and the special rules for magnitudes and logarithms.

Random and systematic

A random (statistical) error scatters repeated measurements around the true value, and averaging NN of them shrinks it by N\sqrt N. A systematic error shifts every measurement the same way, and averaging does nothing to it.

The 2023 LMC problem shows the difference clearly. Six distances scatter by s=0.24s = 0.24 kpc, giving a statistical error of 0.24/6=0.090.24/\sqrt6 = 0.09 kpc. But every distance depends on the same surface-brightness calibration, whose 0.8% bias adds a systematic error of 0.40 kpc that no amount of averaging removes. Quote both: 49.45±0.09stat±0.40sys49.45\pm0.09_{\rm stat}\pm0.40_{\rm sys} kpc.

Write uncertainties as absolute (Δx\Delta x, with units) or relative (Δx/x\Delta x/x, dimensionless). Sums and differences combine absolute errors; products and powers combine relative errors.

Propagation rules

For independent errors, combine in quadrature:

  • Sum or difference, q=x±yq = x\pm y: Δq=Δx2+Δy2\Delta q = \sqrt{\Delta x^2 + \Delta y^2}.
  • Product or quotient, q=xyq = xy or x/yx/y: Δq∣q∣=(Δxx)2+(Δyy)2\dfrac{\Delta q}{|q|} = \sqrt{\left(\dfrac{\Delta x}{x}\right)^2 + \left(\dfrac{\Delta y}{y}\right)^2}.
  • Power, q=xnq = x^n: Δq∣q∣=∣n∣ Δx∣x∣\dfrac{\Delta q}{|q|} = |n|\,\dfrac{\Delta x}{|x|}.
  • Any function: Δq=∑i(∂q∂xiΔxi)2\Delta q = \sqrt{\sum_i\left(\dfrac{\partial q}{\partial x_i}\Delta x_i\right)^2}.

The linear sum Δq=∑∣∂q/∂xi∣ Δxi\Delta q = \sum|\partial q/\partial x_i|\,\Delta x_i gives a worst-case bound. It is larger (roughly 1.4 to 1.7 times for two or three comparable terms) and is acceptable when a question asks for "error margins", but say which one you used.

Worked example (2016 D1). PB=PtP02πcatP_B = \dfrac{P_t}{P_0}\dfrac{2\pi c}{a_t}, with relative errors 0.02/0.67=3.0%0.02/0.67 = 3.0\%, 0.02/7588=0.0003%0.02/7588 = 0.0003\% and 0.06/1.71=3.5%0.06/1.71 = 3.5\%. In quadrature, 4.6%4.6\%, so PB=1.126±0.052P_B = 1.126\pm0.052 d. The radius r∝Pt2/atr\propto P_t^2/a_t doubles the first term: (2×3.0)2+3.52=6.9%\sqrt{(2\times3.0)^2 + 3.5^2} = 6.9\%.

Notice how the largest term dominates. Squaring makes small contributions negligible, so find the biggest relative error first and you already know the answer to within a few percent.

Logarithms and magnitudes

Astronomy is full of logarithms, and their error rules are worth memorising:

Δ(ln⁡x)=Δxx,Δ(log⁡10x)=Δxxln⁡10=0.434 Δxx.\Delta(\ln x) = \frac{\Delta x}{x}, \qquad \Delta(\log_{10}x) = \frac{\Delta x}{x\ln10} = 0.434\,\frac{\Delta x}{x}.

Since m=−2.5log⁡10F+Cm = -2.5\log_{10}F + C,

Δm=1.086 ΔFF,\Delta m = 1.086\,\frac{\Delta F}{F},

so 0.01 mag is about a 1% flux error. Going the other way, the distance modulus μ=5log⁡10d−5\mu = 5\log_{10}d - 5 gives

Δdd=ln⁡105Δμ=0.461 Δμ.\frac{\Delta d}{d} = \frac{\ln10}{5}\Delta\mu = 0.461\,\Delta\mu.

An error of 0.1 mag in a distance modulus is a 4.6% distance error.

Parallax. d=1/πd = 1/\pi, so Δd/d=Δπ/π\Delta d/d = \Delta\pi/\pi and ΔM=5ln⁡10Δππ\Delta M = \dfrac{5}{\ln10}\dfrac{\Delta\pi}{\pi}. In 2017 D1, RT Aur's π=2.40±0.19\pi = 2.40\pm0.19 mas gives ΔM=2.17×0.079=0.17\Delta M = 2.17\times0.079 = 0.17 mag, the same in every band because it comes from the distance alone.

Ill-conditioned results

Some formulas amplify errors enormously. Look out for differences of nearly equal numbers and for sines and tangents of tiny angles.

In the 2016 Moon problem the Sun's distance is dMoonsin⁡ϕM/sin⁡ϕSd_{\rm Moon}\sin\phi_M/\sin\phi_S with ϕS=0.09∘\phi_S = 0.09^\circ. An error of only 0.05∘0.05^\circ in the elongation changes ϕS\phi_S by more than 50%, and dSund_{\rm Sun} with it. This is why Aristarchus' method failed in antiquity.

If a result depends on such a difference, say so, and estimate the uncertainty honestly instead of quoting the spuriously precise number your calculator shows.

Key formulas

General propagation
Δq=∑i(∂q∂xi Δxi)2\Delta q = \sqrt{\sum_i \left(\frac{\partial q}{\partial x_i}\,\Delta x_i\right)^2}
Products and powers
q=xayb  ⇒  Δqq=(aΔxx)2+(bΔyy)2q = x^a y^b \;\Rightarrow\; \frac{\Delta q}{q} = \sqrt{\left(a\frac{\Delta x}{x}\right)^2 + \left(b\frac{\Delta y}{y}\right)^2}
Magnitudes
Δm=2.5ln⁡10ΔFF=1.086 ΔFF\Delta m = \frac{2.5}{\ln 10}\frac{\Delta F}{F} = 1.086\,\frac{\Delta F}{F}
Distance modulus
Δdd=ln⁡105 Δμ=0.461 Δμ\frac{\Delta d}{d} = \frac{\ln 10}{5}\,\Delta\mu = 0.461\,\Delta\mu

Common mistakes

  • Adding relative errors for a sum, or absolute errors for a product.
  • Counting the same error twice (for example using both d and 1/π as if independent).
  • Averaging away a systematic error.
  • Quoting a 0.09° angle difference to four significant figures.

Practise this chapter

Past IOAA problems that use these skills.

Saved in this browser only.