Vous êtes sur la page 1sur 8

CTEC233: Chemical Analysis

Handout 2-3: Statistical Analysis of data


Measurement uncertainties.

Every measurement carries some degree of uncertainty no matter how good the measurement process can be. The
uncertainties are synonymous to the errors incurred in the measurement process.

Categories of the errors.


Gross:

(a)

(i)
(ii)
(iii)

blunders
data not befitting the observed pattern of variation.
yield outliers.

(b) Systematic:
(i)
determinate, assignable and causes a consistent effect.
(ii) causes recognizable difference between the mean and an acceptable value or the true value where it is
known.
(iii) affect the accuracy (trueness) of the measurement. Cannot be revealed by replication.
(iv) minimizable/reducible if identified.
(v) comes from instrumental drifts/shifts, method bias and bias due to personal performance/ judgment.
(vi) effect can be constant (independent of sample size) or proportional (proportional to sample size).
Where a true or accepted value (certified value) or mean value of a large sample size is available, accuracy can be
expressed as the:
(i)
the absolute error, E x
i

(ii)

% relative error,

RE

xi

100%

Calculation of the actual error (bias) is only possible if the true value,, is known.

Reducing systematic errors

(i)
(ii)
(iii)

(b)

Calibration of apparatus and instruments.


Evaluation of method performance.
Judiciary adherence to validated procedures and work instructions.

Random:

(i)
(ii)
(iii)
(iv)
(v)

(vi)
(vii)

indeterminate and fluctuative variations about the mean.


variations whose cumulative effect is to scatter measurements about the mean.
equal chances of positive and negative deviations about the mean.
emanates from uncontrollable variables inherent in instruments (fluctuations), variable observations due to
environmental influences, variability in executions and the method performances.
frequency distribution of the deviations (about accepted value) takes a Gaussian or Bell-shaped curve. The
variation is also called normal distribution (or error curve).
affect mainly the precision (reproducibility + repeatability) and also the accuracy.
cannot be completely eliminated (intrinsic variations).

Distribution of random errors.

Distribution of the deviations about the mean, , (sample) or the true value, , (population) take a Gaussian
distribution.
The Gaussian curve (shown below), also called the normal error curve has a distribution equation:
( x ) 2

2 2

The sample mean (a good approximation of (n > 30)) is expressed as:

(i)

sx

x
i 1

i 1

n 1

N = n -1 is degree of freedom.

Variance = s2x in the square of the standard deviation and is a positive quantity.
sx and s2x values are expressions of precision.
low values of sx, and sx2 implies high precision and vice versa.

The precision of the means (averaged sets of data) can be expressed as the mean standard deviation sm (also called
standard error or standard deviation of the mean).

sm

the sample standard deviation, sx, (a good approximation of (n > 30) is given by:
N

(ii)

s
n

Pooling the standard deviation for k data sets, each having n1; n2..nk replicates.
na

s pld

nz

j 1

z 1

( xi - x1 ) 2 nb 1( x j - x2 ) 2 ......... nz -1( xz - xz ) 2

na -1

i 1

( na nb ....n z ) - N

Corresponding estimated standard error, SE, sm about pooled data would be:

SE =
Properties of the Normal error curve.
(i)
(ii)
(iii)
(iv)

s pld
1 1
1
+ +..
n1 n 2 nk

Unimodal i.e. highest frequency occurs at the mean value.


Symmetrical about the mean (or true value).
Area bound under the curve by any chosen two limits of deviations, A and B = total probability of measuring the
data bound by the limits A and B.
Thus, given the above and for single measurements where determinate errors are absent expect:
a)
about 68% of population data to be within bounds of < < ,
b)
95.5% within 2 < < 2
c)
while 99.7 within 3 < < 3.
For grouped data sets, same distribution ratio:

68% of the means of the grouped data are within (/N) < < (/N),

95.5% of the means of the grouped data are within (2N) < < (2N) and

99.7 of the means of the grouped data are within (3N) < < (3N) of the
error curve, respectively.
This becomes the statistical basis for controlling random errors and improving the precision in routine analysis.

Example 1: Sample mean and standard deviation and the standard error.
1 (n=3)
2 (n=3)
3 (n=3)
4(n=3)
5 (n=3)
1.752
1.762
1.760
1.759
1.758
1.757
1.766
1.762
1.756
1.760
1.761
1.753
1.768
1.764
1.762
Three samples of voltaic cells were drawn out on an hourly basis from a production line and their weights recorded.
(i)
Calculate the mean production weight/mass, the standard deviation and the variance over the 5 h production period.
(ii)
Calculate the standard error (absolute uncertainty) in the mean weight of the voltaic cells. Use your scientific calculator
(in the Stats mode) to input the data.

(iii)
Ans:

If the targeted weight was 1.758 g, calculate the % relative standard deviation of weights from the targeted
production weight.
(i)
(ii)

mean weight of the cells:


= 1.760 g;
and standard deviation, sx = 4.441 x 10-3 g.
variance = sx2 = 1.943 x10-5 g2
Standard error, sm = (sx/ 3 ) = 0.00256 g 0.003 g

(iii)

Thus,
= (1.760 0.003) g.
Do this on your own.

Reporting analytical data

Always Report replicated data as {(recorded/calculated value) standard error}


(i)
quote recorded value/ calculated value to the correct significant figures (s.f.).
(ii)
quote 1 s.f. for the standard error.
Significant figures (s.f.)

Digits that are certainly known in a number (or measurement value), including its estimated and uncertain digit
when the number is expressed in its standard form.
(i)
12.00 cm, 4 s.f.
12.0 cm is certain. The 2nd zero is uncertain, i.e. scales can measure accurately to only 0.01 cm.
(iii)
If 120 mm is reported as 1.2 x 102 mm, the result has 2 s.f., i.e. 1 mm is accurately recorded, the 0.2 is
uncertain.
If 120 mm is presented as 1.20 x 102 mm, the result has 3 s.f. instrument can measure accurately upto
0.1 mm.
Thus, 120 mm (non-standard form) is an ambiguous record of the measurement.

The number of s.f. assured in a number gives an idea of the level of precision in the measurement of that value.

If the standard error is estimated to be 0.2 mm:


the measured length of 1.20 x 102 mm is reported as (120.0 0.2) mm or (1.200 0.002) x 102 mm (4
s.f.). The last zero is uncertain but significant for assessment of the uncertainties.

Other rules on s.f.:


1
A zero digit is only significant when it follow a decimal point for a number which is expressed in
its standard form.
2
For log function, keep as many digits to the right of the decimal (mantissa of the logarithm) as
there are in original number. e.g. -log (9.57 x 10-4) = 3.091. (3 = characteristic value (tells you
where to place a decimal in the number) and 091 is the mantissa.
3
For antilog function, keep as many digits in the antilog as there are for the mantissa of the
logarithm. If pH = 4.75 = -log [H+], then [H+] = 10-4.75 antilog number = 1.7782 x 10-5 = 1.8 x
10-5

Combining random errors.


To find the estimated the total error (uncertainty) for a calculated result or for a procedure in which individual errors
for two or more steps of the procedure can be reasonably estimated, one must know how to combine the random
errors in the input quantities or for each step of the procedure.
(i)
The sequence of executions/operations of the steps and the estimated errors for each step are important
in estimating the total errors and the resultant uncertainty of the whole procedure.
(ii)
Errors are estimated for each step and combined in the sequence of execution/operation of the steps.
(iv)
N.B. To improve on the precision of measurement of an entire procedure, having two or more steps/
operations, identify the steps which carry the largest relative errors and concentrate mainly on those (by
increasing the number of repeated measurements where ever possible)

Examples of operations and how the associated errors are combined are shown in the Table below.
Case
operation
Propagated error

z=xy

z x (y) 2

(2)

z = c(xy )
c= constant

2
2
z x y

z x y

(3)

z = c(y/x)
c= constant

2
2
z x y

z x y

(1)

(4)

(5)

z = cxa
c= constant

z x
a
z x

z = cxayb

2
2
z x y
a b
z x y

a,b,c= constants

(6)

z = log x

(7)

z = antilog x

x
z 0.434
x
z
2.303(x)
z

Note
x = xi - x = the measurement deviation.
For addition and subtraction operation: add the variance of the data.
For multiplication and division: add the square of relative deviations.
For a function of x and y, f(x,y): add the squares of product of the relative deviations of each variable and its exponent.

o
o
o
o

Worked example 2:
An aliquot of 25.00 ( 0.02) mL of a 53.4 (0.4)%, (wt/wt)} aqueous solution of NaOH with a measured density of
1.52 (0.01) g/mL is diluted to 2L (5 mL) with distilled water.
(a) Calculate the molar concentration of the dilute solution.
(b) Calculate the uncertainty in the concentration of the dilute solution.
Ans:
(a)

C = n(NaOH)/V = vsoln (mL) x (g/mL) x wt(g/g soln)


M (g/mol) x V dm3
n(NaOH) = 25.00 mL (NaOH soln.) x (1.52 g (NaOH soln) x 0.543 g NaOH x 1 mol NaOH
1 g soln (NaOH soln) x 1 g soln x 40.01 g NaOH x 2.00 dm3
C = n(NaOH)/V = 0.5072 mol = 0.2536 M
2.00 dm3

(b) Since C

vsoln (mL) x (g/mL) x wt(g/g soln)


M (g/mol) x V dm3

= (v/v)2 + (/)2 + (wt/wt)2 + (V/V)2 (N.B. cases 2 & 3): add the square of the relative errors).
= (0.02/25.00)2 + (0.01/1.52) 2 + (0.004/0.534)2 + (0.005 L/2 L)2
(C/C)
= 0.0103
% relative error = (100C/C) = 1%.
Absolute error = 0.0103 x 0.2536 mol dm-3
= 0.003 mol dm-3
(C/C)2

Thus, molarity of NaOH solution = 0.168 ( 0.003) mol dm-3


= 1.68 ( 0.03) x 10-1 mol dm-3

Statistical treatment of data.


Significance/Hypothesis test.
General aspects of significance test.
(i)
(ii)
(iii)
(iv)

Selection of a significant test is based on an appropriate sample distribution e.g. students t, Q or F-distributions.
Formulation of the null hypothesis, Ho and an alternative hypothesis, Ha.
Selection of the significance level.
Comparison of the test statistics (calculated value of the distribution) and the critical values (tabled values according to

(v)

Rejection of the null hypothesis, Ho or else one adopts a no evidence standpoint view.

sample size).

Student's t-distribution:

Properties:

Populations (from which the samples are drawn) are assumed to be normally distributed. Any deviations are due to
only random errors.
-applicable to a limited number of replicated measurements (finite sample sizes).

-mean,

The statistical distribution parameter, t, for a population with a true value of , where N replicated measurements have
been taken is given by:

and variance, sx2 of the measurements are calculated using a finite data, sample size = N.


Sx

Applications of the Student's t-distribution:


(a) Estimation of the confidence interval.

Confidence interval: the range within which the true value for the data will lie at a specified level of confidence.
From eqn. 1, Confidence interval of :

t crt s x
2

tcrt values are listed in Statistical Tables at a specified confidence level (CL) and the degree of freedom, = N-1.
Example 3
The following results (as w/w% by mass) were obtained from the analysis of a standard alloy sample which
contained 57.85% Cr,
57.88;
58.00;
57.61;
57.80;
57.56; 57.61; 57.51; 57.77; 57.40 & 57.67.
(a)
(b)
(c)

Calculate the (i) mean (ii) standard deviation and (iii) variance.
95% confidence interval for the results.
Is the method measuring accurately at 95% confidence level? Show your working.

Ans.
(a)(i)

Mean,

= (57.88 + 58.00 + 57.61 +. . . . .+ 57.40 + 57.67)/10 = 57.68%.

x
N

(ii)

standard deviation,

sx

i 1

n 1

(iii)
(b)

= {57.88-57.68) +(58.00-57.68)2+(57.61-57.68)2+. . .+(57.67-57.68)2}1/2


{10-1}1/2
= 0.18% (use your calculator in the stats mode)
variance = 0.182 = 0.03 (%)2
CI for locating =

x 0.18
,
57.68 2.2610

{tcrt(95%) = 2.26, = 9}

= 57.680.13%.

Thus, we are 95% certain the true value lies within the interval (CL) 57.55% - 57.81%.
*Repeat the same calculation at 99% confidence level.
c)

Using the result of (b)

Note that true value (57.85%) is not included within the confidence interval.

The method is not accurate due to some systematic errors. Later on, you shall compare this approach with
the students t-test. (presented in Example 4 below).
Exercise 1
A vendor is keen on making a beverage containing a vitamin concentration of about 100 g/kg. The production
precision of the beverage is known previously to be 8 g/kg at the specified concentration level. He does some
clever calculations and decided to blend at least 10 samples to meet the Food Regulatory Authoritys requirement
specified at the 95% confidence level. Calculate the concentration range specified by the Regulatory Body.
Ans.

= 100 g/kg, sx = 8 g/kg and tctr = 1.96 (previous knowledge), Nreplicated = 10


CI (95% confidence level = 95-105 g/kg

(b)

Statistical comparisons of means using the Student t-test.

case 1:

x A and x B (or ), assumed to have equal standard deviations i.e. s is comparable s .


Null hypothesis, Ho: x1 = x2 (or ) or else Ha: Ha: x1 x2 (i.e. the two means are not the

Two sample means,

same).

If and

are replaced by

x1 and x2 in eqn. 1, then

texp x1 x2

test statistics:

n
sx .

If texp > tcrt ( = n-1), reject Ho, thus,

level (CL).
tcrt ( = n-1) values can be quoted at CL of usually 90%, 95% and 99%.

x1

is statistically different from

x2

at the stated confidence

At 95% CL, rejecting Ho when it is right or correct has a statistical risk of no more than 5%. The
probable risk of 0.05 is called the significance of the test sometimes quoted as P < 0.05).

Example 4:
4a) Apply a t-test to answer Q 3c in Example 3 above.
Ans: to Q3c

Formulate the Null hypothesis, HO:

x1 = ( x2

replaced by ). Or else Ha:

x1 x2

i.e. Any differences

are due to random errors. or else Ha: the two means are not same.
Test the hypothesis, by calculating texp:
test statistics: t exp

57.85 57.68

10
0.18

2.29

Compare: texp. (= 2.29) > tcrt(0.05,9) (= 2.26) at the 95% level, so we can be 95% certain that the method is
not measuring accurately.
*Repeat the calculation at 99% confidence level.
4b) Suppose the standard deviation of measuring the % Cr in the alloy (Example 3) is known from experience to be
0.12%. To check on the accuracy of the method, a reference material is measured three times giving an average
of 57.94%. Is the method measuring accurately at 95% confidence level?
Population standard deviation, = 0.12% (n = ); = 57.85%; Nreplicated = 3
test statistics:

texp xi

texp 57.94 57.85

3
0.12

1.30 < 1.96(0.05, ). (Note that v = for previous knowledge n =)

Conclusion: There is no evidence of inaccuracy in the measurements by the method at 95% based on
previous experience on the performance of the method.
Case 2:

Two means,

x A and x B with different precisions i.e. sA sB


Ho: x1 = x2 or else Ha: x1 x2

First apply an F -test to establish that sB and sA (i) are significantly different or (ii) not significantly different at a
given level of confidence e.g. 95%., see F test Example 6
If sB and sA are not significantly different, we pool the standard deviation for the two data sets.

For two data sets with means

x A and x B

from NA NB replicates, and sB and sA not significantly

different from each other, the pooled and estimated standard deviation, spld,

s pld

( N A 1) s 2 A ( N B 1) s 2 B
( N A - 1) ( N B - 1)

test statistics: t x A xB
exp

s pld

N A N B . 4
N A NB

texp > tcrt (0.05, = NA + NB 2), then reject Ho and conclude that

xA

is statistically different from

xB

at the stated 95%

confidence level.
Example 5
The content of Cr in the alloy was re-analyzed by a gravimetric method and a mean of 57.89% and standard
deviation of 0.33% was calculated from 4 determinations. Is the performance (in terms of accuracy and precision) of
the gravimetric method any better than the previous method at 95%?
Summary of the two methods performance parameters.

Routine

sx

10
4

57.68
57.89

0.18%
0.33%

gravimetric
HO:
x (routine) = x (gravimetric)

First, do an F- test to establish whether the two precisions are statistically different.
Assuming no significant difference between their precisions, the pooled standard deviation, spld., (eqn. 4):

s pld

( N A 1) s 2 A ( N B 1) s 2 B
( N A - 1) ( N B - 1)
9 x0.182 3x0.332
(10 1) (4 1)

= 0.226

t exp

57.89 57.68
0.226

10 x 4
10 4

= 1.563
Since texp. (= 1.56) < tcrt { = 12; CL= 95%} = 2.18), we cannot be 95% certain that the performances of two
methods are different. Thus, there is no statistical evidence that the gravimetric method is better than the other
method. If anything, its only random errors.
Case 3 Paired t test

Is used to compare two data sets (generated from several but unique samples (A, B, C) measured
under two sets of conditions:
The different conditions can be in the form of:
i)
two methods where one is a candidate method the other a standard method,
ii)
or two analysts
iii)
or two laboratories.

A, B, C. samples are unique in terms of concentration levels or identity e.g. soil, oil, air.

Each of the unique sample is measured twice (the pairing up aspect).

You cant use the simple cases 1 and 2 because the data is paired-up.

Calculate the differences (maintaining the sign on each difference) in each pair of results; calculate the
mean of the differences and the standard deviation of the differences.
o

Null hypothesis: H0: d = 0 i.e. there are no significance differences in all the paired results.
Or else Ha: d 0 i.e. Any differences are due to random errors. or else Ha: the means from the
paired-up data are non-zero.

texp d 0
o

N
sx

Compare: texp. with tcrt(0.0, v) , and reject or retain the null hypothesis.

The F distribution

Used to compare the precision of measurements (usually prior to comparing their means).
The distribution parameter for variance is Fcrt, and is calculated from the ratio (sA2/sB2) of the sample variances of two
sets of experimental measurements.
Fcrt values are listed in F-tables (at the intersection of their respective no. of degrees of freedom; 1 = n1-1 and 2 =

To calculate Fexp, the variance of the higher precision (smaller sx2 value) appears in the denominator.

n2-1).

F-test

Ho: sA2 = sB2 i.e. (sA2/sB2) = 1. The variance are the same i.e. their ratio = 1 The actual differences in the
spread of the measurements about the means (precision) or variances are due to random errors only.
Or else Ha: sA2 sB2
Fexp. = (sA2/sB2), (1; 2 = N1-1; N2-1) at the stated CL, is calculated such that ratio > 1.
Fexp > Fcrt, Reject Ho, thus, the precision in measurements of data set A is statistically different from that of B.

Example 6
Was the assumption on the precisions of the two methods in worked Example 5 above valid in the first place?
Null hypothesis, Ho: s2routine = s2gravimetric (no difference in the precision of the methods) Or else: Ha: sA2 sB2
Fexp, = (s2gravimetric/s2routine) = (0.332/0.182) = 3.36
Fexp (= 3.36) < Fcrt, {(1; 2 = 4; 9 at 95%)} = 3.63.
Thus, there is no evidence at 95% that the precisions of the two methods are different. The assumption to pool the two
standard deviations was valid.

Q-test/Dixon test:

One or two values may differ considerably from the rest of replicates set of measurements.
Can the suspicious value(s) be excluded from any subsequent calculations (e.g. of the mean value, x and sx)?
o A Q-test is performed to confirm whether such a suspect value is an outlier.
o An outlier is a datum (observed within a replicated data set) which is conspicuously different from the rest of the
data in terms of it distribution pattern. (It is usually caused by gross errors or blunders. It can also be declared

after performing a Q-test).

Null hypothesis, Ho, for Q-test: The suspect value is part of the set of data i.e."There is no difference between the

Or else the suspect is different from the rest of the data

First arrange (rank) the data in ascending/descending order such that:


x1; x2; x3; .; . . < xn (: x1 < x2 < x3 . . . < xN)

suspect value and the rest of the values. (Any differences must be attributed to random errors).

Calculate (Qexp):

Qexp

( x suspect xnearest )
xmax x min

..5

Compare Qexp with Qcrt (for the number of measurements taken, N) at a specified confidence level (95%) from the
tables.
If Qexp > Qcrit, reject HO, treat the suspect as an outlier; exclude it from subsequent calculations at the stated CL.

Otherwise the suspect value is retained on the basis of lack of evidence (proving existence of such a difference).
Treat the Q-test with caution especially when only few measurements.

Example 7
The density, /(g mL-1) of a certain metal was measured 6 times; the results were ranked in the following order:
/(g mL-1): 2.19; 2.23; 2.42; 2.68 and 4.36.
4.36 appears to be conspicuously bigger than the rest.

Can we reject it as an outlier at a 95% confidence level?

Calculate Qexp (eqn. 5) = (4.36 2.68)/(4.36 - 2.19) = 0.774 > Qcrt(0.05, 6) (= 0.63).

At 95% CL and N = 6, reject the Null Hypothesis and treat 4.36 as an outlier.
Note: mean, x = 2.77 and median = 2.42 and x (excluding the suspect) = 2.38.
The median is not affected by the inclusion of an outlier in the data set, and is a better estimator of the centrality
than x for data that include an outlier.

Vous aimerez peut-être aussi