Error Propagation: A Functional Approach - American Chemical Society

Apr 5, 2012 - ABSTRACT: This communication advocates the use of the functional approach for error propagation complementing the electronic resource pr...
1 downloads 3 Views 163KB Size
Communication pubs.acs.org/jchemeduc

Error Propagation: A Functional Approach Ifan G Hughes*,† and Thomas P A Hase§ †

Department of Physics, Durham University, South Road, Durham DH1 3LE, United Kingdom Department of Physics, University of Warwick, Coventry CV4 7AL, United Kingdom

§

ABSTRACT: This communication advocates the use of the functional approach for error propagation complementing the electronic resource provided in a recent paper in this Journal. KEYWORDS: Upper-Division Undergraduate, Analytical Chemistry, Physical Chemistry, Problem Solving/Decision Making, Computational Chemistry, Mathematics/Symbolic Mathematics

I

n a recent interesting article in this Journal, Gardenier, Gui, and Demas 1 discussed various approaches to error propagation and provided excellent electronic resources, in particular for spreadsheet error propagation. In common with the conventional textbook treatment, the calculus-based approach is discussed first, and spreadsheet methods are introduced as a “numerical approximation of the necessary partial derivatives”. By contrast, in our teaching, we first introduce the functional approach to error propagation, followed by the calculus-based approximation.

σy = |f (x ̅ + σx) − f (x ̅ )|

(1)

We refer to the methodology for propagating errors encapsulated in Figure 1 and eq 1 as the f unctional approach. This intuitive approach can be easily supported with online resources (see for example ref 3) and extended for functions of many variables (see for example ref 2, section 4.2). Students introduced to this pictorial vision of error propagation gain a better intuitive feeling for the mechanics of error propagation than those students whose first exposure is to the more intimidating (and nonintuitive) calculus-based approach, especially as it is common for students to encounter error propagation earlier in their studies than partial differentiation.



FUNCTIONAL APPROACH TO ERROR PROPAGATION Figure 1 (adopted from ref 2) shows how we introduce the concept of the error: as a map between variations in a variable x and a function. We teach students to calculate first f(x), ̅ second f(x̅ + σx), and then calculate the error as the modulus of the difference:



LINK BETWEEN THE FUNCTIONAL APPROACH AND THE CALCULUS APPROXIMATION There are two ways to show explicitly the link between the exact functional approach and the calculus approximation. The conventional approach is to simply perform a Taylor-series expansion of the function of eq 1, yielding the well-known result σy ≈

df dx

σx x= x̅

The same result can be derived graphically by drawing the tangent to the curve in Figure 1 (the dashed line). Students recognize Figure 1 as it often appears in books on elementary calculus. The calculus-based approximation gets better as the increment along x, σx, gets smaller. In the limit of an infinitesimally small displacement, the results are identical, when the white square coincides with the white circle.



ADVANTAGES The functional approach is also popular with students as it is highly amenable for use with a spreadsheet. Another advantage of introducing the functional approach before the calculus approximation is that some limitations of the latter become more apparent. For functions of a single variable, the calculus approach can only calculate symmetric error bars, whereas the

Figure 1. The function y = f(x) and the tangent at x.̅ When the abscissa has a value of x,̅ the ordinate has the value f(x), ̅ denoted by a black dot. The uncertainty in x, σx, maps into an uncertainty in y, σy. The location of the white dot is found by evaluating the function with the argument displaced by the error: f(x̅ + σx). For the white square, the ordinate has the value df × σx f (x ̅ ) + dx x = x ̅

Published: April 5, 2012 © 2012 American Chemical Society and Division of Chemical Education, Inc.

821

dx.doi.org/10.1021/ed2004627 | J. Chem. Educ. 2012, 89, 821−822

Journal of Chemical Education

Communication

functional approach can accommodate asymmetric error bars. Consider the case of the single-variable function 1 y = f (ϑ) = sin 4(ϑ/2) which describes the angular dependence of the Rutherford scattering cross section. What is the error in the cross section if the scattering angle is evaluated as ϑ = (90 ± 5)°? The functional approach is easy to apply in this circumstance; one simply evaluates the function in a spreadsheet for three arguments: 1 f (ϑ̅ ) = = 4, 4 sin (45) 1 f (ϑ̅ + σϑ) = = 3.4, and 4 sin (47.5) 1 f (ϑ̅ − σϑ) = = 4.8 4 sin (42.5) Thus, we can write y = 4.0+0.8 −0.6. There are two limitations to applying the calculus approach to this example: (1) the susceptibility to make a mistake when differentiating the function and (2) only a symmetric error bar can be generated.



SUMMARY We believe that best teaching practice is to introduce first the functional approach, then the calculus-based method and to compare and contrast their relative strengths and limitations, before leaving students to decide which technique to use to tackle a particular problem.



AUTHOR INFORMATION

Corresponding Author

*E-mail: [email protected]. Notes

The authors declare no competing financial interest.

■ ■

ACKNOWLEDGMENTS We are grateful to Marek Szablewski for useful discussions. REFERENCES

(1) Gardenier, G. H.; Gui, F.; Demas, J. N. J. Chem. Educ. 2011, 88, 916−920. (2) Hughes, I. G.; Hase, T. P. A. Measurements and Their Uncertainties: A Practical Guide to Modern Error Analysis; Oxford University Press: Oxford, 2010. (3) Lab Guide. http://level1.physics.dur.ac.uk/general/index.php (accessed Mar 2012).

822

dx.doi.org/10.1021/ed2004627 | J. Chem. Educ. 2012, 89, 821−822