Error Analysis Lecture
Error Analysis Lecture
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
[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.
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.
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
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!
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.
A little history:
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).
Hysteresis will yield different measurements in case the input increases or decreases and
this error is bad for measurements!
Linearity makes it easy to find a relation between measured quantity and resulting output
signal: a linear relation.
most important element: the sensor (transduces and conditions the `event to measure’, so
it can be processed by the data acquisition system)
Transducers/sensors
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
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
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)
Multiplexer Circuitry
Switch to connect N different sensor input channels to one
data measuring equipment (ADC).
Characteristics:
(1) switching rate
(2) cross-talk.
Error is defined as the difference between event to measure and quantified event. This
error can characterized as the absolute difference.
Error
Error in % of reading System Output × 100
≡
Error
Error in % of Full Scale (FS) FS Output × 100
≡
All these errors are due to the different components in the measurement chain.
(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)
(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)
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.
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
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.
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.
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.
Σ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
Deviation: di = ei − µ di = ei − e
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.
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.
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 ) =
2π
∫ e dz (tabulated on page 59) can be used for calculations!
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.
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.
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…
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
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:
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.
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.
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
a, b from x 2 distribution
F = f (m1 ,m 2 ,...,m n )
thus, one can add errors add in an RMS (root mean square) sense!
Assumptions:
(1) more measurements than
needed for curve
(2) only random errors
(3) independent measurements
Y = aX + b = regression
equation
a, b = regression coefficients.
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] ]}
Σ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.
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
Typical Procedure:
• Error Propagation
o Especially if a parameters estimate is based on several measurements
o Indicate how errors propagate (using Taylor series approximation)
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