Control chart with statistical monitoring

All laboratories use control charts to monitor potential drift in a measurement process. However, when attempting to comply with the various rules applicable to these charts ((see Control chart), it quickly becomes apparent that one of these rules will eventually be violated.
Does this necessarily mean that the process is performing poorly? Should the root cause of the problem be investigated? Should measurements be repeated to bring the situation back under control?
In practice, this can result in a significant waste of time, even though all results remain within the limits established by the laboratory.

Methodology :

Assume that the laboratory wishes to periodically assess equipment drift using a reference solution or reference material. The upper and lower limits are specified in a normative document as a relative maximum permissible error (MPE), although they could also be calculated or established internally by the laboratory.

I propose developing a dynamic control chart based on four decision rules using an Excel spreadsheet.

The decision rules for determining whether the periodic verification measurements meet our requirements are as follows:

- All measured values must fall within the tolerance interval specified by the applicable normative document (ASTM, ISO, or another standard) or by internal laboratory requirements.
- The slope of the trend line must be lower than the maximum slope that could eventually result in values falling outside the tolerance limits.
- The probability of obtaining results within the tolerance limits must be greater than 90%. This criterion may be adjusted based on the results obtained.
- The control chart must include at least 30 values before trend analysis can be performed. Normality tests, including the Henry line and the Shapiro–Wilk test, must demonstrate that the data follow a normal distribution.

A normal distribution can only be meaningfully assessed when the reading resolution provides a sufficiently broad range of possible values relative to the specified tolerance.

The 30 data points correspond to the initial implementation of the control chart—for example, 10 measurements performed by each of two operators, giving 20 points—followed by five periodic verifications, each consisting of two measurements, giving an additional 10 points.

For this example, it will be assumed that the control chart can contain up to 100 values.

Numerical Data:

The reference solution or reference material has a certified nominal value of 313.8 (no unit is specified for this example), with an associated expanded uncertainty of 1.57.

The standard specifies a relative error of ±2% of the reference value, corresponding to a maximum permissible error (MPE) interval of [307.4; 320.08].

Trend Line Slope:
Consider the following data points, deliberately limited to fewer than 30 observations: 16 values.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
314,4 316,5 312,8 311,2 312,8 312,5 315,5
313,5
314,9 310,4
311,7
311,6 310,8
312,8
314,4
308,6

 

The maximum allowable slope is determined from the x-axis data range [0, 100], representing the number of points that may be included in the control chart, and from the y-axis data range [reference value, upper tolerance limit], i.e., [313.8, 320.08].
The absolute slope of the measured data, (Pd), is calculated as follows: =ABS(SLOPE(Y-value range, X-value range))=ABS(SLOPE(16 values, 0:100))= 0.2121.
The maximum allowable slope, (Pm), is calculated as follows: =SLOPE(reference value:upper tolerance limit, 0:100)=SLOPE([313.8:320.08], [0:100])= 0.06276.
The data are considered satisfactory when:Pd ≤ Pm.

In the present case, the inequality is not satisfied; therefore, the control chart is considered noncompliant.

Probability of Results Falling Within the Tolerance Limits

The standard deviation of the 16 values is 2.06.
The probability is calculated as follows:=NORM.DIST(Upper tolerance limit, Certified value, Standard deviation of the series, TRUE) - NORM.DIST(Lower tolerance limit, Certified value, Standard deviation of the series, TRUE)=NORM.DIST(320.08, 313.8, 2.06, TRUE) - NORM.DIST(307.4, 313.8, 2.06, TRUE)= 0.998 = 99.8%.
The data are considered satisfactory when:P(Φ) > 90%
This requirement is satisfied in the present case.

Normality Test :
Henry’s Line and the Shapiro–Wilk Test

Henry’s line is a graphical method used to assess whether a distribution is approximately normal.

Principle: the cumulative-frequency plot forms a straight line when the statistical distribution follows a normal distribution, also known as a bell-shaped curve or Gaussian distribution.

Henry’s line represents the theoretical cumulative frequencies obtained from the standard normal distribution table.
The plotted points represent the actual cumulative frequencies associated with the different observed values of the variable.
If the distribution of the observed values were perfectly normal, all the points would lie on Henry’s line.

We will now use the original 16 data points and add further measurements to obtain a total of 30 values:

Nb
Values
Ascending order
Cumulative proportion
Z score
Mean
1 314,4 308,6 1/31 -1,849 312,94
2 316,5 309,1 2/31 -1,518 Standard Deviation
3 312,8 310,4 3/31 -1,300 2,04
4 311,2 310,4 4/31 -1,131 Correlation coefficient
5 312,8 310,8 5/31 -0,989 0,989
6 312,5 311,2 6/31 -0,865 Critical value with α=0,05
7 315,5 311,2 7/31 -0,753 0,927
8 313,5 311,6 8/31 -0,649                        
9 314,9 311,7 9/31 -0,552
10 310,4 312,5 10/31 -0,460
11 311,7 312,6 11/31 -0,372
12 311,6 312,8 12/31 -0,287
13 310,8 312,8 13/31 -0,204
14 312,8 312,8 14/31 -0,122
15 314,4 312,8 15/31 -0,040
16 308,6 313,0 16/31 0,040
17 309,1 313,1 17/31 0,122
18 311,2 313,3 18/31 0,204
19 313,3 313,3 19/31 0,287
20 313,3 313,3 20/31 0,372
21 315,4 313,5 21/31 0,460
22 314,4 314,4 22/31 0,552
23 314,4 314,4 23/31 0,649
24 317,6 314,4 24/31 0,753
25 313,3 314,4 25/31 0,865
26 313,1 314,9 26/31 0,989
27 313,0 315,4 27/31 1,131
28 313,3 315,5 28/31 1,300
29 312,6 316,5 29/31 1,518
30 312,8 317,6 30/31 1,849

 


The spreadsheet searches for the smallest value in the measurement column, which may contain up to 100 values in this example, and rearranges the data according to their ascending rank. Thus, 308.6 is assigned rank 1.
When no value is available for a given rank, the cell displays #N/A.

Automatically Sorting the Data in Ascending Order:

The data are automatically sorted in ascending order using the following formula :
=IFERROR(SMALL(value range, row number);#N/A)=IFERROR(SMALL(range containing the values from 314.4 to 312.8, 1);#N/A) returns 308.6, then:=IFERROR(SMALL(range containing the values from 314.4 to 312.8, 2);#N/A) returns 309.1, and so on, up to: .......................=IFERROR(SMALL(range containing the values from 314.4 to 312.8, 30);#N/A) which returns 317.6..
Le tableur recherche la plus petite valeur sur la colonne des valeurs (100 valeurs maxi dans l'exemple) et les replace par rapport au rang d’origine (308,6 = Rang 1) et si la cellule ne contient pas de valeurs, elle affiche #N/A.

Cumulative proportion:

First Cell=IF(AND(TYPE(ascending-order value)=1, ascending-order value<>""), 1/(number of values+1), "")=IF(AND(TYPE(308.6)=1, 308.6<>""), 1/(30+1), "")=1/31.
Second Cell Through the Last Cell=IF(AND(TYPE(second ascending-order value)=1, second ascending-order value<>""), 1/(number of values+1)+first cumulative-proportion cell, "")=IF(AND(TYPE(309.1)=1, 309.1<>""), 1/(30+1)+(1/31), "")=2/31

The formula is then repeated down to the last value:=IF(AND(TYPE(317.6)=1, 317.6<>""), 1/(30+1)+(29/31), "")=30/31

The number of values is calculated using=COUNT(value range)
In practice, one unit is added to the total number of observations, (n+1), so that the inverse normal distribution can also be calculated for the maximum (x)-value.
This calculation is applied to each value.
For the first row, if the cell contains a numeric value, the TYPE function returns 1. If the cell is also not blank, the cumulative proportion is calculated as:1/ (Number of values=30 +1) and if the cell does not contain a numeric value, the formula returns a blank cell.

Inverse Normal Distribution: Z-Score

For a given probability (cumulative proportion), this function returns the value of a random variable following a standard normal distribution, also known as a standardized normal distribution.
This distribution has a mean of zero and a standard deviation of 1.
The inverse normal distribution is calculated as follows:=IF(AND(TYPE(cumulative proportion)=1, cumulative proportion<>""), NORM.S.INV(cumulative proportion), "")=IF(AND(TYPE(1/31)=1, 1/31<>""), NORM.S.INV(1/31), "")=-1.849

The formula is applied to each value, up to the last cumulative proportion:=IF(AND(TYPE(30/31)=1, 30/31<>""), NORM.S.INV(30/31), "")=1.849

For the first row, if the cumulative proportion value (1/31) is numeric, the TYPE function returns 1. If the cell is also not blank, the spreadsheet calculates:=NORM.S.INV(1/31)=-1.849

If the cell does not contain a numeric value, the formula returns a blank cell.
Graphical Representation of Henry’s Line
Henry’s line is plotted using:
the measured values on the x-axis;
the inverse normal distribution values, or Z-scores, on the y-axis.

The points are approximately aligned along a straight line, indicating that the data follow a normal distribution.
The intercept, b=312.94, corresponds to the mean of the measurement results.
The slope, a=2.2009, corresponds to the standard deviation of the measurement results.
The coefficient of determination is R2=0.9774, indicating a strong linear fit.

Shapiro–Wilk Test
This test is based on the W ratio between two estimates related to the variance of the population from which the sample is drawn. The first estimate is a function of the partial ranges xn - x1, xn-1 - x2, ..., and so on, derived from the ordered sequence:(x1 ≤ x2 ≤ ... ≤ xj ≤ ... ≤ xn) ​of the n independent observations in a sample of size n. The second estimate, z² is a function of the squared deviations of the observations from their mean x̄.
The correlation coefficient is determined between the measurement values arranged in ascending order and the corresponding Z-scores:=CORREL(ascending-value range, Z-score range)=CORREL(308.6:317.6, -1.849:1.849)=0.989
Additional columns were created using error-handling conditions to prevent the spreadsheet from attempting calculations on cells containing #N/A, which Excel cannot process in these formulas.
For the ascending values:=IFERROR(ascending value, "")=IFERROR(308.6, "")=308.6
For the Z-scores:=IFERROR(Z-score, "")=IFERROR(-1.849, "")=−1.849
When the normality assumption is satisfied, the distribution of W is tabulated. Based on the sample size n, the Shapiro–Wilk table provides the critical values Wα such that:Pr (W < Wα) = α pour α = 0,05.

The table provides the critical Wα values used to determine whether the normality assumption should be rejected, with a 5% risk of rejecting a true hypothesis.
The normality assumption is rejected when: W<Wα where Wα is the critical value corresponding to the sample size n and the selected significance level α.

Determination of Wα is obtained from the Shapiro–Wilk table using the VLOOKUP function:
=IF(Number of values<=50,VLOOKUP(Number of values,Wα value range,2),0.947)=IF(30<=50,VLOOKUP(30,Wα value range,2),0.947)=0.927

The sample-size values n must be located in the first column of the lookup table, with the corresponding Wα values in the second column, for the VLOOKUP function to work correctly.
When the number of values is less than or equal to 50, the spreadsheet searches the table for the coefficient corresponding to the sample size. For n=30, the coefficient is 0.927. When the number of values is greater than 50, the coefficient is always set to 0.947.
Wα=0,927 and W=0,989 with Wα< W, the data are considered to follow a normal distribution.

Decision Rules :

The slope of the measured data, Pd, is calculated as follows:=ABS(SLOPE(Y-value range,X-value range))=ABS(SLOPE(30 values,0:100))=0.0015
The maximum allowable slope, Pm, is calculated as follows:=SLOPE([313.8,313.8+2%=320.1],[0,100])=0.06276
The data are considered satisfactory when: Pd≤Pm, the available margin corresponds approximately to three consecutive results at a value of 318.
The probability of obtaining results within the tolerance limits is calculated as follows:=NORM.DIST(320.08,313.8,2.04,TRUE)-NORM.DIST(307.5,313.8,2.04,TRUE)=0.998=99.8%
The data are considered satisfactory when: P(Φ)>90%
The data follow a normal distribution, the probability and slope meet the established criteria, and no data points fall outside the specified tolerance limits. Therefore, the trend analysis of the control chart is considered satisfactory.