35
 Laboratory in Physics I First day of Class Jiravatt Rewrujirek Department of Physics, Faculty of Science Kasetsart University September 11, 2014  

Physics Laboratory: Introduction to Statistical Analysis of Results

Embed Size (px)

Citation preview

Page 1: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 1/35

Laboratory in Physics IFirst day of Class

Jiravatt Rewrujirek

Department of Physics, Faculty of ScienceKasetsart University

September 11, 2014

Page 2: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 2/35

Nature of Measurements

How long is this pencil?

Figure : Using ruler to measure pencil’s length

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 2 / 35

Page 3: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 3/35

What do we know about this measurement?Most of you will tell that pencil’s length is between 36 mm and37mm. Uncertainty arises! A resolution of measuring instrument ruler is 1mm.Any values you obtained from this ruler should be at least 0.1 mm—Adevice’s precision .If you know a true value or reference value of this length, you can tellruler’s accuracy .Finally, you cannot tell the length of this pencil! due to misdenition,

nature of all measurements etc.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 3 / 35

Page 4: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 4/35

Figure : Precision and Accuracy

Probabilitydensity

Accuracy

P r ec ision Value

Reference value

Source: http://en.wikipedia.org/wiki/Accuracy and precision(August, 12 th 2014)

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 4 / 35

Page 5: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 5/35

Consider a measurement on voltage difference using the followingvoltmeter. Again, what do we know about this measurement?

Figure : Using voltmeter to measure a voltage difference across the resistor

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 5 / 35

Page 6: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 6/35

Page 7: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 7/35

Simple way to express accuracy

You can express the accuracy of the obtained value x by using relative error E p dened as

E p = x

−x ref

x ref (1)or in percentage format by multiplying with 100%.

Note: E p can be negative in cases that measured x is less that x ref .

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 7 / 35

Page 8: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 8/35

Comparison between values obtained from twomethods

If you measure a same quantity by using two different methods, you cantell a difference between these 2 values using relative difference given by

D p = |x 1 −x 2|(x 1 + x 2)/ 2. (2)

Again, you can express it in percentage by multiplying with 100%.

Note: These two relative quantity can be report appropriately inpercentage by writing them using 2 decimal places.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 8 / 35

Page 9: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 9/35

Signicant Figures

Signicant gures is the number obtained from the measuring instruments. (also the approximated digits)

The value reads from previous ruler is 36.7 mm. (3 signicant gures)# of signicant gures is the same whenever you express it usingprex or not, e.g. 36.7 mm and 0.0367 m has the same number of signicant digits.

Leading zeros are not counted as signicant digits.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 9 / 35

Page 10: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 10/35

Reporting the calculated value: Basics

Addition 1 2 . 7 6 8

+ 7 . 3 ? ?2 0 . 0 ? ?

Suitable way to state a sum of signicant gures # of decimal places of the answer should be equal to # of decimal placesof the least precised numbers.

Note that an answer is stated without considering # of signicant digits.It depends on the resolution of measuring device only!

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 10 / 35

Page 11: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 11/35

Multiplication

2 1 . 3 ?× 7 . 2 51 . 0 6 5 ?4 . 2 6 ?

+ 1 4 9 . 1 ?

1 5 4 . 1 ? ? ?

We should state the product as 154 whose uncertainty is least as possible. Rule of thumb I (product/quotient) The product and quotient between two signicant numbers should bestated using # of signicant digits as same as the least one.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 11 / 35

Page 12: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 12/35

Uncertainty of calculated value

Next thing, we seek for a propagation of uncertainties , the analysis of calculated value’s uncertainty.

Assume that the measured value of q can be written as

q = q best

±δ q

where q best is the best approximated value for q and δ q is the uncertaintyholds for this approximation.

We can add two measured quantities, x and y , and stated as

q = x + y = ( x best + y best ) ±(δ x + δ y ).

That is δ x + δ y is the maximum uncertainty of x + y .

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 12 / 35

Page 13: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 13/35

But when we analyze using statistical method, we found that the probable uncertainty of this sum is given by

δ (x + y ) = √ (δ x )2 + ( δ y )2 .

We can report this sum as

q = ( x best + y best ) ±√ (δ x )2 + ( δ y )2 (3)

which has more statistically signicant than using the ordinary sum.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 13 / 35

Page 14: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 14/35

Next, we consider a case of product or quotient. We use this rule of thumb for stating the uncertainty of product. Rule of thumb II (product/quotient) The fractional uncertainty of product between two measured values isthe sum of each one’s fractional uncertainty. This rule holds for the casethat the uncertainty is negligible compared to the best estimated value.

The fractional uncertainty of q = q best ±δ q is dened by

F (q ) ≡ δ q q best

. (4)

So we can write the rule of thumb II mathematically asF (xy ) ≈F (x ) + F (y ).

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 14 / 35

Page 15: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 15/35

Again, statistically analysis shows that the most probable uncertainty inproduct q between x and y is given by

F (q ) =

√ F 2(x ) + F 2(y ) (5)

orδ q = √ (y best δ x )2 + ( x best δ y )2 .

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 15 / 35

Page 16: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 16/35

Propagation of uncertainty in arbitrary functions of measuredvariables In general cases, we can nd the combined uncertainty of q (x 1 , x 2 , . . . , x n )using this following relation,

δ q (x 1 , x 2 , . . . , x n ) = ∂ q ∂ x 1

δ x 12

+∂ q ∂ x 2

δ x 22

+ · · ·+∂ q ∂ x n

δ x n2

(6)

where δ x i is the uncertainty in (x i )best .

Notice that this form of δ q is a function of all measured variables. If you want a numerical value of δ q, each of x i must be substituted by (x i )best .

From this equation, we obtain the uncertainty in powers of x asF (x n ) = nF (x ) (7)

for any rational n.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 16 / 35

Page 17: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 17/35

Repeated measurements: Normal distribution

When we make a set of measurements of the same quantity, thedistribution of measured value is normal by the central limit theorem inthe Statistics.

Normal distribution can be expressed mathematically by a Gaussianfunction f G (x ; X , σ) such that

f G (x ; X , σ) = 1σ√ 2π

exp −(x −X )2

2σ2

where X and σ is a parameter of center and width of the distributionrespectively.

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 17 / 35

Page 18: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 18/35

Figure : Normal distribution of two sets of parameters

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 18 / 35

Page 19: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 19/35

We interpret the area under the curve in the interval [a , b ] as theprobability of nding x in that interval. That is if P (a , b ) is theprobability of nding x between a and b then

P (a , b ) = ∫ b

af G (x ; X , σ) dx .

With some substitution and simplication, we obtain a special case of thisintegral as

P (X −t σ, X + t σ) = 1√ 2π ∫

t

− t exp −

z 2

2 dz

which is often called error function erf(t).

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 19 / 35

Page 20: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 20/35

Figure : Area under distribution curve is the probability of obtaining the valuethat falls in the interval

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 20 / 35

Page 21: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 21/35

Figure : Probability that a measurement of x will fall within t σ deviated fromtrue value

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 21 / 35

Page 22: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 22/35

Now, it’s time to ask that ‘What is X and σ?’ Using statistical analysis,we found that the best estimated value of X and σ is arithmetic mean

x and standard deviation of samples S x respectively.A standard deviation, the average deviation of measured value from the mean, of samples S x dened by

S x = 1

N −1 k (x k − x )2 (8)

where x is the arithmetic mean of N -values of measured x :x 1 , x 2 , . . . , x N dened by

x = 1N k

x k (9)

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 22 / 35

Page 23: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 23/35

Let’s see if these estimations have the uncertainty or not. Statisticalmethods, again, reveals that there is an uncertainty in this estimation.

If we make several sets of measurements which each set contains N measurements, we have x i , arithmetic of N values obtained in the i th setof measurements. By random effect , these means may be differ slightlyof dramatically. But the central limit theorem tells us that a distribution of these means is normal about the true value .

A distribution the mean has a width σx given by

σx = S x

√ N (10)

which is called standard deviation of the mean abbreviated as SDOM .That is, we can decrease the deviation of the mean form true value byincreasing the number of measurements! (By the factor of √ N )

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 23 / 35

Page 24: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 24/35

Figure : (dashed) The distribution of values obtained from a set of 10

measurements, (solid) The distribution of the means obtained from several sets of 10 measurements

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 24 / 35

Page 25: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 25/35

Extra: Interpretation of uncertainty in sum

Page 26: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 26/35

Extra: Interpretation of uncertainty in sum

Figure : Distribution of the sum between two measured quantities x and y

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 26 / 35

Curve tting: Regression analysis

Page 27: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 27/35

Curve tting: Regression analysis

Regression analysis is a study about how to know what is therelationship between two sets of data statistically. In simplest case, weconsider the two sets of data which seem to be linearly related

Suppose that y = mx + c is a straight line which is the best estimate of a

relationship. m (slope) , and c (Y -intercept) must satisfy these normal equations given by

i y i = m

i x i + cN ,

i x i y i = m i x 2i + c i x i .

(12)

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 27 / 35

Page 28: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 28/35

Page 29: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 29/35

0 1 2 3 4 5 6 70

5

10

15

20

25

30

35

f(x) = 4.84x + 0.59R² = 1.00

f(x) = 4.97xR² = 1.00

Force vs. acceleration of various masses

Mass 1Linear RegressionLinear RTO

a (m/s 2)

F ( N )

Figure : Trendlines obtained from ordinary regression and RTO (RegressionThrough the Origin)

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 29 / 35

Page 30: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 30/35

As you may realize, there is an uncertainty in estimating each parameter.

They are given below

σy = 1N −2 i

(y i −mx i −c )2 ,

σm = σy N

N ∑x 2 −(∑x )2 ,

σc = σy ∑x 2

N

∑x 2 −(

∑x )2 .

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 30 / 35

Page 31: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 31/35

Curve tting: Correlation

Page 32: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 32/35

Curve tting: Correlation

Finally, we want to know how two sets of data is linearly related? We candetermine by coefficient of correlation r which is given by

r =

∑i (x i −x )(y i −y )

√ ∑i (x i −x )2

∑i (y i −y )2

. (14)

If r closes to 1 or -1 then two sets of data is well linearly related. But if r closes to 0, those two are not statistically related.

Note: Sometimes, we prefer coefficient of determination r 2 because its value lies between 0 (not related) and 1 (statistically related).

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 32 / 35

Page 33: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 33/35

In case of RTO , the coefficient of determination r 2 is given by

r 2 = ∑i y 2i

∑i y 2i

(15)

where y i = mx i .

J. Rewrujirek (KU) Intro & Statistical Methods 01420113 (1/2014) 33 / 35

Page 34: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 34/35

Page 35: Physics Laboratory: Introduction to Statistical Analysis of Results

8/11/2019 Physics Laboratory: Introduction to Statistical Analysis of Results

http://slidepdf.com/reader/full/physics-laboratory-introduction-to-statistical-analysis-of-results 35/35

Q&A