Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

20. Physics: the acceleration of gravity from a pendulum

School of Engineering, Nazarbayev University

Track: core example  ·  Uses: Chapters 1, 3, 4 and 11

Reading: Taylor, ch. 3 and 8 · Fornasini, Appendix E.2, E.5 and E.6

The simple pendulum is the traditional first experiment in error analysis, and for good reason: with a string, a stopwatch and a ruler one can reach an uncertainty of a few parts in a thousand, at which level two systematic effects become visible. The example shows

  • how to turn raw timings into periods with uncertainties (Type A, pooled);

  • a single-point determination of gg with its uncertainty budget;

  • how a systematic error betrays itself as a trend;

  • how a straight-line fit separates the systematic offset from the quantity of interest;

  • how to treat a correction that is common to all data points.

The data are simulated, with g=9.810g = 9.810 m/s² built in and two realistic imperfections that the analyst is not told about at first. Simulated data have one great advantage for learning: the right answer is known.

The experiment

A small steel ball hangs on a thin string. For five string lengths, the time of 20 complete oscillations is measured five times with a hand-held stopwatch. The string length ℓ\ell is measured with a ruler from the support to the top of the ball, with a standard uncertainty of 1 mm. The pendulum is released from an angle of about 10°.

The next cell is the “apparatus”. Skip it on first reading.

string length (m)   time of 20 oscillations (s), five trials
     0.301           22.35   22.65   22.62   22.64   22.64
     0.450           27.44   27.36   27.38   27.56   27.35
     0.600           31.50   31.45   31.47   31.49   31.55
     0.748           35.13   35.12   35.10   35.17   35.02
     0.900           38.46   38.58   38.37   38.45   38.73

Step 1. Periods and their uncertainties

For each length the period is the mean time divided by 20. Timing many oscillations is itself an application of error analysis: the reaction-time error of about 0.1 s is incurred once per timing, whether one oscillation is timed or twenty, so the uncertainty of the period is reduced twentyfold.

The scatter of five timings gives a poor estimate of the standard deviation (uncertain by 35 %, Section 4.3). But the same person used the same stopwatch throughout, so there is one underlying timing scatter, and all 25 timings can be used to estimate it. The pooled variance is the average of the five sample variances and has 5×4=205\times4 = 20 degrees of freedom.

standard deviation at each length (s): [0.129 0.087 0.038 0.055 0.14 ]
pooled standard deviation            : 0.098 s

standard uncertainty of each period  : 2.20 ms
  l = 0.301 m   T = 1.1290 s
  l = 0.450 m   T = 1.3709 s
  l = 0.600 m   T = 1.5746 s
  l = 0.748 m   T = 1.7554 s
  l = 0.900 m   T = 1.9259 s

Step 2. A single-length determination

For small oscillations of a point mass on a massless string,

T=2πℓg⟹g=4π2ℓT2.T = 2\pi\sqrt{\frac{\ell}{g}} \qquad\Longrightarrow\qquad g = \frac{4\pi^2\ell}{T^2} .

This is a product of powers, so (ug/g)2=(uℓ/ℓ)2+4 (uT/T)2(u_g/g)^2 = (u_\ell/\ell)^2 + 4\,(u_T/T)^2. Take the middle length first.

input             value           u    rel. u        |c| u    share
-------------------------------------------------------------------
l (m)               0.6       0.001     0.17%       0.0159    26.3%
T (s)            1.5746      0.0022     0.14%       0.0267    73.7%
-------------------------------------------------------------------
output           9.5537       0.031     0.33%

g = 9.554 ± 0.031 m/s^2
discrepancy with the accepted local value 9.810: z = 8.3

The result has a pleasingly small uncertainty of about 0.3 %, and it disagrees with the accepted value by many standard uncertainties. By the criterion of Section 1.6 this is not a fluctuation. Either the accepted value is wrong, or the uncertainty budget is incomplete. Repeating the calculation for all five lengths gives a strong hint.

  l = 0.301 m   g = 9.323 ± 0.048 m/s^2   z = 10.2
  l = 0.450 m   g = 9.453 ± 0.037 m/s^2   z =  9.7
  l = 0.600 m   g = 9.554 ± 0.031 m/s^2   z =  8.3
  l = 0.748 m   g = 9.583 ± 0.027 m/s^2   z =  8.3
  l = 0.900 m   g = 9.579 ± 0.024 m/s^2   z =  9.5

weighted mean: 9.536 ± 0.014 m/s^2,  reduced chi-square = 7.9

All five values are low, and they are not scattered at random: gg rises with the length (panel (b) of the figure below). The reduced chi-square of the five values about their mean is far above one, so the values are inconsistent with each other, not only with the accepted value. Averaging them would be meaningless (Section 4.6).

A result that depends systematically on a quantity it should not depend on is the classic signature of a systematic error. Here the suspect is the length. The formula needs the distance from the support to the centre of mass, while the ruler was read at the top of the ball. If the true length is ℓ+δ\ell + \delta, the single-point formula underestimates gg by the fraction δ/ℓ\delta/\ell, which is larger for the shorter strings, just as observed.

Step 3. A fit that separates the offset from gg

With an unknown offset δ\delta in the length,

T2=4π2g (ℓ+δ)=4π2g⏟slope b ℓ+4π2δg⏟intercept a.T^2 = \frac{4\pi^2}{g}\,(\ell + \delta) = \underbrace{\frac{4\pi^2}{g}}_{\text{slope } b}\,\ell + \underbrace{\frac{4\pi^2\delta}{g}}_{\text{intercept } a} .

A plot of T2T^2 against ℓ\ell is a straight line whose slope gives gg whatever the offset is; the offset only shifts the line and appears in the intercept. This is the real strength of fitting: a constant systematic error in xx or yy is absorbed by a parameter and cannot contaminate the slope.

Error bars. The uncertainty of T2T^2 is 2T uT2T\,u_T. The lengths are not exact either: an error uℓu_\ell in ℓ\ell is equivalent to an error b uℓb\,u_\ell in T2T^2. We combine both into an effective uncertainty (Section 13.6),

σi2=(2TiuT)2+(b uℓ)2,\sigma_i^2 = (2T_i u_T)^2 + (b\,u_\ell)^2 ,

with b≈4π2/9.8≈4.0b \approx 4\pi^2/9.8 \approx 4.0 s²/m as a preliminary slope.

contributions to the error bar of T^2 (s^2):
  from timing: [0.005  0.006  0.0069 0.0077 0.0085]
  from length: 0.0040 for every point

intercept = 0.0527847 +/- 0.0096
slope     = 4.05466 +/- 0.017
correlation(intercept, slope) = -0.933
chi2 / dof = 1.54 / 3 = 0.51

The reduced chi-square is of order one: a straight line with an intercept describes the data within their error bars. From the slope, g=4π2/bg = 4\pi^2/b with ug/g=ub/bu_g/g = u_b/b. From slope and intercept together, the offset is δ=a/b\delta = a/b, which needs the covariance of the two parameters (Section 13.2).

g from the slope : 9.737 ± 0.040 m/s^2
length offset    : 13.0 ± 2.4 mm

The fit finds an offset of 13.0±2.413.0 \pm 2.4 mm, more than five standard uncertainties from zero and consistent with the 15 mm radius of the ball that was built into the simulation. The mystery of Step 2 is solved, and the slope gives a value of gg that is free of it. The price is a larger statistical uncertainty than the (wrong) single-length values: one parameter more has to be determined from the same data.

Step 4. A correction common to all points

The formula T=2πℓ/gT = 2\pi\sqrt{\ell/g} holds for infinitesimal amplitude. For a release angle θm\theta_\mathrm{m} the period is longer,

T=T0(1+θm216+… ),T = T_0\left(1 + \frac{\theta_\mathrm{m}^2}{16} + \dots\right) ,

which for 10° amounts to 0.19 % in TT and therefore 0.38 % in gg. This is a known systematic effect of known sign, so we correct for it by dividing every period by 1+θm2/161 + \theta_\mathrm{m}^2/16.

The correction is uncertain because the amplitude is known only roughly, say θm=10°±1°\theta_\mathrm{m} = 10° \pm 1° (and it decays a little during the 20 oscillations). This uncertainty is the same for all five points: if the amplitude was really 11°, every period is under-corrected by the same factor. Such a fully correlated contribution must not be put into the error bars of the individual points, where the fit would treat it as independent scatter and average it down. It multiplies the final gg by a common factor and is added to the final uncertainty in quadrature.

amplitude correction to g      : +0.38%
g, corrected                   : 9.7737 m/s^2
  statistical (from the fit)   : 0.0398 m/s^2
  amplitude correction         : 0.0074 m/s^2
  combined                     : 0.0405 m/s^2

final result: g = 9.774 ± 0.040 m/s^2
discrepancy with 9.810: z = 0.9
<Figure size 1012x429 with 2 Axes>

Panel (a): the fitted line misses the origin, and the intercept on the length axis is −δ-\delta. Panel (b): the single-length values (points) climb towards the true value as the string gets longer, following the bias expected from the two neglected effects (dotted curve), while the fitted, corrected value (band) agrees with the value built into the simulation.

Step 5. Is the final uncertainty honest?

One experiment cannot answer this: a single result within one standard uncertainty of the true value proves little. With a simulated apparatus we can repeat the entire experiment and analysis many times and compare the quoted uncertainty with the actual scatter of the final results.

mean of the final g over 4000 experiments : 9.8107 m/s^2   (built in: 9.81)
actual scatter of the final g             : 0.0413 m/s^2
typical quoted statistical uncertainty    : 0.0399 m/s^2
fraction within one quoted uncertainty    : 0.665
mean reduced chi-square of the fits       : 1.08

The analysis is unbiased, the quoted uncertainty agrees with the actual scatter to a few per cent, and the coverage is close to the expected 68 %. (The amplitude was exactly 10° in every simulated run, so only the statistical part is tested here.)

What this example teaches

StageOutcomeComment
one length, textbook formulaprecise but wrongthe budget covered only random effects
five lengths, same formulavalues inconsistent, trend with ℓ\ella trend is the fingerprint of a systematic error
straight-line fitslope unaffected by the offsetthe offset is absorbed in the intercept
amplitude correctionfinal valuecommon correction: its uncertainty is added at the end
repeated simulationuncertainty verifiedpossible because the truth is known
  1. A small uncertainty is not evidence of a correct result.

  2. Vary the conditions. Had only one length been used, nothing would have looked wrong.

  3. Design the analysis so that likely systematic errors fall into parameters you do not care about.

  4. Distinguish uncertainties that are independent from point to point (they go into the weights) from those common to all points (they go into the final budget).

Exercises

  1. Redo the analysis without the effective-variance term for the length. How do ugu_g and χν2\chi^2_\nu change?

  2. The stopwatch runs slow by one part in a thousand. How does this affect gg? Would the fit reveal it? Would varying the length reveal it?

  3. Suppose the ball’s diameter had been measured with a calliper as 30.0±0.130.0 \pm 0.1 mm and the lengths corrected accordingly. Fit a line through the origin, T2=b(ℓ+r)T^2 = b(\ell + r), and compare the uncertainty of gg with that of the two-parameter fit. Why is it smaller?

  4. Change the hidden truth in the “apparatus” cell (for example a different r_ball or amplitude) and hand the printed data table to a colleague to analyse.