Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
34 views

Error Analysis Lecture

This document discusses a lecture on measurement error analysis and statistics. It covers types of measurements and errors, sensor components in the measurement chain including transducers and conditioners, and statistical analysis methods like error propagation and linear regression. Key topics are direct and indirect measurements, accuracy versus precision, common measurement terms, and characterizing temperature measurements as examples. References for further reading on the subject are also provided.

Uploaded by

CHERUYIOT IAN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Error Analysis Lecture

This document discusses a lecture on measurement error analysis and statistics. It covers types of measurements and errors, sensor components in the measurement chain including transducers and conditioners, and statistical analysis methods like error propagation and linear regression. Key topics are direct and indirect measurements, accuracy versus precision, common measurement terms, and characterizing temperature measurements as examples. References for further reading on the subject are also provided.

Uploaded by

CHERUYIOT IAN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Winter 2014

MEASUREMENT ERROR ANALYSIS AND STATISTICS


Prof. R.A. de Callafon

IN THIS LECTURE:
• Types of Measurements
• Common Terms In Measurements And Error Analysis
• Sensor Components in the Measurement Chain
transducers, conditioners, converters, amplifiers, filters
• Error Analysis: Types of errors and Numerical Integration
• Error Analysis: Statistical Framework
• Propagation of Errors
• Linear Regression & Least Squares
• Error Analysis in Your Report

Error Analysis MAE126a/MAE171a/MAE175a – R.A. de Callafon – Page 1


REFERENCES USED FOR THIS LECTURE

[1] Beers, E.Y., Introduction to the Theory of Error, 2nd Ed., Addison Wesley, 1962.
[2] Beyer, W. H. CRC Standard Mathematical Tables, 28th Ed. Boca Raton, FL: CRC
Press, 1987.
[3] Spiegel, M. R. Theory and Problems of Probability and Statistics. New York:
McGraw-Hill, 1992.
[4] Steinhaus, H. Mathematical Snapshots, 3rd Ed. New York: Dover, 1999.
[5] Taylor, J.L. Fundamentals of Measurement Error, NEFF instrument Corp., 1988.
[6] Zuwaylit, F.H., General Applied Statistics, 3rd Ed., Addison Wesley, 1979.

MAE175a Error Analysis – R.A. de Callafon – Page 2


TYPES OF MEASUREMENTS

MAE175a Error Analysis – R.A. de Callafon – Page 3


TYPES OF MEASUREMENTS

Direct measurement: comparison of an unknown quantity with a standard assumed to


remain constant.

Indirect measurement: characterization of a phenomenon or property in terms of a


functional relationship between measured quantities and
quantities that are accessible to measurement.

Usually an event cannot be measured directly but causes an electrical or physical signal,
that is measured or interpreted. This leads to the concept of transduction of events and
transducers.

MAE175a Error Analysis – R.A. de Callafon – Page 4


TYPES OF MEASUREMENTS

A transducer converts one form of energy to another form of energy. Usually a


transducer is considered to be a device that converts a given form of energy to an
electrical signal.

A fundamental rule for a transducer: measuring device or method should not alter the
event being measured!

1
energy drawn from measured system ≤ measuring energy
100

More on transducers when we discuss sensor components

MAE175a Error Analysis – R.A. de Callafon – Page 5


COMMON TERMS IN MEASUREMENTS AND ERROR ANALYSIS

MAE175a Error Analysis – R.A. de Callafon – Page 6


COMMON TERMS ASSOCIATED WITH MEASUREMENTS AND ERROR:

Accuracy: how closely a measured value approximates the real value.

Precision: how closely measured values cluster around a best estimate of the real
value. A precise measurement has a small standard deviation, but can
be of low accuracy!

Resolution: the level or amplitude of the smallest change in measured value.

In general, instruments change their output in a stepwise fashion, and the relationship
between the minimum step size and the full scale output is referred to as resolution.

Threshold: the minimum change in input that causes a change in output.

Repeatability: agreement between measurements taken under identical conditions.


Given as 1% of Full Scale Output (FSO).

Reproducibility: agreement between different measurements of the same phenomenum.

MAE175a Error Analysis – R.A. de Callafon – Page 7


EXAMPLE: measurement of a temperature

A little history:

Daniel Gabriel Fahrenheit (1686-1736) devoted most of his life to creating


precision meteorological instruments. Fahrenheit invented the mercury
thermometer in 1714, and later discovered the effect of pressure on the boiling
point of liquids. Fahrenheit sought to create a practical temperature scale in
which 0 corresponded with the coldest temperature normally encountered in Western
Europe and 100 corresponded to the hottest temperature.

In 1742, Anders Celsius (1701-1744) created an inverted centigrade


temperature scale in which 100 represented the boiling point of water (373.15
K) and 0 represented the freezing point (273.15 K) at 1 Atm.

Fahrenheit adjusted his temperature scale so that 32 represented the freezing point of
water and 212 represented the boiling point of water (373.15 K).

Which temperature scale makes more sense?

MAE175a Error Analysis – R.A. de Callafon – Page 8


EXAMPLE: measurement of temperature of freezing water

Let the actual temperature be 32°F, consider the following measurements:

32.11 36.21 32.5 34.51 32.11


31.92 35.93 31.5 30.05 31.92
32.01 36.03 32.0 33.05 32.01
32.03 35.99 32.5 31.12 42.03
31.98 36.02 31.5 30.87 31.98
31.89 35.98 32.0 33.65 31.89
accurate precise accurate less ?
and precise with but less precise but
with relative precise due most likely
relative high to low accurate
high resolution resolution with
resolution but not of 0.5°F relative
accurate high
resolution

MAE175a Error Analysis – R.A. de Callafon – Page 9


EXAMPLE: measurement of a temperature (SOLUTION)

Let the actual temperature be 32°F, consider the following measurements:

32.11 36.21 32.5 34.51 32.11


31.92 35.93 31.5 30.05 31.92
32.01 36.03 32.0 33.05 32.01
32.03 35.99 32.5 31.12 42.03
31.98 36.02 31.5 30.87 31.98
31.89 35.98 32.0 33.65 31.89
accurate precise accurate less accurate,
and precise with but less precise but not precise
with relative precise due most likely (due to
relative high to low accurate outlier at
high resolution resolution with 42.03) with
resolution but not of 0.5°F relative high
accurate high resolution
resolution

Error characterization is a combination of


• mean value (accuracy) and variation (precision, resolution)

MAE175a Error Analysis – R.A. de Callafon – Page 10


COMMON TERMS ASSOCIATED WITH MEASUREMENTS AND ERROR:

Hysteresis: difference in output between measurements of increasing and


decreasing input.

Hysteresis will yield different measurements in case the input increases or decreases and
this error is bad for measurements!

Linearity: deviation of a response curve (or calibration curve) from a straight


line, given in ± % FSO.

Linearity makes it easy to find a relation between measured quantity and resulting output
signal: a linear relation.

Conformance: degree of correspondence between nonlinear input/output relationship


and theoretical curve.

Offset: output for 0 input level.

MAE175a Error Analysis – R.A. de Callafon – Page 11


EXAMPLE: measuring temperature with a thermocouple

Thermocouple generates voltage depending on temperature, then the following


characteristics indicate:

linearity non-linearity hysteresis


without with
offset offset

Most (good) sensors have the following static


characteristic curve:

I.E. Linear over a certain range with a small offset.

MAE175a Error Analysis – R.A. de Callafon – Page 12


SENSOR COMPONENTS IN THE MEASUREMENT CHAIN

MAE175a Error Analysis – R.A. de Callafon – Page 13


SENSOR COMPONENTS INTHE MEASUREMENT CHAIN

Many quantities can be measured directly, most events however


are measured indirectly (indirect measurement)
Examples are: temperature, pressure, force, acceleration, speed, flow rate, etc.

The general process of an indirect measurement is shown schematically in the following


figure:

most important element: the sensor (transduces and conditions the `event to measure’, so
it can be processed by the data acquisition system)

MAE175a Error Analysis – R.A. de Callafon – Page 14


SENSOR COMPONENTS

Measuring a signal often involves many components:


• transducer (sometimes also called, `the sensor’)
converts one form of energy to another form of energy (electricity)
• power source
needed to supply (electric) energy
• amplifiers
signal conditioning
to amplify the signals being measured before using them
• filters
to get rid of unwanted (high or low frequent) disturbances
• possible multiplexers and converters
in case of digital data acquisition systems

Following is summary of abovementioned components to review the measurement chain.

MAE175a Error Analysis – R.A. de Callafon – Page 15


SENSOR COMPONENTS

Transducers/sensors

Active (generate their own energy). Examples:


• thermocouples
• piezoelectric sensors

Passive (require additional energy source). Examples:


• strain gage
• Hall effect sensor
• platinum resistance temp. gage

MAE175a Error Analysis – R.A. de Callafon – Page 16


SENSOR COMPONENTS

Power source
Provides excitation for passive gages, suppresses sensor zero.

Characteristics:
(1) operating mode (const. Voltage or const. Current)
(2) line and load regulation spec.
(3) ripple on source (Voltage or current ripple)
(4) zero suppression range
(5) loading or stability

MAE175a Error Analysis – R.A. de Callafon – Page 17


SENSOR COMPONENTS

Amplifier
- typically used to maximize measurement resolution by scaling sensor voltage range to
full analog-to-digital converter (ADC) range
- compensates for differences between sensor’s zero reference potential and data
acquisition system’s zero potential -- generally a differential amplifier acts on
difference between input lead.

Characteristics:
(1) Input electrical characteristics
(impedance, capacitance)
(2) Design type
(single ended, differential, instrumental)
(3) Dynamic parameters
(bandwidth, slew rate, settling time, overshoot)
(4) Max. input voltage and gain

MAE175a Error Analysis – R.A. de Callafon – Page 18


SENSOR COMPONENTS

Anti-Aliasing Filter
- Limits the frequency content of a sampled signal typically by a low pass filtering.
Example: eliminate (alternate) high frequency noise by dedicated low pass filter.
- The term “anti-aliasing” is used because failure to select
the correct sampling rate creates aliasing effects.
aliasing = slow sampling of a high frequency signal
makes it appear as a low frequency signal.

Characteristics:
(1) filter type (Bessel, Butterworth, Chebyshev)
(2) pass band or stop band parameters Sine signal (blue) sampled
at a high frequency (green)
(3) dynamic parameters (settling time, overshoot)
and a low frequency (red)

MAE175a Error Analysis – R.A. de Callafon – Page 19


SENSOR COMPONENTS
Analog-to-Digital Converter (ADC)
converts an analog signal (voltage) to digital
information (numbers) by a direct or indirect
comparison of the signal to a known reference.
Characteristics:
(1) Conversion techniques:
Digital Ramp (see figure)
, Successive Approximation
or Flash ADC
(2) Conversion rate
points/second
(3) Full scale conversion voltage Sine signal (blue) sampled at a high
(4) Resolution frequency with a 4 bit resolution (green)
number of bits for full scale, ex: 8, 10, 12 bits will yield 28, 210, 212 parts of full scale

MAE175a Error Analysis – R.A. de Callafon – Page 20


SENSOR COMPONENTS

Zero Order Hold Circuitry


Holds signal constant during the time the ADC takes to digitize an analog
signal and/or to convert a digital signal back into a continuous signal.

Multiplexer Circuitry
Switch to connect N different sensor input channels to one
data measuring equipment (ADC).

Characteristics:
(1) switching rate
(2) cross-talk.

MAE175a Error Analysis – R.A. de Callafon – Page 21


ERROR ANALYSIS: TYPES OF ERRORS AND NUMERICAL
INTEGRATION

MAE175a Error Analysis – R.A. de Callafon – Page 22


ERROR ANALYSIS

Error is defined as the difference between event to measure and quantified event. This
error can characterized as the absolute difference.

Usually, relative measures are being used:

Error
Error in % of reading System Output × 100

Error
Error in % of Full Scale (FS) FS Output × 100

MAE175a Error Analysis – R.A. de Callafon – Page 23


ERROR ANALYSIS

(FOUR) TYPES OF ERRORS:

(1) Intrinsic Errors: errors inherent with the measurement chain


(a) sensor accuracy (or “inaccuracy”)
(b) linearity and conformance
(c) hysteresis
(d) offset
(e) noise
(f) repeatability
(g) resolution
(h) threshold

All these errors are due to the different components in the measurement chain.

MAE175a Error Analysis – R.A. de Callafon – Page 24


ERROR ANALYSIS

(FOUR) TYPES OF ERRORS:

(2) Application Related Errors: errors associated with the use of sensors.
(a) Spatial errors
(proper location of sensor(s) or use of multiple sensors)
(b) Interaction errors
(size of sensor if too big: affects measurement)
(c) Probe errors
(orientation of sensor)
(d) Temperature effects
(changes resistance)

MAE175a Error Analysis – R.A. de Callafon – Page 25


ERROR ANALYSIS

(FOUR) TYPES OF ERRORS:

(3) Interface Errors: errors due to interfacing measurement chain components


(a) Cabling (resistance, impedance, capacitance, etc.)
(b) Loading (electrical or mechanical load)
(c) Common mode voltage
(d) Static cross-talk (multiplexed systems)

(4) Sampling and Approximation Errors: errors due discretization of analog signals
(a) Finite time sampling
(b) Sampling distribution error (improper sampling rate)
(c) Stabilization error (due to sensor response time)
(d) Approximation error (due to finite # points, integration)

MAE175a Error Analysis – R.A. de Callafon – Page 26


ERRORS ANALYSIS: NUMERICAL INTEGRATION (Riemann sums)
Consider a measurement that is found via an integration:

where x is measured at n discrete points ai , i=1,2,…,n on the interval [a,b], then


integration can be done via:

(1) Riemann sums using left, right or middle points

MAE175a Error Analysis – R.A. de Callafon – Page 27


ERRORS ANALYSIS: NUMERICAL INTEGRATION (trapezoidal and Simpson)
Consider a measurement that is found via an integration:

where x is measured at n discrete points ai , i=1,2,…,n on the interval [a,b], then


integration can also be done via:

(2) Combination : the Trapezoidal rule (line or 1st order approximation) or


Simpson’s rule (parabolic or 2nd order approximation)

Pictures courtesy of Stefan Warner and Steven R. Costenoble, Dept. of Mathematics, Hofstar University and Lawrence S. Hush, Dept.
of Mathematics, University of Tennessee, Knoxville.

MAE175a Error Analysis – R.A. de Callafon – Page 28


ERRORS ANALYSIS: NUMERICAL INTEGRATION (Results)

Each integration method introduces errors that can be bounded:

Trapezoidal Rule Error Bound: Consider n points over [a,b] and suppose that the
second derivative of f is continuous on [a, b] with |f(2)(x)| < M for all x in [a, b]. Then

Midpoint Rule Error Bound: Consider n points over [a,b] and suppose that the second
derivative of f is continuous on [a, b] with |f(2)(x)| < M for all x in [a, b]. Then

Simpson's Rule Error Bound: Consider n points over [a,b] and suppose that the fourth
derivative of f is continuous on [a, b] with |f(4)(x)| < M for all x in [a, b]. Then

MAE175a Error Analysis – R.A. de Callafon – Page 29


ERROR ANALYSIS: STATISTICAL FRAMEWORK

MAE175a Error Analysis – R.A. de Callafon – Page 30


ERROR ANALYSIS (Statistical Framework)

There are two essential components of measurement error:


(a) Bias error (related to the mean value or accuracy)
(b) Random error (related to the variation in data due to precision and resolution)
For the case of a constant value of the event to measure, these two main components are
illustrated in the figure of the probability density function:

probability density function

MAE175a Error Analysis – R.A. de Callafon – Page 31


ERROR ANALYSIS (Statistical Framework)
The fixed difference between the true value and the average of all repeated measurements,
M , is the bias error, whereas the deviation of individual measurements from the average
M are the random errors. Bounds Ml and Mr indicate confidence interval for M

The “bell shaped” probability density function above shows that


measurements near the average are more probable than far from it.
It gives insight in the `spread’ of the random effect of the measurements.

MAE175a Error Analysis – R.A. de Callafon – Page 32


ERROR ANALYSIS (Statistical Framework)

The statistical framework allows the uncertainty associated with any measurement to be
described in a probability density function or a confidence interval that are functions of
both bias and random errors.

Example
To estimate the bias error, we apply a constant input and take n measurements. Then the
bias error can then be estimated via

Σei
Bi = e =
n

which is nothing else than simply taking the average of the samples/measurements.

Since this estimate is obtained from n samples:


• a probable band for the true average error can be established using the t-statistic (t-
distribution function)
• With information on probability density function we can formulate confidence
intervals for our measurement.

MAE175a Error Analysis – R.A. de Callafon – Page 33


SOME STATISTICS

All measurements are in error, and the purpose of error analysis is to quantify these errors.
For random errors we can use statistics.

The idea is to characterize the bias (mean) and the spread (variance) of the measurement
to characterize the quality of the measurement.

If we use n observations, the error at the ith observation is


ei = f (iT ) − f 1

MAE175a Error Analysis – R.A. de Callafon – Page 34


where f1 is the known input or know quantity to measure
SOME STATISTICS - terminology

Population = all elements of measured quantity – finite (N) or infinite (∞).


Sample = n measurements of the population. Sample is representative of population if:
(a) sample can be characterized
(b) relationship between sample parameters and population parameters is known.
Central tendency (of population)
(a) median
(b) mean, µ
Dispersion parameters (of population)
(a) deviation: di = ei − µ , µ = population mean
Σdi2
2
(b) variance: σ = N

(c) standard deviation: σ

MAE175a Error Analysis – R.A. de Callafon – Page 35


SOME STATISTICS – mean/average and median

For the whole population of measurements we have the population parameters based on a
total of N measurements. For a sample of n measurements (since the whole population
may not be available) we have sample parameters. In general, one wants to obtain the
population statistics from the sample statistics.

A summary of those is as follows:

Central tendency Population Sample

Σei Σei
Mean/average: µ≡ e≡ Also called Sample Mean
N n
⇒ Σ(ei − e ) = 0

Median: middle pt., i.e. same # of pts. above and below median

MAE175a Error Analysis – R.A. de Callafon – Page 36


SOME STATISTICS – deviation, variance and standard deviation

Dispersion tendency Population Sample

Deviation: di = ei − µ di = ei − e

However, Σdi = 0 Σdi = 0


so we can define
2
2 Σdi2 Σ (ei − µ ) Σ (ei − e )
Variance: σ ≡ = σˆ 2 ≡ Also called Sample Variance
N N n
2 2
Σ (ei − µ ) Σ (ei − e )
Std. Deviation: σ≡ σˆ ≡
N n
To determine the sample standard deviation σˆ during a measurement, without having to
store all observations, we can use the recursive formulae:
1/ 2 1/ 2
 Σei2 2  Σei2 − Σei 
σˆ = −e = .
 w   n 

MAE175a Error Analysis – R.A. de Callafon – Page 37


SOME STATISTICS – estimate of probability density function

• The statistical properties of a population are fully characterized by its probability


density function (that may be a function of µ and σ as defined before)
• If the frequency (no. of occurrences) of the errors is plotted as a function of error
amplitude, an estimate of the probability density function is obtained!

Example: measurement with a mean value µ=1 and a standard deviation σ =0.1:

Histogram (blue)
gives estimate of the
probability density
function (red) and
shows mean and spread
of measurement errors.

MAE175a Error Analysis – R.A. de Callafon – Page 38


SOME STATISTICS – normal or Gaussian distribution

Many populations exhibit a Normal (or Gaussian) distribution with a Gaussian


Probability Density Function. For such a
distribution, the probability distribution has a `bell
shaped’ character.

Characteristics of Gaussian or Normal distribution:


(1) Fully characterized µ and σ
(2) Symmetric around the mean µ
(3) area under curve = 1 (as for ALL probability density functions!)
(4) probability density approaches 0 for larger values and σ determines “how fast”

MAE175a Error Analysis – R.A. de Callafon – Page 39


SOME STATISTICS – normal or Gaussian distribution

The probability that a measurement occurs between ± σ , ± 2σ , ± 3σ is the following:


P(− σ ≤ e ≤ σ ) = 0.683
P(−2σ ≤ e ≤ 2 σ ) = 0.954
P(−3σ ≤ e ≤ 3σ ) = 0.997
Thus, for example, there is a 99.7% probability that the error for a normally distributed
population (or sample) is within 3 standard deviations from the mean. Thus, the
standard deviation is a measure of dispersion used with the normal distribution.

MAE175a Error Analysis – R.A. de Callafon – Page 40


SOME STATISTICS – normalized distribution

Normalized z-variant:
In order to calculate the probability that the population error lies between e1 and e2 we
use Standardized Normal/Gaussian Distribution characterized by µ = 0 and σ = 1.

Any measurement/variable e with a Normal/Gaussian Distribution with µ and σ can be


given a Standardized Normal/Gaussian Distribution characterized by µ = 0 and σ = 1:

ei − µ
define zi = σ as a `new’ random variable and called the Normalized z-variant

2
this gives µ z = 0, σ z = 1 , so normalized and then the normalized Gaussian probability
1 −z 2 / 2
density function f (z ) =

∫ e dz (tabulated on page 59) can be used for calculations!

MAE175a Error Analysis – R.A. de Callafon – Page 41


SOME STATISTICS – example of confidence intervals via normalized distribution
Example
20 observations are made for an instrument calibration. Assume
e = µ = 0.0117
σˆ 2 = σ 2 = 0.0119
⇒ σ = 0.1091
Determine the 95% CONFIDENCE INTERVAL, This means, compute emin = e1 and emax
= e2 such that 95% of the observations will lie in this interval.
For 95% probability see Standard Normalized Distribution table on page 59. Table lists
only probability for P(0<z<a), but with symmetry of P(z) we now 95/2 = 47.5% = 0.475.
From tale we observe a=1.96, so for normalized z-variant we have
⇒ z = ±1.96
e −µ
z= i ⇒ eiσ zi + µ ⇒ e1 = −0.202
σ
and e2 = 0.225

MAE175a Error Analysis – R.A. de Callafon – Page 42


SOME STATISTICS – properties of mean estimation
Take a set of n samples from population, with sample averages e j . Now, take the average
of all sample means. This average is called the expected value of the sample mean, and
is equal to µ :
e = E (e ) = µ .
Now, the standard deviation of the distribution of sample means is the standard deviation
of the sample mean:
σ  N − n  1/2
σe =
n  N − 1 “finite population correction”

N σ
σ
If n ≤ 10 or N → ∞ then e ≈ ⇒σ= nσˆ
n
Interesting Fact: for n ≥ 30 e is normally distributed even if the population is not
(central limit theorem). Since e is normally distributed, we can write (normalization):
e −µ e −µ
z= =
σe σ/ n.

MAE175a Error Analysis – R.A. de Callafon – Page 43


SOME STATISTICS – example of mean estimation

Example

Compute 95% CONFIDENCE INTERVAL for µ if you know that the sample mean
e = 0.0117 , on the basis of n=20 samples from a population with σ = 0.1.

95% ⇒ 95/2=47.5% = 0.475 for P(0<z<a)


with z -table on page 59, P(0<z<a) = 0.475 for a=1.96
⇒ z = ± 1.96
Work out the problem yourself!

NOTE: The above example assumes knowledge of the population standard deviation σ.
Usually, this is not available, but we are estimating this via the sample variance…

MAE175a Error Analysis – R.A. de Callafon – Page 44


SOME STATISTICS – properties of variance estimation

It can be shown that if all possible samples of size n are taken from a population and each
2
of these is used to compute the sample variance σˆ , then the expected value of the
sample variance is:
2
n − 1 σ
E(σˆ ) =
2 2 2
σ =σ −
n n
σ2
thus the expected value of sample variance is not σ2, but n less than the population

variance! For small n there is an error, which is adjusted by adjusted sample variance:
2
2 n Σ (ei − e )
s = σˆ 2 =
n −1 n −1
2 Σ (ei − e )
So, instead of σˆ ≡ n
(as we saw before) we use the estimate:
2
2 n 2 Σ (ei − e )
s = σˆ =
n −1 n −1

MAE175a Error Analysis – R.A. de Callafon – Page 45


SOME STATISTICS – t-distribution
Sample average e with adjusted sample standard deviation s can be related to the
1/2
ei − µ  Σ(ei − e )2 
population mean µ via a so-called “t-distribution”: t = s
, s= 
 n −1 
n

NOTES:
• This is again a normalization of the statistical variable e (your measurement)
• To get the normalized t-distribution, one has to subtract the mean value µ and divide
by the adjusted sample standard deviation s and multiply by square root of n.
• The degrees of freedom (d.f.) defined by d.f. = n − 1 , where n = number of samples,
determines the shape of the t-probability density function:

shape of t-probability density function


Φdf(t), where df = degrees of freedom

MAE175a Error Analysis – R.A. de Callafon – Page 46


SOME STATISTICS – t-distribution

General trend for t-distribution:


The larger the d.f. = n-1 (degrees of freedom), the closer the t-distribution resembles a
(normalized) Normal distribution. Hence for large n (n>30) you can simply work with
Normal distribution!

Table
For smaller values (typically d.f.<30), the probability density function of the t distribution
differs from the normal distribution, but t-distribution is a standard distribution that is
listed in tables. See (inverse) t-distribution table on page 60.

MAE175a Error Analysis – R.A. de Callafon – Page 47


SOME STATISTICS – t-distribution

Example:
Compute 95% CONFIDENCE INTERVAL for µ if you know that: the sample mean
e = 0.012 and adjusted sample variance s = 0.11 on the basis of n=20 samples from a
population.

With this information we have d.f. = 19


95% ⇒ one tail of Inverse Standard t-distribution is 2.5% ⇒ need t.025 ⇒ from the t-table
on page 60 we see: ti = ±2.093 . Note: this is different from the z i = ±1.96 we found when
using a Standard Normal Distribution!
e −µ
⇒ −2.093 < < 2.093
s/ n
∴−0.032 < µ < 0.056 .

MAE175a Error Analysis – R.A. de Callafon – Page 48


SOME STATISTICS – properties of variance estimation

Similarly, the population variance or standard deviation σ can be related to the variance
estimate (sample variance) by a so-called chi-square ( x 2 ) distribution. This can be done
can for normally distributed samples:

2
Σ(ei − e )
x2 = used with d.f. = n − 1 .
σ2

With given d.f., from the x2 distribution we have


2
Σ(ei − e )
a > x > b⇒ a >
2
2 >b
σ
2
Σ (ei − e ) Σ (ei − e )
∴ < σ2 <
a b

MAE175a Error Analysis – R.A. de Callafon – Page 49


SOME STATISTICS – summary
Σei
Sample average: e=
n
2
2 Σ (ei − e )
Sample variance: σˆ =
n
2
2 Σ (ei − e )
Adjusted sample variance: s =
n −1
Degrees of freedom: df = n − 1
 s   s 
Estimate for µ : e − tα ,df < µ < e + tα ,df
 n  n
2 2
2
Σ (ei − e ) 2 Σ (ei − e )
Estimate for σ <σ <
a b
where α = probability
d.f. = degree of freedom
tα ,df = t-distribution for α ,df

a, b from x 2 distribution

MAE175a Error Analysis – R.A. de Callafon – Page 50


PROPAGATION OF RANDOM ERRORS

Q: What is the total accuracy δ F of a measured system if the measurement depends on


n parameters being measured, i.e.:

F = f (m1 ,m 2 ,...,m n )

A: Form a Taylor-series expansion we have


∂f ∂f ∂f
∂F = ∂m1 + ∂m2 + ... + ∂mn
∂m1 ∂m2 ∂mn

Since the ∂ m i ’s are random variables, we can use:


1/ 2
 ∂ f  2 2  ∂ f  2 2  ∂f 
2

δ F = ±   δm1 +   δ m2 +... +  2
δ mn 
  ∂ m1   ∂ m2   ∂ mn  

thus, one can add errors add in an RMS (root mean square) sense!

MAE175a Error Analysis – R.A. de Callafon – Page 51


LINEAR REGRESSION

Assumptions:
(1) more measurements than
needed for curve
(2) only random errors
(3) independent measurements

Y = aX + b = regression
equation
a, b = regression coefficients.

The idea is to capture the measurements in a linear regression model Y = aX + b, where a,


b are the regression coefficients to be determined.

Methods for getting Y = aX + b:


(1) graphic method (“eyeball”): works OK, but subjective.
(2) least squares

MAE175a Error Analysis – R.A. de Callafon – Page 52


LINEAR REGRESSION – least squares
Assume errors occurred only in the Y measurement, then measurements should satisfy:
Y1 = a X1 + b + E1
Y2 = a X2 + b + E2
:
Yn = a Xn + b + En
Short hand notation in matrix form:
T
Y = X [a b] + E
With
T
Y = [ Y1 ; Y2 ; .. ; Yn ] := [ Y1 Y2 .. Yn ]
X = [X1 1 ; X2 1 ; .. ; Xn 1]
E = [ E1 ; E2 ; .. ; En ]

MAE175a Error Analysis – R.A. de Callafon – Page 53


LINEAR REGRESSION – least squares
Least Squares Estimation:
Find the parameter [a b] such that ||E||2 is minimized, where
T
||E||2 = tr{E E}
Solution to Least Squares:
1. Convex optimization (minimum of a quadratic function)
2. Orthogonal projection (to find minimum error norm)
Both solutions are the same…
LINEAR REGRESSION – least squares
Consider
T
Y = X [a b] + E

T
To find the parameter [a b] via optimization of ||E||2 = tr{E E}:
T T T T
tr{E E} = tr{[Y – X [a b]][Y – X [a b] ]}

MAE175a Error Analysis – R.A. de Callafon – Page 54


LINEAR REGRESSION – least squares
Setting d||E||2/d[a b] = 0 will give the optimal solution:
T T T T
d||E||2/d[a b] = [Y – [a b] X ]X = Y X – [a b] X X = 0
Solving for [a b] yields:
[a b] = YTX [XTX]-1

To find the parameter [a b] via orthogonal projection, smallest distance E between Y =


T T T
X [a b] and Y = X [a b] + E is found by orthogonal projection of Y onto X [a b] . This
T
projection makes E orthogonal to X so choose error E such that X E = 0:
T T T T T T
X Y = X X [a b] + X E = X X [a b]
making
[a b] = YTX [XTX]-1

MAE175a Error Analysis – R.A. de Callafon – Page 55


LINEAR REGRESSION – least squares

Σy 2 − bΣxy
Standard error of the estimate: SYX =
n−2
Σxy
Correlation coefficient: r=
Σx 2 Σy 2

The correlation coefficient for a population infers correlation between X and Y, but not for
samples, except to within some uncertainty. Tables allow one to decide the significance
of r for samples with degree-of-freedom defined as df = n - 2, to various probabilities.

MAE175a Error Analysis – R.A. de Callafon – Page 56


LINEAR REGRESSION – least squares

Unexplained variation: (Y − Y ′) 2

2
Explained variation: (Y ′ − Y )

Coefficient of determination:
2
Σ (Y ′ − Y )
r2 = 2
Σ(Y − Y )

Correlation coefficient: r
r has the same sign as b

MAE175a Error Analysis – R.A. de Callafon – Page 57


ERROR ANALYSIS IN YOUR REPORT

Typical Procedure:

• Experiments in lab will require you to estimate certain (physical) parameters


• Experiments need to be performed several times
Error Analysis in Report Should Include (all that applies):

• Estimate of mean and standard deviation of parameter estimates

• Confidence interval of parameter estimate (based on t-distribution)

• Indication of error sources in experiments (what is causing errors?)


o Intrinsic & Application Related Errors
o Integration Errors

• Error Propagation
o Especially if a parameters estimate is based on several measurements
o Indicate how errors propagate (using Taylor series approximation)

MAE175a Error Analysis – R.A. de Callafon – Page 58


Standard Normal Distribution Table

a 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.0 0.0000 0.0040 0.0080 0.0120 0.0160 0.0199 0.0239 0.0279 0.0319 0.0359
0.1 0.0398 0.0438 0.0478 0.0517 0.0557 0.0596 0.0636 0.0675 0.0714 0.0753
0.2 0.0793 0.0832 0.0871 0.0910 0.0948 0.0987 0.1026 0.1064 0.1103 0.1141
0.3 0.1179 0.1217 0.1255 0.1293 0.1331 0.1368 0.1406 0.1443 0.1480 0.1517
0.4 0.1554 0.1591 0.1628 0.1664 0.1700 0.1736 0.1772 0.1808 0.1844 0.1879
0.5 0.1915 0.1950 0.1985 0.2019 0.2054 0.2088 0.2123 0.2157 0.2190 0.2224
0.6 0.2257 0.2291 0.2324 0.2357 0.2389 0.2422 0.2454 0.2486 0.2517 0.2549
0.7 0.2580 0.2611 0.2642 0.2673 0.2704 0.2734 0.2764 0.2794 0.2823 0.2852
0.8 0.2881 0.2910 0.2939 0.2967 0.2995 0.3023 0.3051 0.3078 0.3106 0.3133
0.9 0.3159 0.3186 0.3212 0.3238 0.3264 0.3289 0.3315 0.3340 0.3365 0.3389
1.0 0.3413 0.3438 0.3461 0.3485 0.3508 0.3531 0.3554 0.3577 0.3599 0.3621
1.1 0.3643 0.3665 0.3686 0.3708 0.3729 0.3749 0.3770 0.3790 0.3810 0.3830
1.2 0.3849 0.3869 0.3888 0.3907 0.3925 0.3944 0.3962 0.3980 0.3997 0.4015
1.3 0.4032 0.4049 0.4066 0.4082 0.4099 0.4115 0.4131 0.4147 0.4162 0.4177
1.4 0.4192 0.4207 0.4222 0.4236 0.4251 0.4265 0.4279 0.4292 0.4306 0.4319
1.5 0.4332 0.4345 0.4357 0.4370 0.4382 0.4394 0.4406 0.4418 0.4429 0.4441
1.6 0.4452 0.4463 0.4474 0.4484 0.4495 0.4505 0.4515 0.4525 0.4535 0.4545
1.7 0.4554 0.4564 0.4573 0.4582 0.4591 0.4599 0.4608 0.4616 0.4625 0.4633
1.8 0.4641 0.4649 0.4656 0.4664 0.4671 0.4678 0.4686 0.4693 0.4699 0.4706
1.9 0.4713 0.4719 0.4726 0.4732 0.4738 0.4744 0.4750 0.4756 0.4761 0.4767
2.0 0.4772 0.4778 0.4783 0.4788 0.4793 0.4798 0.4803 0.4808 0.4812 0.4817
2.1 0.4821 0.4826 0.4830 0.4834 0.4838 0.4842 0.4846 0.4850 0.4854 0.4857
2.2 0.4861 0.4864 0.4868 0.4871 0.4875 0.4878 0.4881 0.4884 0.4887 0.4890
2.3 0.4893 0.4896 0.4898 0.4901 0.4904 0.4906 0.4909 0.4911 0.4913 0.4916
2.4 0.4918 0.4920 0.4922 0.4925 0.4927 0.4929 0.4931 0.4932 0.4934 0.4936
2.5 0.4938 0.4940 0.4941 0.4943 0.4945 0.4946 0.4948 0.4949 0.4951 0.4952
2.6 0.4953 0.4955 0.4956 0.4957 0.4959 0.4960 0.4961 0.4962 0.4963 0.4964
2.7 0.4965 0.4966 0.4967 0.4968 0.4969 0.4970 0.4971 0.4972 0.4973 0.4974
2.8 0.4974 0.4975 0.4976 0.4977 0.4977 0.4978 0.4979 0.4979 0.4980 0.4981
2.9 0.4981 0.4982 0.4982 0.4983 0.4984 0.4984 0.4985 0.4985 0.4986 0.4986
3.0 0.4987 0.4987 0.4987 0.4988 0.4988 0.4989 0.4989 0.4989 0.4990 0.4990
NOTE: Each entry of the table contains the value of P(0<z<a), where rows = first decimal
value of a and columns = second decimal value of a

Error Analysis MAE126a/MAE171a/MAE175a – R.A. de Callafon – Page 59


Inverse T-Distribution Table

df 0.1 0.05 0.025 0.01 0.005 0.001 0.0005


1 3.078 6.314 12.706 31.821 63.656 318.289 636.578
2 1.886 2.920 4.303 6.965 9.925 22.328 31.600
3 1.638 2.353 3.182 4.541 5.841 10.214 12.924
4 1.533 2.132 2.776 3.747 4.604 7.173 8.610
5 1.476 2.015 2.571 3.365 4.032 5.894 6.869
6 1.440 1.943 2.447 3.143 3.707 5.208 5.959
7 1.415 1.895 2.365 2.998 3.499 4.785 5.408
8 1.397 1.860 2.306 2.896 3.355 4.501 5.041
9 1.383 1.833 2.262 2.821 3.250 4.297 4.781
10 1.372 1.812 2.228 2.764 3.169 4.144 4.587
11 1.363 1.796 2.201 2.718 3.106 4.025 4.437
12 1.356 1.782 2.179 2.681 3.055 3.930 4.318
13 1.350 1.771 2.160 2.650 3.012 3.852 4.221
14 1.345 1.761 2.145 2.624 2.977 3.787 4.140
15 1.341 1.753 2.131 2.602 2.947 3.733 4.073
16 1.337 1.746 2.120 2.583 2.921 3.686 4.015
17 1.333 1.740 2.110 2.567 2.898 3.646 3.965
18 1.330 1.734 2.101 2.552 2.878 3.610 3.922
19 1.328 1.729 2.093 2.539 2.861 3.579 3.883
20 1.325 1.725 2.086 2.528 2.845 3.552 3.850
21 1.323 1.721 2.080 2.518 2.831 3.527 3.819
22 1.321 1.717 2.074 2.508 2.819 3.505 3.792
23 1.319 1.714 2.069 2.500 2.807 3.485 3.768
24 1.318 1.711 2.064 2.492 2.797 3.467 3.745
25 1.316 1.708 2.060 2.485 2.787 3.450 3.725
26 1.315 1.706 2.056 2.479 2.779 3.435 3.707
27 1.314 1.703 2.052 2.473 2.771 3.421 3.689
28 1.313 1.701 2.048 2.467 2.763 3.408 3.674
29 1.311 1.699 2.045 2.462 2.756 3.396 3.660
30 1.310 1.697 2.042 2.457 2.750 3.385 3.646
60 1.296 1.671 2.000 2.390 2.660 3.232 3.460
Infinity 1.282 1.645 1.960 2.326 2.576 3.091 3.291
NOTE: Each entry in the table contains the value of tα, where rows = degrees of freedom
and columns = P(t> tα).
END OF LECTURE

MAE1715a Error Analysis – R.A. de Callafon – Page 60

You might also like