Error Propagation

109 downloads 129 Views 54KB Size Report
This question falls under the heading of error propaga- ... Furthermore, we again assume that the uncertainties are small enough to approximate variations in f ...
ErrorPropagation.nb

1

Error Propagation Suppose that we make N observations of a quantity x that is subject to random fluctuations or measurement errors. Our best estimate of the true value for this quantity is then êêx ≤ sx where 1 êê x = ÅÅÅÅÅÅÅ ‚ xi , N i=1 N

1 sx 2 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ Hxi - êêx L2 N - 1 i=1 N

are the sample mean and variance. Next, suppose that we compute a derived quantity f @xD. Our best estimate for this êêê êêD, but what is the uncertainty in this quantity? This question falls under the heading of error propagaquantity is f = f @x tion. Let us assume that sx is small enough to use a linear approximation to f @xD near êêx , such that ∑f êêê f - f º ÅÅÅÅÅÅÅÅÅÅ Hx - êêx L ∑x where the derivative is evaluated at êêx . Thus, if we expect the true value of x to lie in the range êêx ≤ dx, the true value for êêê f @xD should lie in the corresponding range f ≤ d f where ƒƒ ∑ f ƒƒ d f = † ÅÅÅÅÅÅÅÅÅÅ §ƒ dx ƒƒ ∑ x ƒ

Under the present circumstances we would interpret the uncertainty dx as the standard deviation sx , but often we must estimate this quantity by other means. As illustrated in the figure below, the steeper is f @xD near êêx the larger is d f for given dx; this follows simply from the definition of derivative as rate of change. Note that we use the absolute value because uncertainties are expressed as positive numbers giving the width of an interval. f @xD

êêê f ≤df

êê x ≤dx

x

Now suppose that we measure two variables x and y and wish to compute f = f @x, yD. How accurately do we know f if the uncertainties in the measured quantities are dx and d y? A crude estimate might simply add two contributions analogous to the one-dimensional result above. However, this is likely to be an overestimate because sometimes the fluctuations in the two variables will add and sometimes they will subtract. A more realistic estimate requires statistical analysis. The simplest situation occurs when x and y are normally distributed random variables. Our best estimates of the true values for these parameters are then their mean values, êê x and êêy, with uncertainties given by their standard deviations,

ErrorPropagation.nb

2

sx and s y . Furthermore, we again assume that the uncertainties are small enough to approximate variations in f @x, yD as linear with respect to variation of these variables, such that ∑f ∑f êêê f - f º ÅÅÅÅÅÅÅÅÅÅ Hx - êêx L + ÅÅÅÅÅÅÅÅÅÅ Hy - êêyL ∑x ∑y

êê, êêyL. If we perform many measurements, the variance of f becomes where the partial derivatives are evaluated at Hx 2 1 1 ∑f êêê 2 i∑f y = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ H fi - f L = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ „ jj ÅÅÅÅÅÅÅÅÅÅ Hxi - êêx L + ÅÅÅÅÅÅÅÅÅÅ Hyi - êêyLzz N - 1 i=1 N -1 ∑y k ∑x { N

N

sf

2

i=1

Expanding this expression 1 s f 2 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ N -1

N N iji ∑ f y2 N ∑ f y2 ∑f ∑f êêyL2 + 2 ÅÅÅÅ êê êê yz jjjj ÅÅÅÅÅÅÅÅÅÅ zz ‚ Hxi - êêx L2 + ijj ÅÅÅÅ z Å ÅÅÅ Å Å Hy Å ÅÅÅ Å Å ÅÅÅÅ Å ÅÅÅ Å Å z ‚ ‚ Hxi - x L Hyi - yLzzzz i jj ∑ x ∑ y i=1 k ∑ y { i=1 kk ∑ x { i=1 {

and identifying its terms, we find

2 2 ∑f ∑f i∑f y i∑f y s f 2 = jj ÅÅÅÅÅÅÅÅÅÅ zz sx 2 + jj ÅÅÅÅÅÅÅÅÅÅ zz s y 2 + 2 ÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ sx,y ∑ x ∑ y ∑x ∑ y k { k {

where 1 sx 2 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ Hxi - êêx L2 , N - 1 i=1 N

1 s y 2 = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ Hyi - êêyL2 N - 1 i=1 N

are the sample variances for each variable and 1 sx,y = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ Hxi - êêx L Hyi - êêyL N - 1 i=1 N

is their covariance.

This analysis can readily be generalized to an arbitrary number of variables. Let x = 8xm , m = 1, m< represent the set of variables, such that ∑f ∑f = „ ÅÅÅÅÅÅÅÅÅÅÅÅÅ sm,n ÅÅÅÅÅÅÅÅÅÅÅÅ ∑ xn ∑ xm m

sf

2

m,n=1

where 1 sm,n = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ‚ Hxm,i - êêx m L Hxn,i - êêx n L N - 1 i=1 N

is the covariance matrix and xm,i is the ith measurement of xm . Note that the diagonal elements of the covariance matrix, sm,m = sm 2 , are simply variances for each variable.

ErrorPropagation.nb

3

The covariance measures the tendency for fluctuations of one variable to be related to fluctuations of another. A closely related quantity is the correlation sx,y Cx,y = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ï -1 § Cx,y § 1 sx s y which is normalized to the range -1 § Cx,y § 1. If a positive deviation in x (such that xi - êêx > 0) is more likely to be accompanied by a positive deviation in y, then Cx,y will be positive, whereas Cx,y would be negative if a positive deviation in one variable is likely to be accompanied by a negative deviation in the other. If the deviations in one variable are equally likely to be accompanied by deviations of either sign in the other variable , the sum of products of fluctuations will tend to average to zero and Cx,y will be small. Thus, when Cx,y is negligibly small, the variables x and y are described as statistically independent or as uncorrelated. It is often impractical to repeat measurements many times. We must then estimate the uncertainties in various quantities by other means. For example, if we are using a ruler, the uncertainty in length will be about half the smallest division. In the absence of contrary information, we usually assume that random fluctuations in different quantities are independent and omit the covariance. The error propagation formula then reduces to 2 2 i∑f y i∑f y Hd f L2 = jj ÅÅÅÅÅÅÅÅÅÅ dxzz + jj ÅÅÅÅÅÅÅÅÅÅ d yzz + ∫ k ∑x { k ∑y {

where we use the notation dx to represent an uncertainty instead of sx because we use an estimated uncertainty instead of an observed variance. This formula can be extended to an arbitrary number of statistically independent variables whose contributions to the net uncertainty are said to add in quadrature because fluctuations sometimes add and sometimes subtract. Each term is a partial uncertainty determined by the uncertainty in one variable and the rate of change with respect to that variable. Notice that if the partial uncertainties vary significantly in size, only the largest contributions matter because squaring before adding strongly emphasizes the larger terms. For example, suppose that d f consists of six contributions where one term is five units and the other five terms are each one unit, such that Hd f L2 = H5L2 + H1L2 + H1L2 + H1L2 + H1L2 + H1L2 ï d f = 5.5

The total contribution of the five smaller terms is only one tenth the contribution of the single largest term. Thus, the net uncertainty ƒƒ ∑ f ƒƒ ∑ f ƒƒ ƒƒ d f § †ƒ ÅÅÅÅÅÅÅÅÅÅ dx§ƒ + †ƒ ÅÅÅÅÅÅÅÅÅÅ d y§ƒ + ∫ ƒ ∑x ƒ ƒ ∑y ƒ

is less than the linear sum of partial uncertainties. When designing an experiment, identify the dominant partial uncertainties and attempt to minimize them; the smaller terms do not require as much attention if their contribution to the quadrature sum is negligible. A couple of simple examples are listed below. Here a, b, m, n, l are considered exact numbers while x, y are experimental quantities measured with finite precision. f = a x + b y ï Hd f L2 = Ha dxL2 + Hb d yL2

2 2 dx 2 idf y i dy y f = a xm yn ï jj ÅÅÅÅÅÅÅÅÅÅ zz = Jm ÅÅÅÅÅÅÅÅÅ N + jjn ÅÅÅÅÅÅÅÅÅ zz x k f { k y {

ErrorPropagation.nb

4

f = a Exp@-l xD ï d f = †l f § dx

ü example: measuring g with a pendulum The period, T, of a simple pendulum is related to its length, L, by L ÅÅÅÅÅÅ T = 2 p $%%%%%% g Therefore, if we measure L and T, we can deduce the gravitational acceleration, g, using dL 2 %%%%%%%%%%%%%%%% L dg 2 dT %%%%2% $%%%%%%%%%%%%%%%% g = 4 p2 ÅÅÅÅÅÅÅÅÅ J ÅÅÅÅ Å ÅÅÅ Å N ï ÅÅÅÅ Å ÅÅÅÅ = + J ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅ N L g T T2 Notice that the relative uncertainty in the period carries a greater weight than the precision of the length because it enters the formula for g with a larger power.

ü example: mean of N measurements Suppose that we make N observations of the random variable x and compute its mean value 1 êê xê = ÅÅÅÅÅÅÅ ‚ xi N i=1 N

What is the uncertainty in the mean? If we assume that the uncertainty, dx, is the same for each observation, then N N 2 êê dxi 2 HdxL2 dx ij ∑ x yz êê ê 2 Hd x L = „ j ÅÅÅÅÅÅÅÅÅÅÅ dxi z = „ J ÅÅÅÅÅÅÅÅÅÅ N = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ï d êê xê = ÅÅÅÅÅÅÅÅ ÅÅÅÅ!ÅÅ è!!!! N N ∑ x k i { N i=1

i=1

Therefore, the uncertainty in the mean is smaller than the uncertainty in a single observation by a factor of 1 ë

è!!!!! N.

ü example: weighted mean Next consider the weighted mean xi 1 êê xê = „ ÅÅÅÅÅÅÅÅ2ÅÅÅ ì ‚ ÅÅÅÅÅÅÅÅ2ÅÅÅ si s i i i=1

where the uncertainties in each observation may be different. Notice that the terms with the smallest uncertainty carry the most weight. The uncertainty in the weighted mean can be evaluated using standard error propagation to be Hsêêxê L2

‚i=1 Hsi -2 si L 1 %%%%%%%%%% ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅ ÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ ï sêêxê = $%%%%%%%% 2 -2 -2 s ⁄ H⁄i si L i i 2

ErrorPropagation.nb

Notice that if uncertainties are uniform, such that si = dx is the same for each observation, then this result is the same as the preceding result for the unweighted average.

5