Propagation of error for multivariable function

21
Propagation of error for multivariable function Now consider a multivariable function f(u, v, w,…). If measurements of u, v, w,. All have uncertainty δu, δv, δw, …., how will this affect the uncertainty of the function? + + + = L text) of (3.48) (Equation w w f v w f u u f f δ δ δ δ + + + ± = L w w f v w f u u f ) .... , w , v , f(u f 0 0 0 δ δ δ This works for cases like systematic errors, when the errors of most of the variables have the same sign. For cases like random errors, this overestimate and give an upper bound of the actual error: bound of the actual error: W ill t d th f d lt i th w w f v w f u u f f L + + + δ δ δ δ W e will study the case of random error later in the course.

Transcript of Propagation of error for multivariable function

Page 1: Propagation of error for multivariable function

Propagation of error for multivariable function

Now consider a multivariable function f(u, v, w,…). If measurements of u, v, w,. All have uncertainty δu, δv, δw, …., how will this affect the uncertainty of the function?

+∂∂

+∂∂

+∂∂

= L text)of (3.48)(Equation wwf v

wf u

u f f δδδδ

⎟⎟⎠

⎞⎜⎜⎝

⎛+

∂∂

+∂∂

+∂∂

±=∴ L w wf v

wf u

u f ) .... , w,v,f(u f 000 δδδ

This works for cases like systematic errors, when the errors of most of the variables have the same sign. For cases like random errors, this overestimate and give an upper bound of the actual error:bound of the actual error:

W ill t d th f d l t i th

w wf v

wf u

u f f L+

∂∂

+∂∂

+∂∂

≥ δδδδ

We will study the case of random error later in the course.

Page 2: Propagation of error for multivariable function

Example

If f = x – y, calculate δf in terms of δx and δy.

y y f x

xf f δδδ

∂∂

+∂∂

=

y1x1

y y

y)-(x x x

y)-(x

δδ

δδ

−+=

∂∂

+∂

∂=

y x y1 x 1

δδδδ

+=

+

Add not subtractAdd, not subtract

Page 3: Propagation of error for multivariable function

Example

If f = xyz, calculate the fraction error in f.

fff ∂∂∂

(xyz)(xyz)(xyz)

z z f y

y f x

xf f δδδδ

∂∂∂

∂∂

+∂∂

+∂∂

=

z xy y xz x yz

zz

(xyz) y y

(xyz) x x

(xyz)

δδδ

δδδ

++=

∂∂

+∂

∂+

∂∂

=

xyzz xy y xz x yz

ff

δδδ

δδδδ ++=∴

zz

yy

x x δδδ

++=

For product of variables the resultant fraction error is the sum of the fractionFor product of variables, the resultant fraction error is the sum of the fraction errors of the variables. 

Page 4: Propagation of error for multivariable function

Example (Problem 3.7(d) of text)A t d t k th f ll i tA student makes the following measurement:a = 5 ± 1 cm, b = 18 ± 2 cm, c = 12 ± 1 cm, t= 3.0 ± 0.5 s, m= 18 ± 1 gramCompute the quantity mb/t with its uncertainties and percentage uncertainties

mb

t tf b

b f m

m f f

t

mb f

∂∂

+∂∂

+∂∂

=

=

δδδδ

g/s-cm 5.03

181823

1813

18

tt

mbb tm m

tb

2

2

⎟⎠⎞

⎜⎝⎛ ×

×+×+×=

−++= δδδ

/110/1081818mbf

g/s-40cm g/s-36cm

333

×≈=

⎠⎝

g/s-cm 40 110 f

g/s-cm110g/s-cm1083

t

f

±=∴

≈===

40% 36% %10011040 y uncertaint Percentage ≈=×=

Page 5: Propagation of error for multivariable function

Topics Part 1 – Single measurement

1.  Basic stuff (Chapter 1 and 2)2. Propagation of uncertainties (Chapter 3)

Part 2 – Multiple measurements as independent results

1. Mean and standard deviation (Chapter 4)2. Basic on probability distribution function (not in text explicitly)3. The Binomial distribution (Chapter 10)4. The Poisson distribution (Chapter 11)5. Normal distribution (first half of Chapter 5)6. χ2 test – how well does the data fit the distribution model? (Chapter 12)

Part 3 – Multiple measurements as one sample

1. Central limit theorem (not in text explicitly)2. Normal distribution (second half of Chapter 5)3. Propagation of error (Chapter 3)4. Rejection of data (Chapter 6)5. Merging two sets of data together (Chapter 7)

Part 4 ‐ Dependent variablesPart 4  Dependent variables

1. Curve fitting (Chapter 8)2. Covariance and correlation (Chapter 9)

Page 6: Propagation of error for multivariable function

Mean and standard deviationMean and standard deviationThe mean and variance of a collection of data of sample size N are defined as:size N are defined as:

x ondistributisampleofmean x

i

N

1i∑===

tmeasuremen theof variance N

p

N

2 =σ

N

)x-(x

2i

1i∑==

deviation standard thecalled is N

)x-(x 2i

N

1i∑==σ

N

Page 7: Propagation of error for multivariable function

ExampleExample

3.74.34.23.94.54.03.7}4.3,4.2, 3.9,4.5,{4.0,dataofcollection aConsider

+++++

4.1 6

24.6

63.74.34.23.94.54.0 Mean

==

+++++=

4.1)-(3.74.1)-(4.34.1)-(4.24.1)-(3.94.1)-(4.54.1)-(4.0

deviationStandard

6

222

222

+++

++

0.07 6

0.42

6deviation Standard

==

=

of range in the fallprobably t willmeasuremennext expect the We

0.26 6

=

0.264.1 ±

Page 8: Propagation of error for multivariable function

Two Definitions of Standard DeviationTwo Definitions of Standard Deviation

2N

N

)x-(x 2i

1i∑==σ is called the population standard deviation

1N

)x-(x 2i

N

1i∑==σ is called the sample standard deviation

1-N

For large N, population standard deviation ≈ sample standard deviation.  At this point, we will use population standard deviation, but later sample standard deviation will become more important.p

Page 9: Propagation of error for multivariable function

Population Standard DeviationPopulation Standard Deviation

)x-(x 2i

N

N

)x(xi1i∑==σPopulation standard deviation                             is a measure 

of the actual spread of the dataof the actual spread of the data.

When the sample size is N=1, the population standard deviation equals to 0, because there is no spread in the data.  However, this does not mean this is a good collection of data.data.

Page 10: Propagation of error for multivariable function

HistogramFrequency N

Variable xbin

Assuming all bins have the same size, if you do one more measurement, probability for itsAssuming all bins have the same size, if you do one more measurement, probability for its value to fall in bin i = Pi .  This is probably the best you can guess from the data. N

N N

N i

jj

i ==∑

Page 11: Propagation of error for multivariable function

Normalized Histogram

Variable xAssuming all bins have the same size, you can just read Pi from the vertical axis of a normalized histogram.

Note that 1P =∑Note that  1 P j

j =∑

Page 12: Propagation of error for multivariable function

Probability Density Function

When N →∞, we can make the P(x)bin size → 0 (=dx).  When this happens, the normalized histogram  will become a probability density function:probability density function:

Pi → P(x)dx

∫∑ 1dx P(x) 1Pj

j =⇒= ∫∑

Random variable x

Unfortunately, we will never know P(x) because it is impossible to satisfy N →∞.

Page 13: Propagation of error for multivariable function

ExamplepFor a fair dice, the probability distribution function is discrete for integers from 1 to 6:

P(x)

1/6

xx

1 2 3 4 5 6

Page 14: Propagation of error for multivariable function

ExamplepConsider probability density function:

P(x)

11

xx0

1 2

0.51and0.5between occur for x toy Probabilit 0.005 0.01 0.5

y=×≈

Page 15: Propagation of error for multivariable function

Normalization condition of the probability density functionprobability density function

:case Discrete].x,[xx If ba∈

1 )x(p bi

i

xx

xx=∑

=

=

:case Continuousb

ai

x

xx =

1 dx )x(p b

a

x

x

=∫

Page 16: Propagation of error for multivariable function

ExamplepFor a fair dice, the probability distribution function is discrete for integers from 1 to 6:

P(x)

1/6

xx

1 2 3 4 5 6

1111116

∑ 161

61

61

61

61

61 )x(p i

1xi

=+++++=∑=

Page 17: Propagation of error for multivariable function

ExampleConsider probability density function:

P(x)

11

xx01 2

2xx2

2x dx x)(2 dx x dx P(x)

221221

⎥⎦

⎤⎢⎣

⎡−+⎥

⎤⎢⎣

⎡=−+= ∫∫∫

212

244 0

21

22 1010

⎥⎦

⎤⎢⎣

⎡⎟⎠⎞

⎜⎝⎛ −−⎟

⎠⎞

⎜⎝⎛ −+⎥⎦

⎤⎢⎣⎡ −=

⎦⎣⎦⎣∫∫∫

123

24

21 =−+=

Page 18: Propagation of error for multivariable function

ExampleExampleA fair dice is thrown, if the out come is 1, I pay you $5.9.  Otherwise, you pay me $1.00.  What is the expectation of your earning?

x∈{1,2,3,4,5,6}.  If f(x)= your earning,.  f(1) = 5.9, f(2)=f(3)=f(4)=f(5)=f(6)=‐1.0

Since the dice is fair, p(1)=p(2)=p(3)=p(4)=p(5)=p(6)=1/6

f( ) $5 9/6 $1 0/6 $1 0/6 $1 0/6 $1 0/6 $1 0/6∴<f(x)>=$5.9/6‐$1.0/6 ‐$1.0/6 ‐$1.0/6 ‐$1.0/6 ‐$1.0/6

=$5.9/6‐$5.0/6 

= $0.15

∴ I expect you to earn $0.15 per game. 

Page 19: Propagation of error for multivariable function

MeanMeanThe mean of a distribution p(x) is just the expectation of x, <x> or x.

].,[x x If a∈ bx

)x(pxx

:caseDiscrete

∑=><= bi xx

:case Continuous

)x(px x ∑=><= ai

iixx

dx )x(xp x ∫=><bx

ax

Page 20: Propagation of error for multivariable function

ExamplepFor a fair dice, the probability distribution function is discrete for integers from 1 to 6:

P(x)( )

1/6

x

1 2 3 4 5 6

)x(px xMean ii

6

1x=>< ∑

=The mean is the average f l f

3.5621

66

65

64

63

62

61

1xi

==+++++=

= face value after many trials.

Page 21: Propagation of error for multivariable function

ExampleConsider probability density function:

P(x)

11

xx01 2

xxd)(dd( )23

2132

21 ⎤⎡⎤⎡

∫∫∫

1241118401

3xx

3x dxx)x(2dx xdx xP(x) x

1

2

01

2

0

=−+=⎥⎦

⎤⎢⎣

⎡⎟⎠⎞

⎜⎝⎛ −−⎟

⎠⎞

⎜⎝⎛ −+⎥⎦

⎤⎢⎣⎡ −=

⎥⎦

⎤⎢⎣

⎡−+⎥

⎤⎢⎣

⎡=−+==>< ∫∫∫

333333 ⎥⎦

⎢⎣

⎟⎠

⎜⎝

⎟⎠

⎜⎝⎥⎦⎢⎣