Monte Carlo error propagation

Developed by Andy Runquist

This set of exercises guides the student in exploring how to use a computer algebra system to determine the propagated error of a calculated parameter based on measured quantities with known uncertainties. This approach is based on the Monte Carlo approach.

As is detailed very thoroughly here, there are many methods for doing error propagation. Probably the most common is the calculus approach which assumes that not only do all variables follow a normal distribution, but that any calculation does so as well. Note how the examples described here don’t obey that latter issue. The link above carefully describes how the Monte Carlo method is the most accurate way of doing error propagation. From a numeric perspective, it’s also the easiest (not counting the simple crank-three-times). Certainly using a Computer Algebra System allows for coding up the calculus approach, but if the Monte Carlo approach is more accurate, why not do it and skip having to use a Computer Algebra System?

Subject Area Mathematical/Numerical Methods
Level First Year
Available Implementations Mathematica and Python
Learning Objectives

Students will be able to:

  • Generate normally distributed random numbers (Exercise 1)
  • Plot histograms. Calculate mean, median, and standard deviation for a distribution. Generate a new distribution from previously generated random numbers. (Exercise 3)
  • Compare the analytical (calculus) approach to the Monte Carlo approach (Exercises 2 and 3)
Time to Complete 30 min