Data Analysis

Chapter 5 of 11 · 12 min read

Graphing by hand

Scales, labels, error bars, lines and curves of best fit, and reading slopes with honest uncertainties: everything the marking scheme looks for.

Setting up the axes

  • Put the independent variable (time, log⁡P\log P, rr) on the horizontal axis and the measured quantity on the vertical axis.
  • Choose a scale of 1, 2 or 5 units per centimetre (or ×10ⁿ). Avoid 3s and 7s, which make plotting slow and error-prone.
  • Use a false origin when the data do not start near zero. The 2016 pulsar's periods all lie between 7587.8 and 7589.2 μs; starting the axis at 0 would squash them into a line.
  • Make the data fill more than half of the sheet in both directions. This is an explicit mark in every recent scheme.
  • Label each axis with quantity and unit, for example "aa (m s⁻²)" or "log⁡(P/day)\log(P/{\rm day})". Write the graph number the question asks for.
  • Magnitudes: brighter is a smaller number, so plot the magnitude axis inverted, with brighter values upward. The 2018 marking scheme gave a mark for exactly this.

Points and error bars

Plot each point as a small dot with a circle or a cross, sharp enough to read back. Draw an error bar of total length 2σ2\sigma through every point that has an uncertainty; markers often require "at least five" or all of them.

After plotting, check two or three points against the table. One misplotted point costs marks and can also drag your best-fit line.

Lines and curves of best fit

For a straight line:

  • Draw it with a transparent ruler so that roughly as many points lie above as below, spread along the whole range.
  • A least squares line always passes through the centroid (xˉ,yˉ)(\bar x, \bar y). Marking the centroid first and pivoting the ruler around it is a quick way to a good fit.
  • Let the line pass within most error bars. If it cannot, a straight line is the wrong model.

For a curve (light curves, rotation curves), draw a single smooth curve. Never join the dots with straight segments, and do not force the curve through every point when they scatter.

For special shapes, use symmetry. In the 2016 pulsar problem the points lie on an ellipse that must be symmetric about a=0a = 0 and about some P0P_0, which pins down its centre and axes.

Slope, intercept and their uncertainties

Read the slope from a large triangle using two points on the line, far apart, and not from two data points:

m=y2−y1x2−x1.m = \frac{y_2-y_1}{x_2-x_1}.

For the uncertainty, draw the steepest and shallowest lines that still pass through (nearly all) the error bars. Then

m=mmax⁡+mmin⁡2,Δm≈mmax⁡−mmin⁡2,m = \frac{m_{\max}+m_{\min}}{2}, \qquad \Delta m\approx\frac{m_{\max}-m_{\min}}{2},

and similarly for the intercept. This is the method the 2017 solutions use, giving βV′=−2.5±0.1\beta'_V = -2.5\pm0.1 from lines of slope −2.38-2.38 and −2.65-2.65.

If the intercept lies off the paper because of a false origin, compute it from one point on the line: c=y1−mx1c = y_1 - mx_1.

Key formulas

Slope from the line
m=y2−y1x2−x1,c=y1−mx1m = \frac{y_2 - y_1}{x_2 - x_1}, \qquad c = y_1 - m x_1
Max/min slope estimate
Δm≈12 (mmax⁡−mmin⁡)\Delta m \approx \tfrac12\,(m_{\max} - m_{\min})

Common mistakes

  • Scales of 3 or 7 units per division.
  • A tiny graph in one corner of the sheet.
  • Axis labels without units.
  • Joining data points dot-to-dot instead of drawing a smooth curve.
  • Reading the slope from two data points instead of from the drawn line.
  • Magnitude axes the wrong way up.

Practise this chapter

Past IOAA problems that use these skills.

Saved in this browser only.