Astronomy Olympiad / Level 2 · INAO / Data Analysis

Data Analysis · lesson 1 of 3 · 50 min

Graphs by hand: scales, linearising and straight-line fits

After this lesson you can:
  • Choose axes and scales that use most of the graph paper.
  • Turn a power law or an exponential into a straight line with logarithms.
  • Draw a best-fit line by eye and read its slope and intercept, with units.
  • Estimate how uncertain the slope is from the steepest and shallowest reasonable lines.

Before this lesson: Logarithms for magnitudes

1. Concept

INAO answer booklets often come with graph paper. Students are asked to plot a table, find a law and read a number off the line. This is a skill that multiple-choice papers never train, and in IOAA it becomes a quarter of the marks (the data-analysis round).

A good graph

Reading the line

The slope is rise over run, read from two points on the line far apart (not from data points, which have scatter), in the axis units: m=Δy/Δxm = \Delta y/\Delta x. The intercept is where the line meets x=0x = 0; it often has a meaning of its own, such as an offset in an instrument.

Making curves straight

Our eyes judge straight lines well and curves badly, so we change the axes until the law becomes a line.

Law Plot Straight line
power law y=kxny = kx^{n} log⁡y\log y against log⁡x\log x slope nn, intercept log⁡k\log k
exponential y=Ae−x/λy = Ae^{-x/\lambda} ln⁡y\ln y against xx slope −1/λ-1/\lambda, intercept ln⁡A\ln A
magnitudes m=−2.5log⁡10I+constm = -2.5\log_{10} I + \text{const} mm against log⁡10I\log_{10} I slope −2.5-2.5

Traps. Joining the dots. Reading the slope in grid squares instead of axis units. Taking the slope from two data points instead of the line. Forgetting that a log has no unit: write log⁡10(a/au)\log_{10}(a/\text{au}), with the unit inside.

How uncertain is the slope?

Draw the steepest and the shallowest lines that still pass reasonably through the points (through most error bars). Half the difference of their slopes is a fair uncertainty for the slope.

Going deeper (Olympiad): least squares

The line that makes the sum of squared vertical distances smallest has

m=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2,c=yˉ−mxˉ,m = \frac{\sum (x_i - \bar x)(y_i - \bar y)}{\sum (x_i - \bar x)^{2}}, \qquad c = \bar y - m\bar x ,

where xˉ,yˉ\bar x, \bar y are the means. It always passes through the point (xˉ,yˉ)(\bar x, \bar y). A single wild point (an “outlier”) can pull it a lot, so look at the graph before trusting the formula.

2. Explore it

A log–log plot of orbital period against orbital radius for six planets from Mercury to Saturn; the six points lie on a straight line of slope 1.5 through the origin
Figure 1. Six planets on log–log axes. Kepler's third law, T ∝ a^1.5, becomes a straight line of slope 1.5.
Planet aa (au) TT (yr) log⁡10a\log_{10} a log⁡10T\log_{10} T
Mercury 0.387 0.241 −0.412 −0.618
Venus 0.723 0.615 −0.141 −0.211
Earth 1.000 1.000 0.000 0.000
Mars 1.524 1.881 0.183 0.274
Jupiter 5.203 11.86 0.716 1.074
Saturn 9.537 29.46 0.979 1.469

On ordinary axes, TT against aa curves upward and the inner planets crowd into one corner. On log–log axes they spread out and lie on a line. Plot them on graph paper (scale: 0.2 per 2 cm on both axes) and draw the line yourself.

3. Worked example

Find Kepler’s law from the table.

Take two points far apart on your line. The line through the data passes close to (−0.40,−0.60)(-0.40, -0.60) and (1.00,1.50)(1.00, 1.50), so

n=1.50−(−0.60)1.00−(−0.40)=2.101.40=1.50.n = \frac{1.50 - (-0.60)}{1.00 - (-0.40)} = \frac{2.10}{1.40} = 1.50 .

The intercept at log⁡a=0\log a = 0 is log⁡T=0\log T = 0, so k=1k = 1 yr when aa is in au: T=a1.5T = a^{1.5}, which is Kepler’s third law. Least squares on the six points gives the same slope, 1.5001.500, and an intercept of 0.0000.000. The steepest and shallowest lines you can draw through these points differ by less than 0.01 in slope: the data are very good.

4. From a past paper

INAO 2016, Question 9 (official paper with solutions: HBCSE). A light meter at a telescope’s focus gives a current that depends on the light falling on it. Calibration data:

Intensity (10−810^{-8} W m⁻²) 5 9 17 21 33 37 45 49
Current (nA) 25 41 73 89 137 153 185 201

Draw the calibration graph, then a graph that turns magnitudes into currents, and predict the current for Venus (m=−4.43m = -4.43) and Sirius (m=−1.46m = -1.46). Vega (m=0m = 0) delivers 2.18×10−82.18 \times 10^{-8} W m⁻².

Our solution.

Calibration. Current against intensity is a straight line. From the points (5,25)(5, 25) and (49,201)(49, 201):

slope=201−2549−5=4.0 nA per 10−8 W m−2,intercept=25−4.0×5=5.0 nA.\text{slope} = \frac{201 - 25}{49 - 5} = 4.0\ \text{nA per } 10^{-8}\ \text{W m}^{-2}, \qquad \text{intercept} = 25 - 4.0 \times 5 = 5.0\ \text{nA}.

So i=4.0 I+5.0i = 4.0\,I + 5.0. The intercept is the dark current: what the meter reads with no light at all. Every point lies exactly on this line.

Magnitudes. A magnitude difference is a log of an intensity ratio: m=−2.5log⁡10(I/IVega)m = -2.5\log_{10}(I/I_{\text{Vega}}). A graph of mm against log⁡10(I/IVega)\log_{10}(I/I_{\text{Vega}}) is a straight line of slope −2.5-2.5 through the origin. Read backwards, a magnitude gives the ratio I/IVega=10−m/2.5I/I_{\text{Vega}} = 10^{-m/2.5}:

Sirius:IIVega=101.46/2.5=3.84,I=8.36,i=4.0×8.36+5.0=38.5 nA;Venus:IIVega=104.43/2.5=59.2,I=129,i=4.0×129+5.0=521 nA.\begin{aligned} \text{Sirius:}\quad \frac{I}{I_{\text{Vega}}} &= 10^{1.46/2.5} = 3.84, &\quad I &= 8.36, &\quad i &= 4.0 \times 8.36 + 5.0 = 38.5\ \text{nA}; \\ \text{Venus:}\quad \frac{I}{I_{\text{Vega}}} &= 10^{4.43/2.5} = 59.2, &\quad I &= 129, &\quad i &= 4.0 \times 129 + 5.0 = 521\ \text{nA}. \end{aligned}

(Intensities in 10−810^{-8} W m⁻².) Vega itself gives 4.0×2.18+5.0=13.74.0 \times 2.18 + 5.0 = 13.7 nA. Both answers agree with the official solution. Notice that Venus’s current lies far beyond the calibrated range (up to 201 nA): the answer assumes the meter stays linear, an assumption worth stating.

5. Quick check

Q1. You suspect y=kxny = kx^{n}. What should you plot to get a straight line?

Q2. On a log–log graph, a best-fit line passes through (0.2,0.9)(0.2, 0.9) and (1.2,2.9)(1.2, 2.9). What is the power nn in y=kxny = kx^{n}?

Q3. A detector's calibration line, current against light intensity, does not pass through the origin but cuts the current axis at 5 nA. What does that 5 nA mean?

Q4. With the calibration i=4.0 I+5.0i = 4.0\,I + 5.0 (current in nA, II in units where Vega gives I=2.18I = 2.18), what current does a star of magnitude +1.00+1.00 give?

6. Next