A Byte of PhysicsLogo

Propagation of uncertainty

Measurements are input data with a confidence range, not perfectly known constants. A Monte Carlo program repeats the same calculation with many plausible inputs and records the output distribution.

Think like a programmer

Model uncertainty as data that travels through a function. A seeded random generator is a test fixture: it lets you replay an unusual distribution instead of treating a chart as an unrepeatable surprise.

Model checklist

Inputs
Measured speed and duration, each with a central value, uncertainty, unit, and reproducible random seed.
State
A collection of sampled input pairs and output distances.
Rule
Sample plausible inputs, multiply speed by time, then summarize the outputs.
Output
A distance distribution and its central range.
Check
With zero input uncertainty, every sampled distance is the same.

The model

For a distance measured from a constant speed and duration:

\[d = vt\]

If both v and t carry uncertainty, a single calculated distance hides useful information. Instead, sample a possible velocity and time, calculate d, and repeat. The resulting values make the uncertainty visible as data.

const distances = Array.from({ length: 10_000 }, () => {
  const velocity = sampleNormal(5.0, 0.1);
  const time = sampleNormal(12.0, 0.2);
  return velocity * time;
});

The program is not discovering a new physical law. It is checking how sensitive an existing relationship is to imperfect inputs. Keep units beside values and set a random seed in tests so a surprising result can be reproduced.

Try this experiment

Prediction: Doubling the uncertainty in time makes the output distances spread farther apart when speed uncertainty stays fixed.

Run the thought experiment with a fixed seed. First use a 0.2 s time uncertainty, then 0.4 s. Before looking at the output, predict which summary—the average or the spread—should change most.

Where this model breaks

A normal distribution is an assumption, not a default truth. Biased instruments, correlated measurements, hard physical bounds, and unknown systematics can make independently sampled bell curves misleading.

Summary

Monte Carlo propagation turns uncertain inputs into a distribution of possible outputs. Reproducible sampling and a zero-uncertainty case are practical tests of the implementation.

Glossary

Self-check

  1. What happens when every input uncertainty is zero?
  2. Why store a random seed with an experiment?
  3. What assumption does sampleNormal make?

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Propagation of Uncertainty, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Measurement, Units, and Uncertainty, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Propagation of Uncertainty as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Propagation of Uncertainty into a test

Use repeated samples to see how uncertain inputs spread into a calculated result.

  1. Name the inputs and units that the measurement, units, and uncertainty model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: