Poster 005

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

On the use of V-mask techniques to estimate variations in

RPS-Qualitas S.L.
CONSULTORÍA DE CALIDAD Y LABORATORIO S.L.
Cusum control charts by using a commercial spreadsheet
José Miguel Silván, Pedro Rosario, José Luis Martínez
- Introduction
Laboratories are used to monitor the resulting data obtained from tests undertaken on CONT ROL CHART
Table 1 Table 2
X
Fig. 1
quality control samples by means of the application of graphical tools known as
7 0 0 0 mg / L

7100

A B C D E F
Shewhart control charts for an analytical method; this kind of representations could be L C SX 7075
Sample Ref. Value Result Difference CuSum
1
easily performed by using commercial spreadsheets. L SSX 7050
1 7000 6998 -2 -2
2 Sample Ref. Value Result Difference CuSum
The norm that allows to decide whether a method is under statistical control is usually
7025

3 1 7000 6998 =D3-C3 =D3-C3 2 7000 6997 -3 -5


X me d i 7000

derived from a certain number of well-established criteria with the aim of achieving 6975 4 2 7000 6997 =D4-C4 =F3+E4 3 7000 6999 -1 -6
reliable information about the daily interpretation of the control chart after each L SI 6950
5 3 7000 6999 =D5-C5 =F4+E5 4 7000 6978 -22 -28
analytical run. Unfortunately, this decision might not be so practical to be implemented LC I X 6925
6 4 7000 6978 5 7000 7004 4 -24
under every circumstance, since sometimes a large number of tests are required to 6900
01/ 01/ 1900 03/ 01/ 1900 05/ 01/ 1900 07/ 01/ 1900 09/ 01/ 1900 11/ 01/ 1900 13/ 01/ 1900 15/ 01/ 1900 17/ 01/ 1900 19/ 01/ 1900 21/ 01/ 1900 23/ 01/ 1900 25/ 01/ 1900 7 5 7000 7004 6 7000 6992 -8 -32
detect that the method is out of statistical control, particularly when a long-term 8 6 7000 6992
7 7000 6996 -4 -36
evaluation shows an out-of control situation. 9 7 7000 6996 8 7000 6973 -27 -63
10 9 7000 6983 -17 -80
To prevent this situation, a Cusum chart graphic representation can be implemented. 8 7000 6973
10 7000 6983 -17 -97
11 9 7000 6983
- Cusum control charts 12 10 7000 6983 11 7000 6973 -27 -124
13 11 7000 6973 12 7000 6974 -26 -150
These charts involves cumulative calculations that take into account all the previous sample means to detect not only upwards or downwards
trends but also small shifts in the mean of a process. 14 12 7000 6974 13 7000 7005 5 -145

Cusum is an abbreviation for “cumulative sum”, so it applies to the sum of the deviations of the sample means against the target or reference 15 13 7000 7005 14 7000 7030 30 -115

value, carried forward cumulatively from a number of consecutive results along time. If the method is under statistical control, in a quick 16 14 7000 7030 15 7000 7033 33 -82
inspection, the observed deviations between expected value and laboratory results should keep randomly distributed around zero. 17 15 7000 7033 16 7000 7039 39 -43
18 16 7000 7039 17 7000 7030 30 -13
- Definition of Cusum chart 19 17 7000 7030 18 7000 7045 45 32
Let us suppose a typical X-chart as shown in Fig. 1 in which a series of measurements have been plotted, where the standard deviation s is 20 18 7000 7045 19 7000 7044 44 76
calculated based on the analytical performance of the control sample, so the warning limits will be plotted in ±2 s and the action limits in ±3 s. 21 19 7000 7044 20 7000 6943 -57 19
In this case, just one observation fall outside the lower warning limit, but any evaluation related to the shift deviations from the reference value 22 20 7000 6943 21 7000 6950 -50 -31
is achieved. 23 21 7000 6950 22 7000 6950 -50 -81
24 22 7000 6950
23 7000 6960 -40 -121
If we wish to know when the process mean has statistically varied, the construction of a Cusum chart is recommended, in which the cumulative 25 23 7000 6960
deviations between measuring value and target value are represented in vertical axis against each observation, after every analytical series. For 24 7000 6966 -34 -155
26 24 7000 6966
25 7000 6974 -26 -181
this purpose, a cumulative sum term is defined, being xi = the ith of the measuring value, where Sm is the total running of deviations of the n 27 25 7000 6974
measurements from the reference value μ0. (Fig. 2) C ON T R OL C H A R T

in tabular form in a spreadsheet (table 3), the values of h and k parameters calculated in the original data units are introduced in these
C U SU M

100,0
7 0 0 0 mg/ L
To generate the V-mask
50,0
Fig. 2 expressions: S hi (i) = max(0, S hi (i − 1) + xi − μ − k ) S lo (i) = max(0, S lo (i − 1) + μ − k − xi )
n
S m = ∑ ( xi − μ 0 )
0,0
Table 3
- 50,0 A B C D E F G H I
1
i =1 -100,0

2 μ: 7000 δ: 1 k: =(E2*B5)/2
-150,0

3 σ: 25 α: 0,0027 d: =(2/E2^2)*LN((1-E4)/E3)
β:
- 200,0
4 n: 1 0,01 h: =H3*H2
- Constructing a Cusum chart in a spreadsheet 5 s: =B3/B4
The followings steps have been implemented (Table 1): 6
7
• In first column (B; “sample”) values corresponding to the observations sequence are filled. 8 Sample Result Difference CuSum Incr. Shi Decr. Slo
• In second column (C; “ref. value”) target value is introduced as an indication that the process is in statistical control; this reference 9 1 6998 -2 -2 =C9-$B$2-$H$2 =0 =$C$2-$I$2-D10 =0
could be filled just into a single cell: =C3.
10 2 6997 -3 -5 =C10-$B$2-$H$2 =MAX(0;F9+G10) =$B$2-$H$2-C10 =MAX(0;I9+H10)
• In third column (D; “result”) the measuring results from each control sample in the analytical run is registered by filling each row; this
11 3 6999 -1 -6
value could be either an individual one or a mean value from the batch replication. 12 4 6978 -22 -28
• In fourth column (E; “difference”) the subtraction between measuring result and target value is calculated for each row: =D3-C3.
Once performed the calculations, the following results are obtained:
• In the first cell of the next column (F; “cusum”), it is included the same content of the adjacent cell in the rigth: =E3.
Table 4
• In the remaining cells of this column (F; “cusum”) the values calculated from the same row of the fourth column will be accumulated;
for instance, the cumulative sum corresponding to the sample no.2 will be calculated as: =E4+F3. A B C D E F G H I
1
Table 1: include the formulae to obtain the Cusum distribution in a commercial spreadsheet. 2 μ: 7000 δ: 1 k: 12,5
Table 2: involved calculations to compute the corresponding numerical results. 3 σ: 25 α: 0,0027 d: 11,8089063
4 n: 1 β: 0,01 h: 147,611329 In the worksheet, a conditional formatting is applied to col-
To perform the Cusum chart of the analytical series, last step is to carried out the graphical representation of the observations against the 5 s: 25 umns (H; ·”Shi“ ) and (J; “Slo“) in which the decision rule has
cusum values, as it is plotted in Fig.2. 6 *increase in mean ** decrease in mean been calculated; any value greater than h parameter is consid-
7 (xi −μ −k) (μ−k −xi) ered as out of statistical control, so it will be displayed in red
• Both columns (B:sample) and (F:cusum) are selected for constructing the graph..
8 Sample Result Difference CuSum Incr. Shi Decr. Slo colour according to the quality requirements.
• The type of graph: XY Scatter Chart is chosen from the list. A graphical picture of tabular form data is plotted in Fig.4, in
9 1 6998 -2 -2 -14,5 0 -10,5 0
• Data values from the first column are represented in the horizontal x-axis. 10 2 6997 -3 -5 -15,5 0,0 -9,5 0,0 which two out-of-control observations are identified:
• Data values from the fifth column are represented in the vertical y-axis. 11 3 6999 -1 -6 -13,5 0,0 -11,5 0,0
• Variable names, graph scales, legends and general aspect should be also considered. 12 4 6978 -22 -28 -34,5 0,0 9,5 9,5
13 5 7004 4 -24 -8,5 0,0 -16,5 0,0
- V-mask form of the Cusum chart 14 6 6992 -8 -32 -20,5 0,0 -4,5 0,0
Ideally the Cusum chart will show variations in a random pattern around zero, but if this were not the case, the use of a verification tool proce- 15 7 6996 -4 -36 -16,5 0,0 -8,5 0,0
dure, called V-mask because of its shape, will also indicate the observation from which the deviation should be considered as significant, 16 8 6973 -27 -63 -39,5 0,0 14,5 14,5 Tabular Cusum

depending on the definition of the control limits according to the selected design parameters. 17 9 6983 -17 -80 -29,5 0,0 4,5 19,0
100
Since the construction of V-mask is complicated in practice, we propose the definition not only of a visual representation but also the steps to 18 10 6983 -17 -97 -29,5 0,0 4,5 23,5 75

accomplish a tabular Cusum procedure calculated in a sequential trial with a commercial spreadsheet form in which V-mask serves as control 19 11 6973 -27 -124 -39,5 0,0 14,5 38,0 50
20 12 6974 -26 -150 -38,5 0,0 13,5 51,5 25
limits for the running cumulative term. 0
21 13 7005 5 -145 -7,5 0,0 -17,5 34,0
-25
- Definition of V-mask parameters 22 14 7030 30 -115 17,5 17,5 -42,5 0,0 -50
23 15 7033 33 -82 20,5 38,0 -45,5 0,0 -75
This tool is just a V-shaped mask which is superimposed over the Cusum chart with its axis horizontally and its vertex placed at a certain 24 16 7039 39 -43 26,5 64,5 -51,5 0,0 -100
distance to the right of the last observation. The V-mask keeps moving forward with each new point plotted, so past observations are examined 25 17 7030 30 -13 17,5 82,0 -42,5 0,0
-125

to see if any fall above or below the arms of the arm; as additional data are being collected, Cusum data are updated and the origin is relocated 26 18 7045 45 32 32,5 114,5 -57,5 0,0
-150
-175
at the newest point. 27 19 7044 44 76 31,5 146,0 -56,5 0,0 -200
0 5 10 15 20 25
The verification that the situation is taken to be statistically under control is simple to understand: 28 20 6943 -57 19 -69,5 76,5 44,5 44,5
- if all the values of the Cusum fall between the arms of the V-mask, the process in in-control. 29 21 6950 -50 -31 -62,5 14,0 37,5 82,0
Sample
Fig. 4
- if one or more of the Cusum values lie outside of the mask arms, the process should be suspected of being out-of-control. 30 22 6950 -50 -81 -62,5 0,0 37,5 119,5
31 23 6960 -40 -121 -52,5 0,0 27,5 147,0
The application of V-mask requires a reliable definition of some design parameters estimated in advanced, so the performance of the mask 32 24 6966 -34 -155 -46,5 0,0 21,5 168,5
depends largely on them. These variables need to be carefully chosen so that very few false alarms occur when the process is under control, but 33 25 6974 -26 -181 -38,5 0,0 13,5 182,0
an important change in the process mean is quickly detected.
- V-mask for a Cusum chart in a spreadsheet: graphical form
The V-mask design parameters are the following: To construct and plot the V-mask form of the Cusum chart, a new set of variables must be introduced in order to represent the upper and lower arm of the V-mask in a
⇒ μ: reference or target value of the mean process. spreadsheet. Table 6
⇒ σ: standard deviation (sigma) settled for the process. Fig. 3
Table 5 B D E F G H I
⇒ n: number of replicates used (subgroup size).
B C D E F G H 1
⇒ α: probability of declaring a process out of control when in fact it is not (type I error);
1 2 k: 12,5
alpha risk determines the chance of detecting a drift that is not actually real.
2 k: 12,5 h: upper
β: probability of declaring a process in control when in fact it is not (type II error); 3 d: 11,81 25 -33
CuSum (Si)


h: upper arm
beta risk determines the chance of having a drift that is not really detected. 3 d: 11,81
arm
=C7 =C6+C4
h: lower
⇒ δ: amount of shift in process mean that we wish to detect (delta expressed in sigma h: lower 4 h: 147,6
arm
25 -329
4 h: 147,6 =C7 =C6-C4
multiples as the number of standard deviations from control mean at which a shift is h arm 5 μ: 7000
detected). d 5 μ: 7000 6 Origin: −181
⇒ k: slope of V-mask arms (two-sided scheme) in multiple units of sigma values; rise in 6 Origin: −181
k
7 Last data: 25
the arm corresponding to one sampling unit. 7 Last data: 25
⇒ h: vertical rise distance in the arm corresponding to distance d (between origin and the 8 8
1 2 3 4 5 6 7 8 9 10
arm mask). 9 Sample Result Difference CuSum
Upper
Lower arm
Remaining 9 Sample Result Difference CuSum
Upper Lower Remaining
⇒ d: distance from the origin to the vertex of the mask.. arm data arm arm data
=$C$2* =$C$6- 10 1 6998 -2 -2 267 -629 24
H10+$ ($C$2*H =$C$7-
- Interpretation of the V-mask on the plot 10 1 6998 -2 -2
C$6 10)- B10
11 2 6997 -3 -5 254 -616 23
12 3 6999 -1 -6 242 -604 22
The figure (Fig.3) explain how the geometric parameters are operating when the V-mask is set up. +$C$4 $C$4
13 4 6978 -22 -28 229 -591 21
11 2 6997 -3 -5
Since these variables are interrelated you do not need to specify each one of them: 14 5 7004 4 -24 217 -579 20
12 3 6999 -1 -6
δ ⋅σ 2 ⎛1− β ⎞ 13 4 6978 -22 -28 15 6 6992 -8 -32 204 -566 19
k= d= 2
ln
δ ⎝ α ⎠
⎜ ⎟ h = d ⋅k 14 5 7004 4 -24 16 7 6996 -4 -36 192 -554 18
2 To close the V-mask arms and placed it exactly over the origin data point, another 17 8 6973 -27 -63 179 -541 17
It is far more practical to construct the V-mask based in terms of probability errors, by choosing the appropriate alpha and beta values depend- set of variables to allow drawing a vertical line on that observation should be intro- 18 9 6983 -17 -80 167 -529 16
ing on the required test significance and confidence level in detecting the process shift. So, if any preceding point lies above the negatively duced. (Table 5, h; upper arm and h:lower arm) 19 10 6983 -17 -97 154 -516 15
sloped line, the process mean had shifted downward; on the contrary, if any preceding point lies below the positively sloped line, the process 20
If we complete the calculations for the whole data range, Table 6 11 6973 -27 -124 142 -504 14
mean had shifted upward. 21 12 6974 -26 -150 129 -491 13
At last, it is chosen a graph: XY Scatter Chart in which columns marked on the table
22 13 7005 5 -145 117 -479 12
- V-mask for a Cusum chart in a spreadsheet: tabular form are represented in both axes, creating a new phantom variable to close the V-mask
23 14 7030 30 -115 104 -466 11
Let us suppose a real case in which the data used in the previous Cusum chart are computed in the next spreadsheets. arms (Fig.5):
24 15 7033 33 -82 92 -454 10
Data from the process (reference value, standard deviation, replicates): CuSum V-mask 25 16 7039 39 -43 79 -441 9
26 17 7030 30 -13 248 -248 8
μ: 7000 mg/l σ: 25 mg/l n: 1 replicate per observation 300
27 18 7045 45 32 235 -235 7
200
We also introduce the design parameters for the definition of V-mask: 100
28 19 7044 44 76 223 -223 6
Required data chosen from the acceptable quality level: 0 29 20 6943 -57 19 210 -210 5
Si

-100 30 21 6950 -50 -31 198 -198 4


α: 0,0027 (equivalent to ±3 sigma criteria in a Shewhart control chart) β: 0,01 δ: 1 (to detect a shift as large as 1 sigma) -200 31 22 6950 -50 -81 185 -185 3
Data calculated from the above chosen data, applying the relationships: -300 32 23 6960 -40 -121 173 -173 2
k: 12,5 d: 11,8089063 h: 147,611329
-400
0 5 10 15 20 25 30
33 24 6966 -34 -155 160 -160 1
Sample Fig. 5 34 25 6974 -26 -181 148 -148 0
- Conclusions
The main advantage derived from the application of the V-mask form on the Cusum chart data is that by means of these control limits based in If we change the values corresponding to “Origin” and “Last data” and moving the If the origin is located on the last observation point and also centred in the Cusum
statistical parameters, a laboratory will be able to establish a decision procedure that allows determining what might have caused that a process data range corresponding to the columns for both arms, the V-mask can be easily scale (Origin=0; Last data = 25), then the number of points outside the V-mask
can exhibit an anomalous pattern not justified only due to random variation, as well as the possibility of detecting unexpected shifts over time. placed to locate the origin on a certain dubious point, as it is shown in Fig.6: are the same as the calculated using tabular form, in this case two out-of-control
Some drawbacks of the proposed procedure are related to the ambiguity associated with the definition of delta, alpha and beta, apart from the observations in a long-term evaluation (Fig.7):
difficulties on determining how far back to extend the V-mask arms, although this limitation it is also observed in other typical control charts.
Accordingly, without additional cost and with minimal effort in the daily work, the laboratory can have useful information coming from both CuSum V-mask CuSum V-mask
traditional Shewart control chart and Cusum V-mask chart. 300 300

200
- References
200

100 100

Miller, J.C. and Miller, J.N. (1988). Statistics for Analytical Chemistry, Ellis Horwood Limited, 92-98. 0 0
Si
Si

Nordtest Report TR 569 (2006). Internal Quality Controll - Handbook for Chemical Laboratories. -100 -100

Woodall, W.H.. and Adams, B.M. (1993). The Statistical Design of Cusum Charts, Quality Engineering, 559-570. -200 -200

Montgomery, D.C. (2000). Introduction to Statistical Quality Control, Wiley. -300 -300

César Pérez (1995). Análisis Estadístico con Statgraphics, Ed.: Ra-Ma. -400
0 5 10 15 20 25 30
-400
0 5 10 15 20 25 30
Francisco Charte Ojeda (2007). Cálculo Estadísticos con Excel, Ed.: Anaya. Sample Fig. 6 Sample Fig. 7

RPS-Qualitas S.L.
Marqués de Corbera 62, 7º. 28017 Madrid, Spain e-mail: [email protected]

You might also like