University Physics I · Mathematical & Physical Foundations · 1.9
Data Analysis & Model Comparison
Measurements arrive as a table. Turning them into a slope with an uncertainty, then reading what the residuals do, is how you decide which of two physical models the data actually supports.
Build the model
Connect the measurement to the mechanism.
Data never chooses a model on its own; you make it choose. Pick axes that turn each candidate model into a straight line, fit the slope and intercept by least squares, and read those parameters as physical quantities with units and uncertainties. Then look at what the fit failed to explain.
Residuals scattered at the size of the measurement uncertainty mean the model has used up all the structure in the data; residuals that curve, tilt, or fan out mean the model is wrong in a specific way, and the pattern says how. Compare competing models on that evidence — residual structure first, then reduced χ² with a degree of freedom charged for every extra parameter, then whether each fitted parameter survives an independent test — never on which curve passes closer to the points.
- Simple definition
- Model comparison means fitting each candidate model to the same data and judging them by their residuals, their fitted parameters, and the measurement uncertainties — not by which curve looks closer.
- Example
- Plotting T² against m for a mass on a spring gives slope 1.953 ± 0.005 s² kg⁻¹, so k = 4π²/a = 20.21 ± 0.06 N m⁻¹, with an intercept nine uncertainties away from zero.
Choose axes that make the candidate model straight; a wrong model then shows up as a bend.
y = T² in s², x = m in kg, slope a in s² kg⁻¹
The unique line minimising Σrᵢ². Both are measured quantities, so both need uncertainties.
units: a is [y]/[x], b is [y]
Plot rᵢ against xᵢ. Scatter the size of the error bars supports the model; a pattern refutes it.
units of y · Σrᵢ = 0 only when the intercept is free
Spreading the x values wider lowers σₐ faster than repeating measurements at the same points.
s is the scatter of the points about the line, in units of y
≈1 fits within the stated uncertainties; ≫1 misfits; ≪1 means the σᵢ were overstated.
dimensionless · p = number of fitted parameters
Test a fitted parameter against an independent measurement, or an intercept against zero.
dimensionless · t ≲ 2 agrees · t ≳ 3 is a real difference
A table is not yet evidence
Record each measured quantity in a table with its unit and its uncertainty in the column heading, one row per trial. The table is raw material; the graph is the argument. Put the quantity you set on the horizontal axis and the quantity you measured on the vertical, draw error bars, and — before fitting anything — choose axes that make the candidate model a straight line. For a mass on a spring, T = 2π√(m/k) predicts T² = (4π²/k)m, so a plot of T² against m should be a line through the origin. Linearising is not cosmetic: departures from straightness are far easier to see, and far harder to explain away, than departures from a curve.
A fit returns physics, not a line
Least squares picks the slope a and intercept b that minimise Σrᵢ². For five masses from 0.100 kg to 0.500 kg, the fit of T² against m gives a = 1.953 s² kg⁻¹ and b = 0.0161 s². Read them as physics, not as output. The slope is 4π²/k, so k = 4π²/a = 39.478/1.953 = 20.21, and the units settle what that number is: 1/(s² kg⁻¹) is kg s⁻², which is N m⁻¹. Check the intercept the same way. The simple model predicts b = 0, so b has just become a testable quantity rather than a leftover.
Residuals are where the model is tested
A residual is what the model failed to account for: rᵢ = yᵢ − (a xᵢ + b). Plot the residuals against x on their own axes, magnified until the error bars fill a useful part of the height. Scatter the size of those bars, with no pattern, means the model has used all the structure in the data. A pattern means it has not, and the shape names the fault. Curvature says a term is missing. A steady tilt from left to right, after forcing a line through the origin, says the intercept is real. A fan widening with x says the uncertainty is proportional rather than constant, so the fit should be weighted. Reduced χ² tells you a fault exists; only the residual plot tells you which one.
An uncertainty turns a number into a claim
The scatter about the line sets the parameter uncertainties: s² = Σrᵢ²/(N − 2), then σₐ = s/√Σ(xᵢ − x̄)², with a matching expression for the intercept. For these five points Σ(xᵢ − x̄)² = 0.100 kg² and s = 1.7 × 10⁻³ s², giving a = 1.953 ± 0.005 s² kg⁻¹ and b = 0.0161 ± 0.0018 s². Propagate the 0.28 % relative uncertainty on the slope: k = 20.21 ± 0.06 N m⁻¹. Now judge the intercept with t = |b − 0|/σb ≈ 9. Zero lies nine standard uncertainties away, so b is not a zero blurred by noise, and the model T² = (4π²/k)m stands rejected by its own fit.
Compare models, and charge for flexibility
The competitor needs no new fit: the free-intercept line already is it. A real spring carries its own inertia, so T = 2π√((m + m₀)/k) with m₀ the spring's effective mass, giving T² = (4π²/k)(m + m₀) — the same slope, with a genuine intercept. The model just rejected is this one with b forced to zero. Reread this way, the fit returns m₀ = b/a = 8.2 ± 0.9 g and no trend in the residuals. Compare with reduced χ² = χ²/(N − p): a model earns an extra parameter only by cutting χ² far more than the roughly one unit that parameter buys on average. Better still, the new parameter predicts something else. For a uniform spring m₀ is one third of the spring's mass, so the balance should read about 25 g.
State the range over which the verdict holds
A surviving model has survived over the range tested, under the conditions recorded. This fit covers 0.100 kg to 0.500 kg at small amplitude; at large amplitude the coils leave their linear region, and at large load the spring stretches permanently. Neither failure appears anywhere in this data set, so neither has been ruled out by it. Report the fitted parameters with their uncertainties, what the residuals did, the range of the independent variable, and the assumptions you made. A result quoted without its range is a claim you have not tested.
Change one variable at a time
Make the relationship visible.
Raise m₀ from zero and watch the residuals tilt out of the ±σ band while R² barely moves.
FITTED SLOPE a₀1.655 s² kg⁻¹
k FROM a₀23.86 N m⁻¹
REDUCED χ²10.93
R²0.9985
Live interpretationFITTED SLOPE a₀: 1.655 s² kg⁻¹. k FROM a₀: 23.86 N m⁻¹. REDUCED χ²: 10.93. R²: 0.9985
Catch the common trap
Explain before calculating.
Twelve (m, T²) points with equal uncertainties are fitted twice. Model A, T² = am, gives reduced χ² = 4.2 with residuals positive at small m and negative at large m. Model B, T² = a(m + m₀), gives reduced χ² = 1.0 with unstructured residuals. What does the evidence support?
Choose an answer to test the model.
Practice & worked examples
Reason from the model, then test the result.
EasyA 0.300 kg mass on a spring takes 14.17 s for 20 oscillations. Linearise T = 2π√(m/k), then use this single point to estimate k.
- One period: T = 14.17 s ÷ 20 = 0.7085 s, so T² = 0.7085² = 0.502 s².
- Square the model. T = 2π√(m/k) gives T² = (4π²/k)m, so T² plotted against m should be a straight line through the origin of slope a = 4π²/k.
- Force that line through this one point: a = T²/m = 0.502 s² ÷ 0.300 kg = 1.673 s² kg⁻¹.
- k = 4π²/a = 39.478 ÷ 1.673 = 23.6, and the unit follows: 1/(s² kg⁻¹) = kg s⁻² = N m⁻¹.
- One point cannot test the assumption it was built on. Nothing here shows the intercept is zero — it was imposed, and a residual needs a line to be measured from.
Answerk = 23.6 N m⁻¹, resting on a zero intercept that a single point cannot test.
MediumThe full run gives five masses and their squared periods, each T² carrying an uncertainty of 0.003 s²: (0.100, 0.182), (0.200, 0.337), (0.300, 0.502), (0.400, 0.657), (0.500, 0.822), in kg and s². Fit a straight line, quote the slope with its uncertainty, and test the intercept against zero.
- Means: x̄ = 0.300 kg and ȳ = 2.500 ÷ 5 = 0.500 s². The x-deviations are −0.2, −0.1, 0, +0.1, +0.2 kg, so Σ(xᵢ − x̄)² = 0.04 + 0.01 + 0 + 0.01 + 0.04 = 0.100 kg².
- Σ(xᵢ − x̄)(yᵢ − ȳ) = (−0.2)(−0.318) + (−0.1)(−0.163) + 0 + (0.1)(0.157) + (0.2)(0.322) = 0.1600 s² kg, so a = 0.1600 ÷ 0.100 = 1.600 s² kg⁻¹.
- b = ȳ − a x̄ = 0.500 − 1.600 × 0.300 = 0.020 s².
- Residuals rᵢ = yᵢ − (a xᵢ + b) are +0.002, −0.003, +0.002, −0.003, +0.002 s². They sum to zero, as a free intercept forces, and Σrᵢ² = 3.0 × 10⁻⁵ s⁴, so s = √(3.0 × 10⁻⁵ ÷ 3) = 3.16 × 10⁻³ s².
- σₐ = s ÷ √0.100 = 3.16 × 10⁻³ ÷ 0.3162 = 0.010 s² kg⁻¹, and σb = s√(1/5 + 0.300²/0.100) = 3.16 × 10⁻³ × √1.1 = 0.0033 s².
- Test the intercept: t = |0.020 − 0| ÷ 0.0033 = 6.0, so zero sits six standard uncertainties away and T² = (4π²/k)m is refuted. The slope still gives k = 4π²/a = 39.478 ÷ 1.600 = 24.67 N m⁻¹, and σₐ/a = 0.63 % carries straight across to ±0.15.
Answera = 1.600 ± 0.010 s² kg⁻¹, b = 0.020 ± 0.0033 s², k = 24.67 ± 0.15 N m⁻¹; the intercept is 6.0σ from zero.
HardA colleague insists the simple model is fine and refits the same five points with the line forced through the origin. Taking σ = 0.003 s² on every T², compare the two models.
- Origin-forced least squares: a₀ = Σmᵢyᵢ ÷ Σmᵢ² = 0.9100 ÷ 0.5500 = 1.6545 s² kg⁻¹.
- Its residuals yᵢ − a₀mᵢ are +0.0165, +0.0061, +0.0056, −0.0048, −0.0053 s² — positive at small m, negative at large m. That is a shape, not scatter, and the shape a missing constant makes.
- χ²A = Σ(rᵢ/0.003)² = 30.4 + 4.1 + 3.5 + 2.6 + 3.1 = 43.7, with ν = 5 − 1 = 4, so reduced χ² = 10.9.
- The free-intercept fit's residuals were +0.002, −0.003, +0.002, −0.003, +0.002 s², giving χ²B = 3(0.667²) + 2(1.000²) = 1.33 + 2.00 = 3.33, with ν = 5 − 2 = 3, so reduced χ² = 1.11.
- An extra parameter buys about Δχ² ≈ 1 on average. This one bought 43.7 − 3.3 = 40.4, so the intercept is physics, not flexibility.
- Name it: T² = (4π²/k)(m + m₀) makes b = a m₀, so m₀ = b ÷ a = 0.020 ÷ 1.600 = 0.0125 kg. A uniform spring contributes m₀ = mspring/3, so the balance should read about 38 g — a test the origin-forced model cannot offer.
AnswerModel B: reduced χ² of 1.11 against 10.9, residuals with no structure, and an extra parameter that predicts a spring mass near 38 g.