Measurement uncertainty_Lecture slides File

Download Report

Transcript Measurement uncertainty_Lecture slides File

Measurement
uncertainty
Laboratory Manager, D. Sc. (Tech.)
Timo Laukkanen
Measurement Uncertainty
-Lecture
•
•
The main objective of this lecture is that after
this lecture and with the presented slides,
students should be able to perform the
measurement uncertainty analysis needed in
the reports (lab measurements)
Lecture + lecture slides + measurement +
reporting= Students should be able perform
measurement uncertainty analysis
Definitions
Quantity = A feature that can be qualitatively recognized and
quantitatively measured. Basic quantities are length, mass, time,
electric current, temperature, amount of substance and brightness
Value of quantity = Defined as the value multiplied by the measure
(5 m)
Numerical value of quantity = Defines how many times the
measure goes into the value of quantity (5 in 5 m)
Definitions
Measure unit = An agreed value of quantity that has been decided
to take the numerical value of quantity equal to 1. The basic
measure units are m, kg, s, A, K, mol, cd
Correct value of quantity = A specific, carefully defined value of
quantity. The correct value of quantity is always an approximation
due to measurement errors.
Agreed correct value of quantity = Represents the correct value
of quantity that is obtained with measurement setup and devises so
that the measurement errors are minimized
Definitions
Measurement = The experimental actions that produce the
measurement result
Measurement result = The value of quantity that is obtained by
measurements
Corrected measurement result = Is obtained from the
measurement result by fixing the systematic errors. The systematic
errors can be found out by calibrating the measurement equipment
or device.
Definitions
Measurement error = The difference between the measurement
result and the value of quantity (either correct value of quantity or
agreed value of quantity)
Systematic error = An measurement error that is constant in the
same conditions. It is typically connected to measurement conditions
(the effect of temperature to the length of a metal piece). It can be
eliminated by calibrating the measurement device and correcting the
measurement result with information obtained from calibration. This
way the corrected measurement result is obtained
Defenitions
Random error = A measurement error whose value varies randomly
in measuring the same value of quantity in same conditions.
Random error can’t be removed with calibration. It has a specific
distribution with an average value and the distribution deviation can
be approximated. When the deviation is known, the range of the
random error can be forecasted with statistical methods.
Defenitions
Error limit of measurement result = These are the limits where
between the measurement error lies with a predefined probability q.
The probability q is the confidence level and its complement 1-q is
the level of risk. The higher the confidence level is chosen, the
further the error limits are from each other. Typically in measurement
technology a confidence level of 95% is chosen.
Measurement uncertainty = Defines the uncertainty in the
measurement result due to random error. These are presented with
error limits +/- ts, where t is a multiplier based on chosen confidence
level and random error, s is the estimate for standard deviation
Defenitions
Measurement inaccuracy = Defines uncertainty of the
measurement result on the combined effect of random error and
systematic error. It can also be presented using error limits.
Measurement results and
measurement errors
A measurement result is always a random quantity that fluctuates
around its mean value.
• Harsh or illegitimate errors
• Mistakes in procedure.
• Computational or calculation errors after the experiment.
• Ex. the measurement is given with Kelvins, but one reads them as Celcius
• Systematic errors
• When a measurement is performed in the same conditions, systematic
error stays the same
• Coming from the measurement device, measurer, or used method
• Systematic errors can be eliminated or their magnitude estimated with
calibration
Measurement results and
measurement errors
Random errors
•
•
•
•
An error that causes readings to take random-like values
around the mean value.
Ex. using a clock to estimate the falling of a ball
The concepts of probability and statistics are used to study
random errors.
A measurement result is a sum of systematic error plus
random error
Δx= Δxsyst+ Δxrandom
Empirical distribution
Assume that a constant
quantity X is measured
many times. The set of all
these measurements are
called the measurement
sample.
The quantity X is a random
quantity
Class Measurement result
Empirical distribution
The features of an empirical distribution can be described
by
• Sample average
•
•
1
m=(x1+x2+…+xn)/n  𝑚 = 𝑛
𝑛
𝑖=1 𝑥i
Sample standard deviation
• s= ([(x1-m)2+(x2-m)2+…+(xn-m)2)]/(n-1))0.5
•
𝑠=
1
𝑛−1
𝑛
𝑖=1(𝑥i
− 𝑚)2
where x1, x2… are measurement results and n is the sample size
Normal distribution
•
If the same measurement
was done infinitely many
times and the amount of
classes in the histogram
were increased to infinite
thinness, the histogram
would become a
distribution function
(below). This distribution
function has an mean μ
and a standard
deviation σ.
Normal distribution
This distribution is called normal distribution.
A measurement result can be assumed to be normally
distributed if random variables are dependent
The distribution can be mathematically described with a density
function
•
•
•
•
𝑓 𝑥 =
1 𝑥−𝜇
1
−2( 𝜎 )2
𝑒
𝜎 2𝜋
where x is the value of the measured quantity, μ is the mean value
and σ is the standard deviation
Normal distribution
The area between the density function and the
horizontal axis equals the probability that a random
value lies in this value range.
- The probability that a random value is less than the mean value
is 0.5 ( p=0.5) or more simply: P[x≤μ]=0.5
- There is a 95% probability that a measurement value lies
between μ±1.96σ can be said P[μ-1.96σ ≤x ≤ μ+1.96σ]=0.95
N(0,1) distribution
A normal distribution can be modified into a N(0,1)
distribution by transferring the mean value to 0 and by
taking σ as the horizontal axis
𝑥−𝜇
𝜆=
𝜎
So that the area between the density function and the
horizontal axis stays the same, the vertical axis scale is
transformed into σth part of the original
𝑓 𝜆 = 𝜎𝑓 𝑥 = 𝜎𝑓(𝜎𝜆 + 𝜇)
N(0,1) distribution
This way the density function of a normal distribution has a
mean value of μ=0 and a standard deviation σ=1 and this
distribution is called a N(0,1)-distribution, which is a
function of the random variable λ
The density function of a N(0,1)-distribution:
𝑓(𝜆) =
1
2𝜋
𝜆2
𝑒− 2
Any normal distribution can be transferred into a N(0,1)distribution and vice versa
N(0,1) distribution
The following holds for a N(0,1)-distribution
P[-1≤λ≤+1]=0.682
P[-2≤λ≤+2]=0.954
P[-3≤λ≤+3]=0.997
These probabilities values have been tabulated for any
N(0,1)-distributed random variable BIG BENEFIT
N(0,1) distribution
N(0,1) distribution
Example: The mean value is 4.0 and the standard deviation
is 1.5 for a normal distribution. What is the probability that a
value is between 1.0 to 7.0?
Answer: We shift to a N(0,1)-distribution
•
•
•
•
λmin=(1.0-4.0)/1.5=-2.0 (lower bound equaling value x=1.0)
λmax=(7.0-4.0)/1.5=2.0 (upper bound equaling value x=7.0)
With N(0,1)-distribution the question is what is the
probability that -2.0≤λ≤2.0
From the tables (or previous slide) we can find out that
this probability is p=0.954
Cumulative distribution
When the N(0,1) distribution’s density function is
integrated from –infinity to λp, the sum function of the
cumulative distribution with value λ=λp is:
𝐹 𝜆p =
𝜆p
−∞
𝑓(𝜆p )dλ
The sum function’s value is the area left of value λp and also
the probability that a random value has values less than λp
P[λ≤ λp]=F(λp)=p
Cumulative distribution
Cumulative distribution
Based on the symmetry of the distribution, for the sum
function
F(-λp)=1-F(λp)
And for symmetric values of λp
λp =-λ1-p (Needed with values p<0.5 that are not
tabulated)
For symmetric values around the mean
P(-λp≤ λ ≤ λp)=2F(λp)-1=2p-1
Estimates of mean value and standard
deviation
•
•
To be able to use a normal distribution, the mean and
standard deviation needs to be known
To know these exactly, infinite amount of measurements are
needed in real life, only the approximations can be
obtained
Mean: 𝑚 =
1
𝑛
𝑛
𝑖=1 𝑥i
Standard deviation: 𝑠 =
1
𝑛−1
𝑛
𝑖=1(𝑥i
− 𝑚)2
Estimates of mean value and standard
deviation
•
•
Increasing the sample size n (amount of
measurements) these estimates come closer to the
mean and standard deviation of a normal
distribution
In practice, when n≥30, the N(0,1) distribution can
be used in the form
𝑥−𝜇
𝜆=
𝑠
Estimates of mean value and standard
deviation
•
Example:
• A temperature measurement was repeated many
times and following results were obtained: mean
15.4 ◦C and standard deviation 0.33 ◦C
•
•
•
a) What is the probability that a single measurement result
is ≤15.9 ◦C
b) What is the probability that a single measurement result
is bigger than 14.9 ◦C but less than 15.9 ◦C
c) What are the symmetric values on both sides of the mean
so that the measurement result lies between them with a
probability of 95%?
Estimates of mean value and standard
deviation
•
Example:
a) λp=(x-μ)/s=(15.9-15.4)/0.33=1.52
 λ≤λp=1.52  P[λ ≤1.52]=0.936=93.6% (from the table)
b) λp,max = (xmax- μ)/s=(15.9-15.4)/0.33=+1.52
λp,min = (xmin- μ)/s=(14.9-15.4)/0.33=-1.52
F(1.52)=0.936 (table) and F(-1.52)=1-0.936=0.064
P[-1.52≤λ≤1.52]=F(1.52)-F(-1.52)=0.936-0.064=0.872=87.2%
c) The probability that an random value lies between λp,min.. λp,max is 95% λp=1.96
(table)
xmax= μ+λps = 15.4+1.96*(-0.33)=16.0 ◦C
xmin= μ-λps = 15.4-1.96*(-0.33)=14.8 ◦C
Mean distribution , large sample
number (≥30)
Typically the measurement result is presented as the mean
value. It is a random number. The bigger the sample
number, the smaller the deviation around this value gets.
The standard deviation of a mean value can be calculated:
𝑠
′
𝑠 =
𝑛
where s is the deviation of a single measurement
Mean distribution , large sample size
(≥30)
When transferring to N(0,1)-distribution, in the mean value
𝜆=
𝑚−𝜇 𝑚−𝜇
=
𝑠′
𝑠 𝑛
Example: To test the deviation of a measurement, air flow was measured 36
times and a sample mean m= 78.2 l/s and a sample standard deviation of s=9.6
l/s was obtained. What are the symmetric levels around the sample mean so
that the true mean lies between them with a probability of 95%
•
s’=9.6/sqrt(36)=1.6 l/s  λp =1.96 (95% probability)
•
•
μmax= m+λps’ = 78.2+1.96*(1.6)=81.3 l/s
μmin= m-λps’ = 78.2-1.96*(1.6)=75.1 l/s
Mean distribution, small sample size (2
to 30)
If the sample size is small, a
normal distribution can’t be
directly used. In estimating
the mean and deviation, this
has to be considered.
In this case a distribution
called Student-t (also known
as T) distribution is used. It
is also symmetric and its
mean value is 0, but due to
uncertainty it is broader and
shorter.
Mean distribution, small sample size (2
to 30)
As was done with the N(0,1)-distribution when
transferring from a measurement distribution to a Tdistribution, the following transformation is needed
t(v) = (m-μ)/s’ = sqrt(n)*(m-μ)/s =
𝑚−𝜇
𝑠 𝑛
where t(v) is a t-distributed random variable with
degrees of freedom v and v=n-1
The sum function is: P[t(v)≤tp(v)]=T[tp(v)]=p
Mean distribution, small sample size (2
to 30)
As with the N(0,1)-distribution the T-distribution
values are tabulated and all the previous equation
similar to the ones of the N(0,1)-distribution can be
used
P[tp2(v)≤t(v) ≤tp2(v)=T[tp2(v)- T[tp1(v)]=p2-p1
T[-tp(v)]=1-T[tp(v)]
tp(v)=-t1-p(v)
P[-tp(v) ≤t(v) ≤tp(v)]=2T[tp(v)]-1=2p-1
Mean distribution, small sample size (2
to 30)
Mean distribution, small sample size (2
to 30)
Example: Assume that the previous air flow is measured
only 4 times (mean=78. 2l/s and standard deviation 9.6
l/s).
What are symmetric confidence level values that the true
mean lies between these values with a 95% reliability?
Degree of freedom is 3, and from the table we obtain that
2T[tp(3)]-1=0.95  T[tp[3)]=0.975 3.183
• μmax= m+t0.975(3)*s’ = 78.2+3.18*(9.6/sqrt(4))=93.5 l/s
• μmin= m-t0.975(3)*s’ = 78.2-3.18 *(9.6/sqrt(4))=62.9 l/s
Substantially broader gap than with 36 measurements
Combining distributions
When only one measurement can be performed or the interesting
measurement is calculated based on measured variables, the
uncertainty is estimated using the uncertainties of measurement
devices (provided by the manufacturer, but sometimes vaguely)
together with uncertainties in handling the measurement equipment
and measurement arrangements.
Assume that an random variable Y is a function of X to Xn independent
random variables
Y=f(X1,X2,…,Xn)
𝑛
𝜎𝑦 =
𝑖=1
𝛿𝑌
𝛿𝑋
2
𝜎𝑖2
Combining distributions
Example:
Ideal gas law: ρ=P/(R*T)
• Temperature (measured) T±DT
• Pressure (measured) P±DP
• R=Constant
How do we estimate the error in the density?
Combining distributions
Example continues:
2
Δ ρ RSS


2

 ρ    ρ   1
  Δ p    Δ T    Δ P 
 p   T   R T 
2

 p   T 

  

 p   T 
2
2
 P
 
R T
 


Δ
T
2


2
Estimating the error limits of
measurement result
Measurement uncertainty is typically presented with error
limits. These are the symmetric values (on both sides of
the mean value) where the random error with a
predefined probability lies.
For a N(0,1) distribution
P[-λp≤Δrandom/sx ≤ λp]=P[-λpsx≤Δrandom ≤ λpsx]=2p-1=q
And generally (where k is relation with the sample size
and the uncertainty value and s is the deviation)
dx=±ks
Estimating the error limits of
measurement result
With a large sample size (≥30)
dx=±λp *s/sqrt(n)
where s is the standard deviation of a single
measurement
Estimating the error limits of
measurement result
Example: The single measurement standard deviation in
measuring the mass flow of water 36 times was 0.67 kg/s.
What are the uncertainty levels when the risk level
(uncertainty level) is a) 5% and b) 1% ?
a) Risk level α=0.05  confidence level q=0.95
P[-λp≤Δrandom/sx ≤ λp] = 2p-1 = q =0.95
P=0.975 λ0.975=1.96 (N(0,1) table)
dx=±1.96*0.67/sqrt(36)=±0.22 kg/s
Estimating the error limits of
measurement result
Example:
b) Risk level α=0.01  confidence level q=0.99
P[-λp≤Δrandom/sx ≤ λp] = 2p-1 = q =0.99
P=0.995 λ0.995=2.58 (N(0,1) table)
dx=±2.58*0.67/sqrt(36)=±0.29 kg/s
When the risk value is smaller then the error limits
are larger
Estimating the error limits of
measurement result
With a small sample size (2 to 30) the Student-t
distribution is used
dx=±tp (n-1)*s/sqrt(n)
where s is the standard deviation of a single
measurement
Example: The single measurement standard
deviation in measuring the mass flow of water 9 times
was 0.67 kg/s. What are the uncertainty levels when
the risk level (uncertainty level) is a) 5% and b) 1% ?
Estimating the error limits of
measurement result
a) Risk level α=0.05  confidence level q=0.95
P[-tp(v)≤Δrandom/sx ≤ λp(v)] = 2p-1 = q =0.95
P=0.975 t0.975(8)=2.31 (T table)
dx=±2.31*0.67/sqrt(9)=±0.52 kg/s
b) Risk level α=0.01  confidence level q=0.99
P[-tp(v)≤Δrandom/sx ≤ λp(v)] = 2p-1 = q =0.99
P=0.995 t0.995(8)=3.36 (T table)
dx=±3.36*0.67/sqrt(9)=±0.75 kg/s
The error limits are much bigger than in the previous example
Estimating the error limits of
measurement result
When the deviation is known in a single
measurement ( f. ex. from previous multiple
measurements with the same measurement
equipment)
dx=±ks
Example: The single measurement standard
deviation in measuring the mass flow of water 1 time
was 0.67 kg/s. What are the uncertainty levels when
the risk level (uncertainty level) is a) 5% and b) 1% ?
Estimating the error limits of
measurement result
a) Risk level α=0.05  confidence level q=0.95
P[-λp≤Δrandom/sx ≤ λp] = 2p-1 = q =0.95
P=0.975 λ0.975=1.96 (N(0,1) table)
dx=±1.96*0.67/sqrt(1)=±1.31 kg/s
b) Risk level α=0.01  confidence level q=0.99
P[-λp≤Δrandom/sx ≤ λp] = 2p-1 = q =0.99
P=0.995 λ0.995=2.58 (N(0,1) table)
dx=±2.58*0.67/sqrt(1)=±1.73 kg/s
Once again, the error limits are much higher than when having
multiple measurement
Estimating the error limits of
measurement result
When the deviation is not known in a single measurement the
uncertainty is estimated using the uncertainties of
measurement devices.
𝑛
𝑑𝑦 =
𝑖=1
𝛿𝑌
𝛿𝑋
2
𝑑𝑥𝑖2
Where the dxi’s are the error limits of measured quantities,
which have to be based all on a similar confidence level
(typically 95%)
Estimating the error limits of
measurement result
Sometimes this equation can be simplified
If Y is the sum of its components Y=a1X1+a2X2+…+anXn
𝑑𝑦 = ± 𝑎12 𝑑𝑥12 + 𝑎22 𝑑𝑥22 + ⋯ + 𝑎𝑛2 𝑑𝑥𝑛2
If Y is a product of its components: Y=X1a1X2a2…Xnan
𝑑𝑦
𝑑𝑥1
2
= ± 𝑎1
𝑦
𝑥1
2
+
𝑎22
𝑑𝑥2
𝑥2
2
+ ⋯+
𝑎𝑛2
𝑑𝑥𝑛
𝑥𝑛
2
Estimating the error limits of
measurement result
Example: The exchanged heat in a heat exchanger was
defined by measuring the mass flow from hot side and
temperatures before and after the exchanger. The results
of the measurement were:
qm=2.20±0.20 kg/s
tin =85.5±0.50 ◦C
tout =43.2±0.50 ◦C
The heat exchanged can be calculated with equation
Q = qm*cp*(tin-tout)
Estimating the error limits of
measurement result
cP = 4.18 kJ/kgK is the specific heat capacity of water
If the values are put into the heat equation, Q is 389.0 kW
If the temperature difference (tin-tout) is transformed into
a single variable dT= (tin-tout) the heat equation Q =
qm*cp*dT
is only multiplication of its components, and the
temperature difference equation
dT= (tin-tout) is only about summation
Estimating the error limits of
measurement result
Now the error limits of the temperature diffence can be estimated
dT =±(dT12+dT22)0.5 = ±(0.52+0.52)0.5 =±0.71 ◦C
Assuming that the error in Cp is insignificantly small
dQ/Q= ± [(dqm/qm)2+(dT/T)2]0.5
dQ/Q= ± [(0.20/2.20)2+(0.71/42.3)2]0.5
dQ/Q=0.092=9.2%
So dQ=Q*dQ/Q =±36.0 kW
So most of the uncertainty comes from the mass flow measurement
Q= 389.0±36.0 kW
Presenting measurement results
Measurement results are typically presented by the
mean value, the measurement uncertainty levels and
the measurement risk level
Example: 5.5 ±0.2 m/s (α=5%)
Statistical testing
In many cases the measured quantity is given upper
and lower bounds that the quantity needs to fullfill.
Is it enough that the measured result is
between these bounds?
Statistical testing
In many cases the measured quantity is given upper and
lower bounds (tolerances) that the quantity needs to fulfill.
Is it enough that the measured result is between
these bounds?
NO Because the tolerances are given for the correct
value of quantity not for the measured value, so the
measured value together with its error limits must be
inside the tolerances
Statistical testing
Example: The goal value and tolerances for air mass flow
are qv=22.0±2 m3/s. After measuring it, the result was
qv=23.1±0.9 m3/s (α=5%). Is the real value between the set
tolerances?
According to the tolerances the air can be 20.0 to 24.0
m3/s. According to the measurement the flow is 22.2 to
24.0 so it is just between the set tolerances and can be
accepted.
If the risk level was less than 5%, the result could not be
accepted.
rejection condition
Statistical testing
In cases where the measurement value is compared with a goal value or
another measurement, statistical testing is needed
1.
2.
3.
4.
Set the hypotheses H0
Construct a test quantity and its failure condition
Study the occurrence of the failure condition
Reject or accept the hypotheses
For a N(0,1) distribution the test quantity is
𝑥𝑚 − 𝑥𝑣
𝑍= 𝑠
𝑛
where xm is the measured mean, xv is the goal value given for the quantity, and
𝑠
𝑛
is the estimate of distribution’s standard deviation
Statistical testing
The failure condition is an inequality constraint. If this
inequality holds, the hypotheses is rejected.
If H0: x*≥xv and normal distribution is used, the failure
condition equation is: Zλ≤λβ=- λ1-β
Statistical testing
When testing the location of the real mean
Hypotheses
Test quantity
x*≥xv
x*≤xv
Failure
condition
Zλ≤-λ1-β
Zλ=(xm-xv)/s/n0.5
Zλ≥λ1-β
x*=xv
ІZλІ≥λ1-β/2
x*≥xv
Zt≤-t1-β(n-1)
x*≤xv
x*=xv
Zλ=(xm-xv)/s/n
Zt≥t1-β(n-1)
ІZtІ≥t1-β/2(n-1)
The conditions for
using a normal
distribution must
hold
Small sample
size
Statistical testing
When comparing two measurements
Hypot Test quantity
heses
μ1=μ2
μ1=μ2
Zλ=(xm1-xm2)/(s12/n1+s22/n2)0.5
Zt=(xm1-xm2)/(s*(1/n1+1/n2)0.5)
S2=((n1-1)*s12 +(n2-1)*s22 )/(n1+n2-2)
Failure
condition
ІZλІ≥λ1-β/2
ІZtІ≥t1-β/2(n1+n2-2)
The
conditions for
using a
normal
distribution
must hold
Small sample
size
σ1=σ2
SUMMARY
•
•
•
•
•
•
•
•
•
Definitions (some) used in measurement technology
What kind of errors there are, where do these come from, and how can
these be avoided and controlled
Normal distribution and how to obtain the mean value and standard
deviation of measurement data
How can a normal distribution be shifted into N(0,1)-distribution and why
is this beneficial
Depending on the sample size, what is the statistical analysis method to use
Student T distribution and how to use it
Combining distributions
Estimating the error limits and how are measurement results
presented
Some basis situations when statistical testing is needed in
measurement technology and how to perform these