NOTES ON UNCERTAINTY ANALYSIS FOR MEL LABS by Matt Young For more detail, see also http://www.mines.edu/Academic/courses/physics/phgn471/uncertainty.pdf Copyright © 2002 by Matt Young. All rights reserved. Matt Young’s Home Page 1. Definitions Error = deviation from True Value Uncertainty = estimate of probable error 2. Types of uncertainty • Measured or statistical uncertainty • • for fluctuating or random variables All other uncertainties • for variables whose statistics are not known • calculated from estimates • include but not limited to systematic errors wpdocs/mel 2\uncert3.wpd. page 1 3. Uncertainty due to measured or statistical errors • Data are noisy, as due to voltage fluctuations • Temporarily ignore other sources of uncertainty • Measurand = quantity to be measured • Individual measured values are mi • Mean = µ, calculated from mean of data set • N = number of data points • True value = M = ??? • µ is called an estimator of M Calculate the standard deviation of the mean, or SDOM: N σm = • ∑ i =1 (mi − µ ) 2 N ⋅ ( N − 1) )m is the standard uncertainty due to random errors alone • )m decreases in proportion to (N) wpdocs/mel 2\uncert3.wpd. page 2 4. Significance of standard uncertainty ) • M falls between µ – ) and µ + ) with 68 % probability • • 68 % confidence interval M falls between µ – 2) and µ + 2) with 95 % probability • • 95 % confidence interval M falls between µ – 3) and µ + 3) with 99.7 % probability • 99.7 % confidence interval Half the battle is learning the vocabulary! wpdocs/mel 2\uncert3.wpd. page 3 Cheap and dirty way to estimate ) • Calculate the maximum value of the dataset minus the minimum value • Divide by 6·(N) • Result is a fair estimate of ) • Use to check your calculation ¡Important note! ) is the 68 % confidence interval; the ’s below are your best estimates of 99.7 % confidence intervals. They are not directly comparable. wpdocs/mel 2\uncert3.wpd. page 4 5. Estimated errors (all other errors) • Usually errors whose statistics are not known P artial U n certain ty = + ( G u essin g ) A n alysis D ifferen tiatio n Suppose m = m(a,b,c) & we calculate m by measuring a, b, & c Let a = extreme value of error of a • ½ scale division, for example, or • mechanical tolerance in a part, for example a is • an estimate or a guess • of the 99.7 % confidence interval Estimate error m of m due to error a of a: ∂m ∆m a = ⋅ ∆a ∂a • • Assumes a << a a = half-width of 99.7 % confidence interval & is • always positive • not the standard uncertainty or standard deviation wpdocs/mel 2\uncert3.wpd. page 5 6. Relative error Often, m = K·a (where K may be a function of b, c, ...) • Given a, calculate confidence interval of m: ∂ ∆m a = ( K a ) ⋅ ∆a = K ⋅ ∆a ∂a But K =m / a ∆m ∆a = so m a Best estimator of m is its mean µ, so we write ∆m a ∆a = a µ Similarly, if • a is a random variable, and • we measure µa and )a • then σm σa = µ µa where m means the measurand wpdocs/mel 2\uncert3.wpd. page 6 7. Painless uncertainty analysis • When m is not a strong function (such as an exponential) of a, b, c • • Estimate a, b, c, ... • Calculate a/a, b/b, c/c, ... • Include only the largest in your analysis We will use the ’s below to calculate standard uncertainties • Note: If m = Kan, then, similarly ∆m a ∆a =n⋅ a µ The relative error ma /µ of m due to a is proportional to the relative error of a itself wpdocs/mel 2\uncert3.wpd. page 7 8. Example 1 from MEL 2 Yield stress: Y = p ⋅S / A Y = yield stress p = measured pressure at yield S = area of piston A = area of wooden block • Calculate component of uncertainty due to area of block • A = a2, where a = 1.5 in • Guess: 1 ∆a = in ≅ 0 .0 3 in 32 ∆A a ∆a 0 .0 3 in =2 =2 ⋅ = 0 .0 4 1.5 in A a • Similarly, S = π D 2 / 4 , D = 8 .7 5 in G u ess: ∆D = 0 .0 1 5 in ∆S D / S = 2 ∆D / D = 0 .0 0 3 • Ignore D in calculating Y wpdocs/mel 2\uncert3.wpd. page 8 How to calculate )p from the calibration curve 105 Pressure, ksi p + sigma meas 100 p meas 95 90 V meas 85 2.0 2.2 2.4 2.6 2.8 3.0 Voltage, V Figure 1. Calibration curve. • Use the Excel spreadsheet to • Calculate line of best fit (solid line) • Find voltage Vmeas, as at yield stress, calculate corresponding pressure pmeas • Use calculation of 68 % confidence interval (dashed curves) to estimate the standard deviation ) wpdocs/mel 2\uncert3.wpd. page 9 Now back to Example 1 Y = p ⋅ S / A = 2 6 0 0 k si , from above By partial differentiation, ∆Y S = ∆S ⋅ p / A ∆Y A = ∆A ⋅ p S / A 2 • S = 60 in2, S = 0.003·S, from above; YS = 8 ksi; small as predicted • • A = 0.04·A, from above YA = 108 ksi We do not have to estimate p, since we can measure )p = 2 ksi from the calibration curve. Thus, u p =σp ⋅S / A , where up is the component of uncertainty of Y due to the uncertainty )p of p, and up = 50 ksi wpdocs/mel 2\uncert3.wpd. page 10 9. Uncertainties at last! (a) Type A or measured uncertainties • Standard uncertainty ur = the SDOM, that is, • ur = ) • r stands for “random” (b) Type B uncertainties, or all other uncertainties • Estimate 99.7 % confidence interval ma, mb, mc, ..., as above • Assume uniform distribution of errors (not Gaussian) • Standard deviation of uniform distribution with half-width ma is ma/(3) • Define standard uncertainties as ua = ma/(3), ub = mb/(3), ... wpdocs/mel 2\uncert3.wpd. page 11 Back to Example 1 yet again • Type A (measured) uncertainty up = 50 ksi • Type B (all other) uncertainties YS = 8 ksi and YA = 108 ksi, so uS = (8 ksi)/(3) and uA = (108 ksi)/(3), so uS = 5 ksi and uA = 62 ksi wpdocs/mel 2\uncert3.wpd. page 12 10. Combined standard uncertainty • Uncertainties are added in quadrature (sum of squares) u c = u 12 + u 22 + u 32 + • uc is the combined standard uncertainty • Note that there may be more than 1 source of random uncertainty 11. Expanded uncertainty • uc is multiplied by a coverage factor, usually 2 • Express experimental results as µ ± 2 uc • 2 uc is the expanded uncertainty • The interval 2 uc defines the 95 % confidence interval • The True Value is presumably within the interval µ ± 2 uc, with 95 % probability wpdocs/mel 2\uncert3.wpd. page 13 Example 1, one last time! Table 1. Compilation of standard uncertainties Source of uncertainty Type of uncertainty Standard uncertainty, ksi Measurement of pressure Measured (Type A) Area S of piston Other (Type B) 5 Area A of block Other (Type B) 62 Combined standard uncertainty 80 Expanded uncertainty 160 50 Thus, • Y = 2600 ± 160 ksi Note the use of round numbers for uncertainties and the correct number of significant digits in the expression for Y wpdocs/mel 2\uncert3.wpd. page 14 12. Example 2. Uncertainty of Young’s modulus • Slope of curve of ) vs. Standard deviation of the slope of a line y = A + Bx • Fitted equation is • Standard uncertainty )B of the slope B is σ B2 = N σ y2 / ∆ , w h ere 1 2 σy = N −2 N ∑( y i =1 N ∆= N ∑x i =1 i − A − B xi ) 2 , N 2 i −( ∑x ) i =1 2 i John Taylor, Introduction to Error Analysis, University Science Books, Mill Valley, California, latest edition. • Use slope uncertainty when interested in slope as such (as when measuring Young’s modulus) • Use confidence interval of line when interested in uncertainty of quantity on y-axis (such as displacement or pressure) wpdocs/mel 2\uncert3.wpd. page 15 Estimated (Type B) uncertainties • Formulas estimate uncertainty due to random errors only, not calibration uncertainties of axes E =σ / ε ∆E σ / E = ∆σ / σ (Here ) means stress not SDOM) ∆E ε / E = ∆ε / ε • Assume that electronics introduce negligible error • Write down a number for L, where L is any length measurement. (Hint: what is the least count of the dial indicator?) • • Calculate for a representative value of Similarly, write down F, where F is a force measurement, and calculate ) • Calculate the appropriate E’s, divide by (3), and combine in quadrature Details are left as a proverbial exercise for the student wpdocs/mel 2\uncert3.wpd. page 16 13. Example 3 from MEL 2 Use displacement sensor to measure E of steel specimen • Measured displacement = elongation of specimen + elongation of shafts holding specimen, or • d m = d sp + d sh • Measure dm [Here d is displacement; L is original length] • Calculate d sh = L sh × εsh , w h ere εsh = F / ( A sh × E sh ) Assume Esh = 3 ×107 ± 3 ×106 psi (that is, ±10 %) • F = 6000 lb, Ash = 2 in2, Lsh = 10 in • Then dsh = 1 mil • Subtract systematic error, or bias, dsh from [1 mil = 10-3 in] measured value dm wpdocs/mel 2\uncert3.wpd. page 17 Example 3, continued • Calculate confidence interval of correction, assuming that Esp = 107 psi, F = 6000 lb, Lsp = 10 in • • 99.7 % confidence interval dm of bias: • Suppose εsp = 3 × 1 0 −3 (measured) • • ∆d sh = 0 .1 × d sh (Why?) ∆εsp = ∆d sh / L sp ... (Why?) ... = 10-5 • ∆E sp / E sp = ∆εsp / εsp ; ∆E sp = 1 ×1 0 5 3 Standard uncertainty of E due to : uε = 1 × 1 0 5 / 3 ≈ 1 9 0 00 p si 3 • Around 0.2 %, for the made-up numbers I have chosen wpdocs/mel 2\uncert3.wpd. page 18