Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a...

39
dr hab.inż. Katarzyna Zakrzewska, prof.AGH Katedra Elektroniki, AGH e-mail: [email protected] http://home.agh.edu.pl/~zak Lecture 1. Uncertainty in measurements Introduction to probability and statistics Introduction to probability and statistics. lecture 1 1

Transcript of Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a...

Page 1: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

dr hab.inż. Katarzyna Zakrzewska, prof.AGH Katedra Elektroniki, AGHe-mail: [email protected]

http://home.agh.edu.pl/~zak

Lecture 1.Uncertainty in measurements

Introduction to probability and statistics

Introduction to probability and statistics. lecture 1 1

Page 2: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

http://physics.nist./gov/Uncertainty

Wyrażanie Niepewności Pomiaru. Przewodnik. Warszawa, Główny Urząd Miar 1999

In October 1992, a new policy on expressing measurement uncertaintywas instituted at NIST, National Institute of Standards and Technology.

Elaboration of Guide to Expression of Uncertainty in Measurement byInternational Organization for Standardization, ISO, 1993

Introduction to probability and statistics. lecture 1 2

Uncertainty in Measurements

Applicable to results associated with:

• international comparisons of measurement standards,

• basic research,

• applied research and engineering,

• calibrating client measurement standards,

• certifying standard reference materials, and

• generating standard reference data.

Page 3: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

MEASUREMENT

The result of a measurement is only an approximation orestimate of the value of the specific quantity subject tomeasurement, the measurand which can be classified as:

simple, orcomplex

Example: Mathematical pendulum, l – the length, T – period aresimple measurands; measured directly

Determination of gravitational acceleration : g-complex measurand

gl2T π=

Introduction to probability and statistics. lecture 1 3

Page 4: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

In the course of measurements values different fromthose predicted by theory are obtained. The source ofdiscrepancies between theory and experiment can betraced back to imperfections due to:-experimentalist,-measuring equipment,-object measured

More perfect the experiment is made, discrepanciesdecrease. Error, uncertainty can be reduced.

MEASUREMENT

Introduction to probability and statistics. lecture 1 4

Page 5: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Result of a measurement should be given in one ofthe following forms:

2m/s9,866(28)g =

C103)(98F 3⋅±=

Example: In an experiment, the electrochemical equivalent k was found to be:

k=0,0010963 g/C

∆k=0,0000347 g/C

How one can express this result?

significant digits Non-significant digits

Answer. k= (0,00110 ± 0,00004) g/C or k= 0,00110(4) g/C Introduction to probability and statistics. lecture 1 5

Page 6: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Absolute error

xi – experimental result, x0 – real value

Relative error:

0ii xxx −=Δ

0

i

xxΔ

(1)

(2)

Uncertainty / error

Note: real values of measurand are unknown in most cases

Introduction to probability and statistics. lecture 1 6

Page 7: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Uncertainty

Quantities given by formulas (1) and (2) are singularrealization of random variable which is why theycannot be treated by theory of uncertainty.Practically, we do not know real values and estimateuncertainties, due to dispersion of results, from thelaws of statistics.

Uncertainty is• a parameter related to the result of

measurements,• characterized by dispersion• assigned to the measurand in a justified way.

Introduction to probability and statistics. lecture 1 7

Page 8: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Absolute uncertainty u is expressed in the same units

as a measurand

Symbols: u or u(x) or u(concentration of NaCl)

Relative uncertainty ur(x) the ratio of absolute

uncertainty to the measured value:

xxuxur)()( =

Relative uncertainty has no units and can be expressed in %

Introduction to probability and statistics. lecture 1 8

Absolute and relative uncertainty

Page 9: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Measures of uncertainty

There exist two measures:

standard uncertainty u(x)maximum uncertainty ∆x

x0

x

x0-u(x) x0+u(x)

x0-Δx x0+Δx

Introduction to probability and statistics. lecture 1 9

Page 10: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Standard uncertainty

Generally accepted and suggested.

1. Distribution of random variable xi, with a dispersion around the average x is characterized by standard deviation defined as:

2. Exact values of standard deviation are unknown. Standard uncertainty represents an estimate of standard deviation.

( )n

xx 2i

nlim ∑ −

=σ∞→

Introduction to probability and statistics. lecture 1 10

Page 11: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Maximum uncertainty

Deterministic measure.

Within this interval:x0 - ∆x < xi < x0 + ∆x

all the results xi, will fall.

It is recommended to replace the maximum uncertainty by a standard uncertainty:

3x)x(u Δ

=

Introduction to probability and statistics. lecture 1 11

Page 12: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Classification of errors

Results of measurements follow some regular patterns i.e. they

are distributed in a way typical for random variables. According to

distribution functions and sources of errors one can distinguish:

Gross errors (mistakes) that have to be eliminated

Systematic error that can be reduced when improving the

measurement

Random errors that result from numerous random

contributions and cannot be eliminated; they should be

treated within the formalism of statistics and probabilistics.

Introduction to probability and statistics. lecture 1 12

aa1aa2

Page 13: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Slajd 12

aa1 aaa; 2015-03-31

aa2 aaa; 2015-03-31

Page 14: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Distribution functions

x xx0

x x0=x

Φ(x)Φ(x)

Systematic error Random error – Gauss distribution function

Introduction to probability and statistics. lecture 1 13

Φ(x) – probability density function

Page 15: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Analysis of uncertainties

Type AAll methods that use statistical approach:•large number of repetitions is required• applies to random sources of errors

Type BIs based on scientific estimate performed by the

experimentalist that has to use all information on the measurement and the source of its uncertainty

• applies when the laws of statistics cannot be used •for a systematic error or for a single result of

measurement

Introduction to probability and statistics. lecture 1 14

Page 16: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

TYPE A

Introduction to probability and statistics. lecture 1 15

Page 17: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Example: We have performed a series of measurements getting the following results x1,x2, ….xn.In such a sample that can be considered as big some of the results are the same; nkis a number of random experiments, in which the same result xk has occurred.nk/n is a frequency of the result

xk nk nk/n

5,2 1 0,0115,3 1 0,0115,4 2 0,0215,5 4 0,0435,6 7 0,0755,7 10 0,1065,8 14 0,1495,9 16 0,1706,0 13 0,1386,1 12 0,1286,2 6 0,0646,3 4 0,0436,4 3 0,0326,5 1 0,011

Sum 94Introduction to probability and statistics. lecture 1 16

Page 18: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Analysis of data

5,2 5,4 5,6 5,8 6,0 6,2 6,40

2

4

6

8

10

12

14

16

nk

xk

H is togramArithmetic average

x=5,9

Standard uncertainty

( )1

)(2

−−

== ∑n

xxxu iσ

σ=0,2

n

xx

n

ii∑

== 1

Introduction to probability and statistics. lecture 1 17

Standard uncertainty of the average( )

)1n(nxx

)x(u2

i

−−

= ∑

Page 19: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Gauss distribution function

Probability density function for the result x or its error Δxaccording to Gauss

x0 is the most probable result and can be represented by the arithmetic average, σ is standard deviation, σ2 is variance

⎟⎟⎠

⎞⎜⎜⎝

⎛ −−=Φ 2

20

2)(exp

21)(

σπσxxx

Introduction to probability and statistics. lecture 1 18

Page 20: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Normal distribution

2σ95.4 % 99.7 %

x

Φ(x

)

Within the interval x0-σ < x < x0+σ we find 68.2 % (2/3), For x0-2σ < x < x0+2σ - 95.4 %For x0-3σ < x < x0+3σ - 99.7 %

of all results

68.2% pow.

Introduction to probability and statistics. lecture 1 19

Page 21: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

0 5 10 15 20 25 300

1

2

3

Φ(x)

x

x0=15σ=2 σ=5

Bigger σ means higher scatter of the results around its average, smaller precision.

Introduction to probability and statistics. lecture 1 20

Gauss distribution function

Page 22: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

TYPE B

Introduction to probability and statistics. lecture 1 21

Page 23: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

A type B evaluation of standard uncertainty is usually based on scientific judgement using all the relevant information available, which may include: • previous measurement data,• experience with, or general knowledge of, the

behavior and property of relevant materials and instruments,

• manufacturer’s specification• data provided in calibration and other reports• uncertainties assigned to reference data taken from

handbooksType A evaluations of uncertainty based on limiteddata are not necessarily more reliable than soundlybased Type B evaluations.

Introduction to probability and statistics. lecture 1 22

TYPE B

Page 24: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Example: Type B uncertainty of pendulum lengthmeasurement.

Using a ruler the following results were obtained:L=140 mm, u(L)=1 mm (elemental scale interval),ur(L)=u(L)/L=1/140, percentage uncertainty 0,7%

Most often the type B deals with evaluation ofuncertainty resulting from a finite accuracy ofan instrument.

Introduction to probability and statistics. lecture 1 23

TYPE B

Page 25: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Uncertainty of complex measurand – propagation of errors

0 2 4

0

20

40

60

80

100

120

140

y

x

u(y)

u(x)

function

y = f(x)tangent dy/dx

)x(udxdy)y(u =

Introduction to probability and statistics. lecture 1 24

Page 26: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Total differential

For a complex measurand y=f(x1,x2,...xn) underthe assumption that Δx1 , Δx2 , ... Δxn are smallas compared with measured x1,x2, ... xn,maximum uncertainty of y can be calculated fromthe differential calculus :

nn

xxyx

xyx

xyy Δ

∂∂

++Δ∂∂

+Δ∂∂

=Δ ...22

11

(3)

Introduction to probability and statistics. lecture 1 25

Page 27: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Law of propagation of uncertainties

Standard uncertainty of complex measurandy=f(x1,x2,...xn) can be calculated from the lawof propagation of uncertainties as a geometricsum of partial differentials.

22

22

2

11

)(...)()()( ⎥⎦

⎤⎢⎣

∂∂

++⎥⎦

⎤⎢⎣

⎡∂∂

+⎥⎦

⎤⎢⎣

⎡∂∂

= nn

c xuxyxu

xyxu

xyyu

yyuyu c

cr)()( =

Introduction to probability and statistics. lecture 1 26

Page 28: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Example

In a certain experiment one determines gravitational acceleration g on Earth by measuring the period T and length L of a mathematical pendulum. Directly measured length is reported as 1.1325±0.0014 m. Independently estimated relative uncertainty of period measurement is 0,06%, i.e.,

4r 106

T)T(u)T(u −⋅==

Calculate the relative uncertainty of g assuming that the uncertainties of L and T are independent and result from random sources of errors.

Introduction to probability and statistics. lecture 1 27

Page 29: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

0 40 80 120 160 200 240 280 32060708090

100110120130140150160170180

Rules applied to data plotting

Is this graph made according to the rules?

1. Mark the experimental points!!!

Introduction to probability and statistics. lecture 1 28

Page 30: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

2. Measurement uncertainty is missing

0 40 80 120 160 200 240 280 32060708090

100110120130140150160170180

Introduction to probability and statistics. lecture 1 29

Page 31: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

3. Adjust the axis to the range of experimental data!!!

0 40 80 120 160 200 240 280 32060708090

100110120130140150160170180

Introduction to probability and statistics. lecture 1 30

Page 32: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

4. Properly describe the axes and choose the scale in order to read the data easily.

160 200 240 280 32060708090

100110120130140150160170180

What quantity is represented by this axis???Introduction to probability and statistics. lecture 1

31

Page 33: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

5. Do not connect the experimental points bypolygonal chains!!! If the theoretical model isknown, it is advised to make a fit to theexperimental data.

160 200 240 280 32060

90

120

150

180 ρ

[μΩ

cm

]

T [K]Introduction to probability and statistics. lecture 1

32

Page 34: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

160 200 240 280 32060

90

120

150

180 dane eksperymentalne dopasowanie

ρ [μ

Ω c

m]

T [K]

6. Take care of the esthetic aspect of your plot(legend, frame, etc.)

Introduction to probability and statistics. lecture 1 33

experimental datatheoretical fit

Page 35: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

160 200 240 280 32060

90

120

150

180

dane eksperymentalne dopasowanie

ρ [μ

Ω c

m]

T [K]

Wykres 1Rezystywnosc ρ probki Bi w funkcji temperatury T

Introduction to probability and statistics. lecture 1 34

experimental datatheoretical fit

Fig.1Resistivity ρ of Bi sample as a function of temperature T

Page 36: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

Least Square Method - Linear Regression

4 6 8 10 12 14 160

20

40

60

f(xi)yi

x i

y

x

f(x)=ax+ba=3.23, b=-2.08

( )[ ] min2

2 =∑ +−=n

iii baxyS

Introduction to probability and statistics. lecture 1 35

Page 37: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

USEFUL HINTS

1. Results of laboratory measurements suffer from uncertainties, that the researcher is obliged to estimate according to certain rules.

2. In the first place, one has to find all possible sources of errors, keeping in mind that results with gross errors should not be taken into account. In student laboratory systematic errors usually mask random errors.

3. Multiple repetitions of measurement does not make sense when the systematic error predominates. In this case one should perform up to 3-5 measurements under the same conditions in order to make sure that the results are reproducible.

Introduction to probability and statistics. lecture 1 36

Page 38: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

4. When random events are the main source of errors, it is necessary to make sure that distribution of results can be described by Gauss function. If not, should one expect some other distribution function? In order to solve this problem one has to repeat the measurements (e.g. 100 times) under the same conditions, calculate the average and variance, draw a histogram, etc.

5. As a measure of uncertainty use rather standard uncertainty, scarcely maximum uncertainty.

6. In the case of complex measurand, one should apply laws of error propagation. An effort should be made in order to estimate the contributions to the total value of error coming from measurements of simple measurands. In order to achieve this goal one has to calculate relative uncertainties.

Introduction to probability and statistics. lecture 1 37

USEFUL HINTS

Page 39: Lecture 1. Uncertainty in measurementshome.agh.edu.pl/~zak/downloads/PS1.pdf · In October 1992, a new policy on expressing measurement uncertainty was instituted at NIST, National

7. Graph is quite important part of lab report (not only in the student’s laboratory). Graphs should be prepared according to certain rules, unambiguous description is required.

8. If a theoretical model of phenomenon under study is known, one should place a theoretical curve (continuous line) upon clearly distinguished experimental points (right size symbols should be chosen; experimental cross-bar errors should be included). Well-known methods of fitting should be applied.

9. Whenever possible, we can perform linearization of data, plotting e.g., y vs. ln (x), or log y vs. log x, or y vs. 1/x etc. To data prepared in such a way one can apply a method of linear regression.

Introduction to probability and statistics. lecture 1 38

USEFUL HINTS