Sub topic 11
Propagating uncertainty through calculations
This chapter assumes you can already count significant figures, round results, and read a value written as x ± δx. It also assumes you are comfortable with relative uncertainty (δx/|x|) and with square roots and exponents. Here you will learn how the uncertainty in measured inputs becomes the uncertainty in a calculated result.
Why uncertainty has to be propagated
Significant-figure rules are a shortcut. They guess the uncertainty from the number of digits. Propagation does the calculation properly. Each measured input has an uncertainty. The formula combines the inputs, so the result has an uncertainty too, and you can calculate it.
Take a rectangular table top with length L = 2.50 ± 0.05 m and width W = 1.20 ± 0.02 m. Its area is 3.00 m². That area is not exact, because both inputs could be slightly off. Propagation tells you how far off the area can plausibly be.
Two terms are used throughout:
- Absolute uncertainty δx has the same unit as x. For example, 0.05 m.
- Relative uncertainty δx/|x| has no unit. For example, 0.05/2.50 = 0.02, or 2%.
The rules for independent uncertainties
These rules assume the inputs are independent. That means an error in one measurement says nothing about the error in another. The usual way to combine independent uncertainties is in quadrature: square each one, add the squares, and take the square root.
| Operation | Result f | Uncertainty δf | Column | Column | Column | Column | Column | Column |
|---|---|---|---|---|---|---|---|---|
| Sum or difference | f = x ± y | δf = √(δx² + δy²) | ||||||
| Product or quotient | f = x·y or x/y | δf/\ | f\ | = √((δx/x)² + (δy/y)²) | ||||
| Constant multiple | f = c·x | δf = \ | c\ | ·δx | ||||
| Power | f = xⁿ | δf/\ | f\ | = \ | n\ | ·δx/\ | x\ | |
| General function | f(x, y, ...) | δf = √((∂f/∂x·δx)² + (∂f/∂y·δy)² + ...) |
The general row contains all the others. Each partial derivative says how strongly the result responds to that input. A large derivative means that input dominates the result's uncertainty.
Sums and differences combine absolute uncertainties. Products and quotients combine relative uncertainties. Mixing these up is the most common mistake.
A product: the table area
Apply the product rule to the table. The relative uncertainties are 0.05/2.50 = 0.020 and 0.02/1.20 ≈ 0.0167. In quadrature they give √(0.020² + 0.0167²) ≈ 0.026. That is 2.6% of 3.00 m², or about 0.078 m².
from math import sqrt
L, dL = 2.50, 0.05
W, dW = 1.20, 0.02
A = L * W
dA = A * sqrt((dL / L) ** 2 + (dW / W) ** 2)
print(f"A = {A:.2f} +/- {dA:.2f} m^2") # A = 3.00 +/- 0.08 m^2The uncertainty of 0.08 m² is smaller than the plain sum of the two contributions. The rule assumes the two errors are unlikely to both be at their extremes in the same direction at once.
A difference: when subtraction hurts
Two lengths are measured as 12.4 ± 0.2 cm and 11.9 ± 0.2 cm. Their difference is 0.5 cm. The uncertainty is √(0.2² + 0.2²) ≈ 0.28 cm, so the result is 0.5 ± 0.3 cm.
from math import sqrt
a, da = 12.4, 0.2
b, db = 11.9, 0.2
d = a - b
dd = sqrt(da ** 2 + db ** 2)
print(f"d = {d:.1f} +/- {dd:.1f} cm") # d = 0.5 +/- 0.3 cm
print(f"relative: {dd / d:.0%}") # relative: 57%Each input is known to about 2%. The difference is known only to about 57%. This is subtractive cancellation: when two nearly equal numbers are subtracted, the value shrinks but the absolute uncertainty does not. If your design requires a small difference, measure it directly instead of subtracting two large readings.
A power: the pendulum and g
A pendulum of length L has period T = 2π√(L/g). Solving for g gives g = 4π²L/T². Suppose L = 1.000 ± 0.002 m and T = 2.007 ± 0.004 s.
The factor 4π² is exact, so it adds no uncertainty. The quantity T is squared, so its relative uncertainty is doubled:
- Relative uncertainty of L: 0.002/1.000 = 0.0020.
- Relative uncertainty of T²: 2 × 0.004/2.007 ≈ 0.0040.
- Combined: √(0.0020² + 0.0040²) ≈ 0.0045.
from math import pi, sqrt
L, dL = 1.000, 0.002
T, dT = 2.007, 0.004
g = 4 * pi ** 2 * L / T ** 2
rel = sqrt((dL / L) ** 2 + (2 * dT / T) ** 2)
dg = g * rel
print(f"g = {g:.2f} +/- {dg:.2f} m/s^2") # g = 9.80 +/- 0.04 m/s^2The period dominates the result, because squaring it doubles its weight. Improving the timing, for example by timing many swings and dividing, helps far more than improving the length measurement.
Rounding and reporting
Round the uncertainty first, then round the value to match it.
- Round the uncertainty to one significant figure. Use two if its first digit is 1, for example 0.14.
- Round the value to the same decimal place as the uncertainty.
- Write both with the same unit, as in 9.80 ± 0.04 m/s².
Keep extra digits in intermediate steps. Round only at the end. Rounding at each step adds error that is not part of the measurement.
Gotchas and failure modes
Repeated variables are not independent
In f = x·x the two factors are the same measurement, so their errors are perfectly correlated. Applying the product rule to x·x gives √2·δx/x. That is wrong. Write it as x² and use the power rule, which gives 2·δx/x. The same problem appears in expressions like x − x/2 or x/(x + y). If a variable appears more than once, use the general derivative formula, or simplify the expression first.
Quadrature needs independence
If two quantities share a measuring instrument or a calibration error, their errors are correlated. Quadrature then underestimates the uncertainty. The conservative alternative is the worst-case (linear) sum: for a product, add the relative uncertainties directly. For the table, that gives 0.020 + 0.0167 = 0.037, or 0.11 m². Use quadrature for independent random errors. Use linear addition when errors are likely to push the same way.
Exact numbers carry no uncertainty
Constants such as 2, π, 4π², and defined conversion factors like 1609.344 m per mile do not contribute. Treat them as having zero uncertainty. Measured constants, such as a tabulated material property, do contribute.
Uncertainty is not a hard limit
A value of 9.80 ± 0.04 does not mean the true value lies strictly between 9.76 and 9.84. It means the true value is probably near that range. The usual interpretation is that the range covers about 68% of the likelihood, not all of it.
Units still have to match
In a sum, the quantities and their uncertainties must share a unit before you combine them. Convert first. Mixing, say, 0.05 m with 3 cm in a quadrature sum gives a meaningless number.
Putting it together
For a new formula, work in this order:
- Write the formula and mark which inputs are measured and which are exact.
- Check whether any variable appears more than once. If so, simplify or use derivatives.
- Pick the rule from the table. For a mixed formula, apply it one operation at a time, converting between absolute and relative form as needed.
- Identify the largest contribution. That is the measurement to improve.
- Round the uncertainty, then the value, and report both with the unit.
Exercise
A resistor has R = 15.0 ± 0.3 ohms and the current through it is I = 2.00 ± 0.04 A. Find the voltage V = I·R with its uncertainty, rounded correctly.
Show answer
V = 2.00 × 15.0 = 30.0 V. The relative uncertainties are 0.04/2.00 = 0.020 and 0.3/15.0 = 0.020. In quadrature they give √(0.020² + 0.020²) ≈ 0.0283. So δV ≈ 30.0 × 0.0283 ≈ 0.85 V, which rounds to 0.8 V. The result is V = 30.0 ± 0.8 V.
Exercise
A circle has radius r = 4.0 ± 0.1 cm. Find the area A = πr² and its uncertainty. Why is the answer not the same as treating r·r as two independent factors?
Show answer
A = π × 4.0² ≈ 50.3 cm². Using the power rule, the relative uncertainty of A is 2 × 0.1/4.0 = 0.050, so δA ≈ 50.3 × 0.050 ≈ 2.5 cm². Rounded to one significant figure, the result is A = 50 ± 3 cm². Treating r·r as independent factors would give √2 × 0.025 ≈ 0.035, which underestimates the uncertainty. Both factors are the same measurement, so their errors are fully correlated and the power rule is correct.
Exercise
Two masses are measured as 250.0 ± 0.5 g and 248.0 ± 0.5 g. What is their difference with its uncertainty, and what is the relative uncertainty of the difference?
Show answer
The difference is 2.0 g. The uncertainty is √(0.5² + 0.5²) ≈ 0.71 g, which rounds to 0.7 g. So the result is 2.0 ± 0.7 g. The relative uncertainty is about 0.7/2.0 = 35%, even though each mass is known to about 0.2%. This is subtractive cancellation.