“Statistics for Analytical Chemistry” J.C. Miller and J.N. Miller,
Second Edition, 1992, Ellis Horwood Limited
“Fundamentals of Analytical Chemistry”
Skoog, West and Holler, 7th Ed., 1996
(Saunders College Publishing)
Industrial Processes: analysis for quality control, and “reverse engineering”
(i.e. finding out what your competitors are doing).
Environmental Analysis: familiar to those who attended the second year
“Environmental Chemistry” modules. A very wide range of problems and types of analyte
Regulatory Agencies: dealing with many problems from first two.
Academic and Industrial Synthetic Chemistry: of great interest to many of my colleagues. I will not be dealing with this type of problem.
Select sample
Extract analyte(s) from matrix
Separate analytes
Detect, identify and quantify analytes
Determine reliability and significance of results
Impossible to eliminate errors.
How reliable are our data?
Data of unknown quality are useless!
•Carry out replicate measurements
•Analyse accurately known standards
•Perform statistical tests on data
Defined as follows: x =
N i = 1 x i
N
Where x i
= individual values of x and N = number of replicate measurements
The middle result when data are arranged in order of size (for even numbers the mean of middle two). Median can be preferred when there is an “ outlier ” - one reading very different from rest. Median less affected by outlier than is mean.
Illustration of “Mean” and “Median”
Results of 6 determinations of the Fe(III) content of a solution, known to contain 20 ppm:
Note : The mean value is 19.78 ppm (i.e. 19.8ppm
) - the median value is 19.7 ppm
Relates to reproducibility of results..
How similar are values obtained in exactly the same way?
Useful for measuring this:
Deviation from the mean : d i
x i
x
Measurement of agreement between experimental mean and true value (which may not be known!).
Measures of accuracy:
Absolute error : E = x i
- x t
(where x t
= true or accepted value)
Relative error :
E r
x i
x t x t
100%
(latter is more useful in practice)
Illustrating the difference between “ accuracy
” and “ precision
”
Low accuracy, low precision Low accuracy, high precision
High accuracy, low precision High accuracy, high precision
Some analytical data illustrating “accuracy” and “precision”
H N
H
S
NH
3
+Cl-
H
Analyst 4: imprecise, inaccurate
Analyst 3: precise, inaccurate
Analyst 2: imprecise, accurate
Analyst 1: precise, accurate
Benzyl isothiourea hydrochloride
O
OH
N
Nicotinic acid
Three types:
(1) Random (indeterminate) Error
Data scattered approx. symmetrically about a mean value.
Affects precision - dealt with statistically (see later).
(2) Systematic (determinate) Error
Several possible sources - later. Readings all too high or too low. Affects accuracy.
(3) Gross Errors
Usually obvious - give “ outlier
” readings.
Detectable by carrying out sufficient replicate measurements.
1. Instrument Error
Need frequent calibration - both for apparatus such as volumetric flasks, burettes etc., but also for electronic devices such as spectrometers.
2. Method Error
Due to inadequacies in physical or chemical behaviour of reagents or reactions (e.g. slow or incomplete reactions)
Example from earlier overhead - nicotinic acid does not react completely under normal Kjeldahl conditions for nitrogen determination.
3. Personal Error e.g. insensitivity to colour changes; tendency to estimate scale readings to improve precision; preconceived idea of
“true” value.
can be constant (e.g. error in burette reading less important for larger values of reading) or proportional (e.g. presence of given proportion of interfering impurity in sample; equally significant for all values of measurement)
Minimise instrument errors by careful recalibration and good maintenance of equipment.
Minimise personal errors by care and self-discipline
Method errors - most difficult. “True” value may not be known.
Three approaches to minimise:
•analysis of certified standards
•use 2 or more independent methods
•analysis of blanks
There are always a large number of small, random errors in making any measurement.
These can be small changes in temperature or pressure; random responses of electronic detectors (“noise”) etc.
Suppose there are 4 small random errors possible.
Assume all are equally likely, and that each causes an error of
U in the reading.
Possible combinations of errors are shown on the next slide:
Combination of Random Errors
+U+U+U+U
-U+U+U+U
+U-U+U+U
+U+U-U+U
+U+U+U-U
-U-U+U+U
-U+U-U+U
-U+U+U-U
+U-U-U+U
+U-U+U-U
+U+U-U-U
+U-U-U-U
-U+U-U-U
-U-U+U-U
-U-U-U+U
-U-U-U-U
Total Error
+4U
+2U
0
-2U
No.
1
4
6
4
Relative Frequency
1/16 = 0.0625
4/16 = 0.250
6/16 = 0.375
4/16 = 0.250
-4U 1 1/16 = 0.01625
The next overhead shows this in graphical form
Frequency Distribution for
Measurements Containing Random Errors
4 random uncertainties
A very large number of random uncertainties
10 random uncertainties
This is a
Gaussian or normal error curve.
Symmetrical about the mean.
Replicate Data on the Calibration of a 10ml Pipette
No.
13
14
15
16
8
9
10
11
12
17
5
6
3
4
7
1
2
Mean volume
Spread
Vol, ml.
9.982
9.981
9.990
9.980
9.989
9.978
9.971
9.982
9.983
9.988
9.988
9.973
9.986
9.980
9.975
9.982
9.986
9.982 ml
0.025 ml
No.
30
31
32
33
25
26
27
28
29
34
18
19
20
21
22
23
24
Vol, ml.
9.978
9.983
9.982
9.991
9.981
9.969
9.985
9.977
9.976
9.983
9.975
9.980
9.994
9.992
9.984
9.981
9.987
Median volume 9.982 ml
Standard deviation 0.0056 ml
No.
47
48
49
50
42
43
44
45
46
35
36
37
38
39
40
41
Vol, ml
9.982
9.977
9.977
9.986
9.978
9.983
9.980
9.983
9.979
9.976
9.990
9.988
9.971
9.986
9.978
9.986
Calibration data in graphical form
A = histogram of experimental results
B = Gaussian curve with the same mean value, the same precision (see later) and the same area under the curve as for the histogram.
SAMPLE = finite number of observations
POPULATION = total (infinite) number of observations
Properties of Gaussian curve defined in terms of population.
Then see where modifications needed for small samples of data
Main properties of Gaussian curve :
Population mean ( m
) : defined as earlier (N
). In absence of systematic error, m is the true value (maximum on Gaussian curve).
Remember, sample mean ( x ) defined for small values of N.
(Sample mean
population mean when N
20)
Population Standard Deviation ( s
) - defined on next overhead
s
: measure of precision of a population of data, given by: s i
N
(
m
)
1 x i
2
N
Where m
= population mean; N is very large.
The equation for a Gaussian curve is defined in terms of m and s
, as follows:
( x m
) / 2 s 2 y
e s
2
Two Gaussian curves with two different standard deviations, s
A and s
B
(=2 s
A
)
General Gaussian curve plotted in units of z, where z = (x m
)/ s i.e. deviation from the mean of a datum in units of standard deviation. Plot can be used for data with given value of mean, and any standard deviation.
Area under a Gaussian Curve
From equation above, and illustrated by the previous curves,
68.3% of the data lie within s of the mean ( m ), i.e. 68.3% of the area under the curve lies between s of m .
Similarly, 95.5% of the area lies between s , and 99.7% between s .
There are 68.3 chances in 100 that for a single datum the random error in the measurement will not exceed s .
The chances are 95.5 in 100 that the error will not exceed s .
Sample Standard Deviation, s
The equation for s must be modified for small samples of data, i.e. small N
2.
1.
s
i
N
( )
2
1 x i
x
N
1
Two differences cf. to equation for s
:
Use sample mean instead of population mean.
Use degrees of freedom , N - 1 , instead of N .
Reason is that in working out the mean, the sum of the differences from the mean must be zero. If N - 1 values are known, the last value is defined. Thus only N - 1 degrees of freedom. For large values of N , used in calculating s
, N and N - 1 are effectively equal.
Alternative Expression for s
(suitable for calculators) s
(
( i
N
1 x i
2
)
N
1 i
N
1
N x i
)
2
Note: NEVER round off figures before the end of the calculation
Standard Deviation of a Sample
Sample
1
2
3
4
5
6
7
8
9
Reproducibility of a method for determining the % of selenium in foods. 9 measurements were made on a single batch of brown rice.
Selenium content ( m g/g) (x
I
)
0.07
0.07
0.08
0.07
0.07
0.08
0.08
0.09
0.08
x i
2
0.0049
0.0049
0.0064
0.0049
0.0049
0.0064
0.0064
0.0081
0.0064
S x i
Mean =
S x i
/N= 0.077
m g/g
=
Standard deviation: s
0.69
S x i
2 = 0.0533
(
S x i
) 2 /N = 0.4761/9 = 0.0529
.
.
.
.
Coefficient of variance = 9.2% Concentration = 0.077 ± 0.007 m g/g
Standard Error of a Mean
The standard deviation relates to the probable error in a single measurement.
If we take a series of N measurements, the probable error of the mean is less than the probable error of any one measurement.
The standard error of the mean , is defined as follows: s m
s
N
Pooled Data
To achieve a value of s which is a good approximation to s
, i.e.
N
20, it is sometimes necessary to pool data from a number of sets of measurements
(all taken in the same way).
Suppose that there are t small sets of data, comprising N
1
, N
2
,….
N t
The equation for the resultant sample standard deviation is: measurements.
s pooled
i
N
1
1
( x i
x
1
)
2 i
N
2
1
( x i
x
2
)
2 i
N
3
1
( x i
x
3
)
2
....
N
1
N
2
N
3
......
t
( Note: one degree of freedom is lost for each set of data)
Pooled Standard Deviation
Analysis of 6 bottles of wine for residual sugar.
Bottle Sugar % (w/v) No. of obs.
1 0.94
3
2
3
4
5
6
1.08
1.20
0.67
0.83
0.76
4
5
4
3
4
Deviations from mean
0.05, 0.10, 0.08
0.06, 0.05, 0.09, 0.06
0.05, 0.12, 0.07, 0.00, 0.08
0.05, 0.10, 0.06, 0.09
0.07, 0.09, 0.10
0.06, 0.12, 0.04, 0.03
s
1
0 05 ) 2
010 2
0 08 ) 2
2
2
.
.
Set n
1
2
3
4
5
6
Total
( x i
x )
2
0.0189
0.0178
0.0282
0.0242
0.0230
0.0205
0.1326
s n
0.097
0.077
0.084
0.090
0.107
0.083
s pooled
Two alternative methods for measuring the precision of a set of results:
VARIANCE :
This is the square of the standard deviation: s
2 i
N
( )
1 x i
2 x
2
N
1
COEFFICIENT OF VARIANCE (CV)
(or RELATIVE STANDARD DEVIATION ):
Divide the standard deviation by the mean value and express as a percentage:
CV
s
( ) 100% x
How can we relate the observed mean value ( x
) to the true mean ( m
)?
The latter can never be known exactly.
The range of uncertainty depends how closely s corresponds to s
.
We can calculate the limits (above and below) around x that m must lie, with a given degree of probability.
Define some terms:
CONFIDENCE LIMITS interval around the mean that probably contains m
.
CONFIDENCE INTERVAL the magnitude of the confidence limits
CONFIDENCE LEVEL fixes the level of probability that the mean is within the confidence limits
Examples later.
First assume that the known s is a good approximation to s
.
Percentages of area under Gaussian curves between certain limits of z (= x m/s
)
50%
80%
90%
95%
99% of area lies between
0.67
s
“
1.29
s
“
“
“
1.64
s
1.96
s
2.58
s
What this means, for example, is that 80 times out of 100 the true mean will lie between
1.29
s of any measurement we make.
Thus, at a confidence level of 80%, the confidence limits are
1.29
s .
For a single measurement: CL for m
= x
z s
(values of z on next overhead)
For the sample mean of N measurements ( x ), the equivalent expression is:
CL for m z s
N
Confidence level, %
50
68
80
90
95
96
99
99.7
99.9
z
0.67
1.0
1.29
1.64
1.96
2.00
2.58
3.00
3.29
Note : these figures assume that an excellent approximation to the real standard deviation is known.
Confidence Limits when s is known
Atomic absorption analysis for copper concentration in aircraft engine oil gave a value of 8.53 m g Cu/ml. Pooled results of many analyses showed s
s
= 0.32 m g Cu/ml.
Calculate 90% and 99% confidence limits if the above result were based on (a) 1, (b) 4,
(c) 16 measurements.
(a)
(b)
90% CL
.
164 0 32 )
.
1 i.e. 8 5 0 5 m g / ml
99% CL
.
2 58 0 32 )
.
1 i.e. 8 5 0 8 m g / ml
.
m g / ml
.
m g / ml
90% CL
.
164 0 32 )
.
4 i.e. 8 5 0 3 m g / ml
99% CL
.
2 58 0 32 )
.
4 i.e. 8 5 0 4 m g / ml
.
m g / ml
.
m g / ml
(c)
90% CL
.
1 64 0 32 )
.
16 i.e. 8 5 0 1 m g / ml
99% CL
.
2 58 0 32 )
.
16 i.e. 8 5 0 2 m g / ml
.
m g / ml
.
m g / ml
If we have no information on s
, and only have a value for s the confidence interval is larger, i.e. there is a greater uncertainty.
Instead of z , it is necessary to use the parameter t , defined as follows: t = ( x m
)/ s i.e. just like z , but using s instead of s
.
By analogy we have:
CL for m ts
N
The calculated values of t are given on the next overhead
Values of t for various levels of probability
Note :
Degrees of freedom
3
4
(N-1)
1
2
5
6
7
8
9
19
59
(1)
(2)
80%
3.08
1.89
1.64
1.53
1.48
1.44
1.42
1.40
1.38
1.33
1.30
1.29
90%
6.31
2.92
2.35
2.13
2.02
1.94
1.90
1.86
1.83
1.73
1.67
1.64
95%
12.7
4.30
3.18
2.78
2.57
2.45
2.36
2.31
2.26
2.10
2.00
1.96
99%
63.7
9.92
5.84
4.60
4.03
3.71
3.50
3.36
3.25
2.88
2.66
2.58
As (N-1)
, so t
z
For all values of (N-1) <
, t > z, I.e. greater uncertainty
Confidence Limits where s is not known
Analysis of an insecticide gave the following values for % of the chemical lindane:
7.47, 6.98, 7.27. Calculate the CL for the mean value at the 90% confidence level.
x i
%
7.47
6.98
7.27
x i
2
55.8009
48.7204
52.8529
S x i
= 21.72
S x i
2
= 157.3742
x
N x i
2172
3
s
x i
2
N
.
.
(
1
N x i
)
2
( 21 72 )
2
3
2
90% CL
.
ts
N
.
2 92 0 25 )
3
If repeated analyses showed that s
s
= 0.28%: 90% CL
z s
.
.
N
164 0 28 )
3
Testing a Hypothesis
Carry out measurements on an accurately known standard.
Experimental value is different from the true value.
Is the difference due to a systematic error (bias) in the method - or simply to random error?
Assume that there is no bias
( NULL HYPOTHESIS ) , and calculate the probability that the experimental error is due to random errors.
Figure shows (A) the curve for the true value ( m
A
= m t
) and
(B) the experimental curve ( m
B
)
Bias = m
B
m
A
= m
B
- x t
.
Test for bias by comparing x
x t
with the difference caused by random error
Remember confidence limit for m
(assumed to be x t is given by:
, i.e. assume no bias )
CL for m ts
N
at desired confidence level, random errors can lead to: x
x t
ts
N
if x
x t
ts
N
, then at the desired confidence level bias (systematic error) is likely (and vice versa).
Detection of Systematic Error (Bias)
A standard material known to contain
38.9% Hg was analysed by atomic absorption spectroscopy.
The results were 38.9%, 37.4% and 37.1%. At the 95% confidence level, is there any evidence for a systematic error in the method?
x
x i
113 4 x x t
x i
2
.
( . )
2
3
2
Assume null hypothesis (no bias).
Only reject this if x
x t
ts N
But t (from Table) = 4.30, s (calc. above) = 0.943% and N = 3 ts N
.
.
3
.
x t
ts N
Therefore the null hypothesis is maintained, and there is no evidence for systematic error at the 95% confidence level.
Are two sets of measurements significantly different?
Suppose two samples are analysed under identical conditions.
Sample 1
Sample 2
x
1
from N
1
replicate analyses x
2
from N
2
replicate analyses
Are these significantly different?
Using definition of pooled standard deviation, the equation on the last overhead can be re-arranged: x
1
x
2
ts pooled
N
1
N
2
N N
2
Only if the difference between the two samples is greater than the term on the right-hand side can we assume a real difference between the samples.
Test for significant difference between two sets of data
Two different methods for the analysis of boron in plant samples gave the following results ( m g/g):
(spectrophotometry)
(fluorimetry)
Each based on 5 replicate measurements.
At the 99% confidence level, are the mean values significantly different?
Calculate s pooled
= 0.267. There are 8 degrees of freedom, therefore (Table) t = 3.36 (99% level).
Level for rejecting null hypothesis is
ts N
1
N
2
N N
2
- i.e.
3 36 0 267 ) 10 25 i.e. ± 0.5674, or ±0.57 m g/g.
But x
1
x
2
.
.
.
m g / g i. e. x
1
x
2
ts pooled
N
1
N N N
2 1 2
Therefore, at this confidence level, there is a significant difference, and there must be a systematic error in at least one of the methods of analysis .
Detection of Gross Errors
A set of results may contain an outlying result
- out of line with the others.
Should it be retained or rejected?
There is no universal criterion for deciding this.
One rule that can give guidance is the Q test .
Consider a set of results
The parameter Q exp is defined as follows:
Q exp
x q
x n
/w where x q x n
= questionable result
= nearest neighbour w = spread of entire set
Q exp is then compared to a set of values Q crit:
Q crit
(reject if Q expt
> Q crit
)
No. of observations 90% 95% 99% confidencelevel
5
6
7
3
4
8
9
0.941
0.765
0.468
0.437
0.970
0.829
0.526
0.493
0.994
0.926
0.642
0.710
0.821
0.560
0.625
0.740
0.507
0.568
0.680
0.634
0.598
10 0.412
0.466
0.568
Rejection of outlier recommended if Q exp
> Q crit for the desired confidence level.
Note :1. The higher the confidence level, the less likely is rejection to be recommended.
2. Rejection of outliers can have a marked effect on mean and standard deviation, esp. when there are only a few data points. Always try to obtain more data .
3. If outliers are to be retained, it is often better to report the median value rather than the mean .
Q Test for Rejection of Outliers
Q exp
The following values were obtained for the concentration of nitrite ions in a sample of river water: 0.403, 0.410, 0.401, 0.380 mg/l.
Should the last reading be rejected?
.
.
( .
.
)
.
But Q crit
= 0.829 (at 95% level) for 4 values
Therefore, Q exp
< Q crit
, and we cannot reject the suspect value.
Suppose 3 further measurements taken, giving total values of:
0.403, 0.410, 0.401, 0.380, 0.400, 0.413, 0.411 mg/l. Should
0.380 still be retained?
Q exp
.
.
( .
.
)
But Q crit
= 0.568 (at 95% level) for 7 values
Therefore, Q exp
> Q crit
, and rejection of 0.380 is recommended.
.
But note that 5 times in 100 it will be wrong to reject this suspect value!
Also note that if 0.380 is retained, s = 0.011 mg/l, but if it is rejected, s = 0.0056 mg/l, i.e. precision appears to be twice as good, just by rejecting one value.
Obtaining a representative sample
Homogeneous gaseous or liquid sample
No problem – any sample representative.
Solid sample - no gross heterogeneity
Take a number of small samples at random from throughout the bulk - this will give a suitable representative sample.
Solid sample - obvious heterogeneity
Take small samples from each homogeneous region and mix these in the same proportions as between each region and the whole.
If it is suspected, but not certain, that a bulk material is heterogeneous, then it is necessary to grind the sample to a fine powder, and mix this very thoroughly before taking random samples from the bulk.
For a very large sample - a train-load of metal ore, or soil in a field - it is always necessary to take a large number of random samples from throughout the whole.
May be many analytes present separation - see later.
May be small amounts of analyte(s) in bulk material.
Need to concentrate these before analysis.e.g. heavy metals in animal tissue, additives in polymers, herbicide residues in flour etc. etc.
May be helpful to concentrate complex mixtures selectively .
Most general type of pre-treatment: EXTRACTION .
Classical extraction method is:
SOXHLET EXTRACTION
(named after developer).
Apparatus
Sample in porous thimble.
Exhaustive reflux for up to 1 - 2 days.
Solution of analyte(s) in volatile solvent
(e.g. CH
2
Cl
2
, CHCl
3 etc.)
Evaporate to dryness or suitable concentration, for separation/analysis.