I wanted to jot down some of my experiences with teaching error propagation. Right off the bat I should note that I have been greatly influenced by this document by John Denker in response to questions about this topic on the PHYS-L listserv. I especially like his rant against significant figures in that document, but I’ll let that go for now.
I’d like to talk about how I encourage the high school teachers in my licensure program to do and teach error propagation. I don’t do the calculus method because, um, it requires calculus and students get bogged down in that instead of the important stuff (things like with comments like “I guess I messed up the calculus” vs and comments like “wow, this is a really accurate measurement” with the Montecarlo method).
Before I forget, here’s the calculus method. Assume you’ve measured a, b, and c with their associated errors and . Now you want to calculate some crazy function, f, of all the variables, or f(a, b, c). The error on f (assuming no correlations among the variables) is given by:
You can see why it’s a hassle, what with the partial derivatives and all the terms to keep track of. One (of many) nice things about it is how you can quickly see which variable you should spend money on.
The Montecarlo method uses a computer to do many simulations of the experiment, where the variables are all randomly selected to be close to the best measurement you make. Specifically, you create several normally distributed (assuming that’s the distribution of your data – a common case) random numbers that resemble the original data set. You then let the computer calculate the formula of interest several times over and then take the average and standard deviation of those to determine the best estimate of the function and the error on the function.
I encourage students to do this with spreadsheets. Each column is a variable measured in class. Then you add a column for any calculations that you care to do with that data. You use a command to generate the random numbers, stretch the formulas down a few 100 or 1000 rows, and then use the typical Average and Stdev commands on the columns you care about.
For me, the biggest difficulty was finding the command in Excel and Google Docs that does the random number generation. Rand() doesn’t do the trick because that’s a uniformly distributed random number between 0 and 1, as opposed to a normally distributed random number around a mean with a given standard deviation.
Well, I finally found it. The norminv( ) function does the trick nicely in both Excel and Google Docs. If you want a random number normally distributed around, say, 5.6, with a standard deviation of 1.2, you do this:
norminv(rand(), 5.6, 1.2)
Go try it, it’s fun! Stretch it down a few rows and you’ll get a different answer on every row.
So each column has that going on for every variable measured in the experiment. You make new columns for any calculations. Here’s an example:
It doesn’t take students very long to grasp the concept and I make sure they’re doing it on the fly in their labs all the time. It certainly beats the calculus method in one major point: the complexity of the problem doesn’t affect how hard it is to do in a spreadsheet (assuming you can type your formula into excel or google docs). In the calculus method, the complexity can really be daunting for some students.
How far is enough to stretch?
I used Mathematica to test the notion of how far to go. It’s faster to do the random number generation (use the command RandomReal[NormalDistribution[mean, stdev]]) and I can make histograms faster as well. Here are plots of the histogram for several random numbers with a mean of 5.2 and a standard deviation of 1.3. The number of “rows” goes from 10 up to 100,000 by factors of 10:
You can see the signature normal distribution towards the bottom, but in fact, even for just 100 points, the mean and standard deviation are perfectly acceptable. In Excel it’s pretty easy to drag down 1000 rows, but after 100 you don’t get results that are that different. I certainly encourage my students to play around with how many they need to use.
This works well for me, but I never feel like the students get to the point where they realize just how important/powerful error propagation is. How do you teach/do it?