Build mathematical modelsLesson 42 of 48 · 9 min

Propagate small input uncertainty

Use a Jacobian for a first-order covariance approximation and state its limits.

Maths refresher: Variance, covariance and local change

Variance is the average squared departure from the mean. Covariance averages the product of two inputs’ departures from their means, so it can be positive, negative or zero.

Cov⁡(f(X))≈J Σ JT\operatorname{Cov}(f(X))\approx J\,\Sigma\,J^T
Worked example

For one output y≈ax+by\approx ax+b, the variance is a2a^2 times the input variance. Multiple outputs can share covariance through common inputs.

Maths prerequisite map ↗

A nonlinear model can transform uncertainty in several inputs into related output uncertainties. Near a nominal point, the Jacobian collects partial derivatives that describe the local linear response. Multiplying JΣJTJ\Sigma J^T propagates an input covariance matrix through that linear approximation.

See the mathematics
area (standard deviations)perimeter (standard deviations)
area (standard deviations)perimeter (standard deviations)
Σout≈JΣinJT\Sigma_{\rm out}\approx J\Sigma_{\rm in}J^T
Starter reference. Local covariance geometry for the invented rectangle inputs, in standardised output coordinates. The outline is not a confidence region; it shows the strong positive relationship from shared inputs.

The example uses rectangle length and width with independent, invented variances. Its outputs are area and perimeter. Even independent inputs can produce correlated outputs because both outputs depend on the same lengths.

Evaluate the Jacobian at the nominal input before applying the covariance formula. The result is first-order propagation, not an exact uncertainty law for every nonlinear transformation. Large spread, skewness, boundaries and dependence can make a simulation or richer analysis necessary.

Can area and perimeter be correlated even if length and width errors are independent?

Write a prediction (optional)

First-order propagation of invented input uncertainty

Select Run Python with the code unchanged.

Tools
About Python

Python and the course packages can load while you read. Each run starts with fresh user variables; imported modules stay loaded. Stop replaces the worker. Runtime details ↗

Ctrl+Enter or ⌘+Enter runs Python.

Compare with the worked example

Executed from the published Python during the site build. Your own run appears above. Build environment ↗

Jacobian, input order (length,width)
[widthlength22]\left[\begin{matrix}width & length\\2 & 2\end{matrix}\right]
Jacobian at (2,3)
[3222]\left[\begin{matrix}3 & 2\\2 & 2\end{matrix}\right]
Approximate output covariance, order (area,perimeter)
[141150115015]\left[\begin{matrix}\frac{1}{4} & \frac{11}{50}\\\frac{11}{50} & \frac{1}{5}\end{matrix}\right]
Approximate area variance
14\frac{1}{4}
Worked text output
Jacobian, input order (length,width): Matrix([[width, length], [2, 2]])
Jacobian at (2,3): Matrix([[3, 2], [2, 2]])
Approximate output covariance, order (area,perimeter): Matrix([[1/4, 11/50], [11/50, 1/5]])
Approximate area variance: 1/4

Read the starter result

In the output covariance matrix, the diagonal entries give separate variances. The off-diagonal entries record shared output variation. The first diagonal entry is printed separately as Approximate area variance.

Edit and compare

Replace cross_covariance = 0 with cross_covariance = sp.Rational(1,100). This invented positive covariance is half the product of the two input standard deviations. Select Run Python. Compare Approximate area variance with the independent-input result.

Return to the editor

Scope. This is a local approximation using invented input uncertainty. The starter assumes independent inputs and the edited comparison supplies an assumed covariance.

Try a fresh case

When is this first-order result most in need of further checking?

Choose an answer
Need a hint?
Hint 1

Ask whether one local slope represents the whole uncertain region.

Hint 2

Compare with a suitable simulation when curvature matters.

Your notesNotes save in this browser when storage is available.