TactivergeLite

Lite / Independent Engineering Research / Week 12

Propagating uncertainty: linearisation and Monte Carlo

You know the wheel's circumference to 1% and the turn count to 2%. How well do you know the distance? And what if the formula is not so simple?

About 45 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Engineering answers are calculated from measured inputs. Uncertainty propagation tells you how input errors become output errors, and which input to improve. When the function bends sharply, Monte Carlo keeps you honest.

Predict

Area of a square solar panel A = L². L has 2% uncertainty. What is A's relative uncertainty?

  1. 2%
  2. 4%
  3. √2 × 2% ≈ 2.8%
  4. 1%
Guess first, then reveal

For y = xⁿ, relative uncertainty multiplies by |n|: 2 × 2% = 4%. Not √2 × 2%, because the two L's are the same measurement (perfectly correlated), not independent.

Discover

In the Code Lab, sample L ~ Normal(1.00, 0.02) 100,000 times, compute A = L² and the standard deviation of A. Compare with the linearised 4%. Then try h = 1/L with L ~ Normal(1, 0.3): the Monte Carlo mean is not 1/1 and the spread is lopsided. Linearisation breaks when the function curves strongly within the uncertainty.

What the interactive shows (text version)

The Code Lab activity's expected results are stated in the text: about 4% spread for L² and a biased, skewed result for 1/L with large uncertainty. The rules can all be applied with a calculator.

You can also open the interactive on the full site when you have a faster connection.

Understand

First-order propagation

For y = f(x₁, …, xₙ) with independent inputs, σ_y² ≈ Σ (∂f/∂xᵢ)² σᵢ². This is a Taylor expansion to first order: it treats f as a plane near the measured point. It is exact for linear functions and good when σᵢ is small compared with the scale on which f bends.

Handy rules

Sums and differences: absolute uncertainties add in quadrature. Products and quotients: relative uncertainties add in quadrature. Powers: y = xⁿ gives σ_y/y = |n|·σ_x/x. Correlated inputs need the covariance term 2(∂f/∂x)(∂f/∂y)Cov(x, y).

Monte Carlo propagation

Draw many input samples from their distributions, push each through f, and look at the outputs. No derivatives needed, nonlinearity and correlation handled automatically, and you get the whole output distribution. The cost is computation and the need for honest input distributions.

Explain it another way

Intuitive

Wiggle each input by its uncertainty and see how much the output wiggles. Independent wiggles partly cancel, so you combine them like perpendicular sides of a triangle.

Technical

The first-order (delta) method also gives the output mean as f(x̄). The second-order correction to the mean is ½Σ(∂²f/∂xᵢ²)σᵢ²: for 1/L with σ = 0.3 that is +0.09, the bias Monte Carlo reveals.

Mathematical

Distance d = C·N, σ_C/C = 1%, σ_N/N = 2%: σ_d/d = √(1² + 2²)% ≈ 2.24%. Range from light time r = c·t/2 with σ_t = 10 ns: σ_r = c·σ_t/2 = 1.5 m.

Applied

Mission designers run Monte Carlo campaigns of thousands of simulated landings, sampling atmosphere, aerodynamics and navigation errors, because entry dynamics are far too nonlinear for linearised propagation alone.

Worked example 1

Speed v = d/t with d = 100.0 ± 0.5 m and t = 20.0 ± 0.2 s (independent). Find v ± σ_v.

v = 5.00 m/s. Relative: √(0.5² + 1.0²)% = 1.12%. σ_v ≈ 0.056 m/s.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

%

m

%

Practice 4. When is Monte Carlo propagation clearly better than linearisation?

Apply it

A rover estimates distance to a cliff from camera disparity: Z = f·B/d with focal length f = 800 px, baseline B = 0.2 m and disparity d = 16 ± 1 px. Propagate by linearisation, then reason about (or run) a Monte Carlo check. Which method would you trust for d = 4 ± 1 px?

Reflect

Which input in your own project measurement contributes most to the output uncertainty, and how did you find out?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Random and systematic error, and confidence intervalsError budgets: where does the uncertainty come from? →