Robut control charts (rcc) in the rQCC package

Chanseok Park  and Min Wang Note: Applied Statistics Laboratory, Department of Industrial Engineering, Pusan National University, Busan 46241, Korea. His work was supported by the National Research Foundation of Korea(NRF) grant funded by the Korea government(MSIT) (No. 2022R1A2C1091319). Note: Department of Management Science and Statistics, The University of Texas at San Antonio, San Antonio, TX 78249, USA.
December 2022
Abstract

In this note, we provide a brief summary of variables control charts and a description of how they are constructed using the rcc function in the robust quality control chart (rQCC) R package. Using rcc function, one can construct the traditional Shewhart-type variables control charts. In addition, using various robust location and scale estimates provided by the rQCC package, one can easily obtain robust alternatives to the traditional charts.

1 Introduction

Control charts, also known as Shewhart control charts [1, 2, 3], have been widely used to monitor whether a manufacturing process is in a proper state of control or not. The traditional Shewhart-type control charts are made up of the upper control limit (UCL), the center line (CL) and the lower control limit (LCL) and they have the form of CL±g⋅SE, where the American Standard is based on g=3 with a target false alarm rate of 0.027% and the British Standard is based on g=3.09 with a target false alarm rate of 0.020%. The UCL is given by CL+g⋅SE and the LCL is CL−g⋅SE.

In what follows, we provide how to construct the traditional Shewhart-type control charts and robust alternatives to them using various robust location and scale estimates provided by the rQCC package. In this note, we assume that we have m samples and that each sample has the same sample size of n. Let Xi⁢j be the ith sample (subgroup) from a stable manufacturing process, where i=1,2,…,m and j=1,2,…,n. We also assume that Xi⁢j are independent and identically distributed as normal with mean μ and variance σ2. The A, B and D notations here follow the definitions in ASTM (STP 15-C) [4] and ASTM (STP 15-D) [5].

2 The X¯ chart

In order to construct the CL±g⋅SE control limits, we consider the relation

X¯k−E⁡(X¯k)SE⁡(X¯k)=±g.

Since E⁡(X¯k)=μ and SE⁡(X¯k)=σ/nk, we have

E⁡(X¯k)±g⋅SE⁡(X¯k)=μ±gnk⁢σ.

Then the control limits for the X¯ chart with the sample size nk are given by

UCL =μ+A⁡(nk)⁢σ,
CL =μ,
LCL =μ−A⁡(nk)⁢σ,

where A⁡(nk)=g/nk. In practice, the values of the parameters, μ and σ, are not known. Thus, with the estimates μ^ and σ^, we have

UCL =μ^+gnk⁢σ^,
CL =μ^, (1)
LCL =μ^−gnk⁢σ^.

Thus, we need to estimate μ and σ by using each sample and then pooling these estimates. Using the ith sample above, the sample mean and variance are given by

X¯i=1ni⁢∑j=1niXi⁢j⁢ and ⁢Si2=1ni−1⁢∑j=1ni(Xi⁢j−X¯i)2,

where i=1,2,…,m. Then we can estimate μ using all the samples as below:

X¯¯=X¯1+X¯2+⋯+X¯mm=1m⁢∑i=1mX¯i.

Note that it is easily seen that X¯¯ is unbiased for μ. However, Si is not unbiased for σ since E⁡(Si)=c4⁢(ni)⁢σ, where

c4⁢(ni)=2ni−1⋅Γ⁡(ni/2)Γ⁡(ni/2−1/2).

Thus, Si/c4⁢(ni) is unbiased for σ. Then we can easily show that S¯/c4⁢(nk) is unbiased for σ, where

S¯=1m⁢∑i=1mSi.

Thus, by substituting μ^=X¯¯ and σ^=S¯/c4⁢(n) into (1), we have the control limits

UCL =X¯¯+gn⁢S¯c4⁢(n)=X¯¯+A3⁢(n)⁢S¯,
CL =X¯¯,
LCL =X¯¯−gn⁢S¯c4⁢(n)=X¯¯−A3⁢(n)⁢S¯,

where A3⁢(n)=A⁡(n)/c4⁢(n)=g/{c4⁢(n)⁢n}.

It is also known that

E⁢(R)=d2⁢(n)⁢σ,

where R is the sample range from Xi∼N⁡(μ,σ2) and

d2⁢(n)=2⁢∫0∞{1−[Φ⁡(z)]n−[1−Φ⁡(z)]n}⁢𝑑z.

For more details on d2⁢(n), one can refer to the vignette below.

> vignette("factors.cc", package="rQCC")

Then, with the ith sample, Ri/d2⁢(n) is unbiased for σ, where

Ri=max1≤j≤n(Xi⁢j)−min1≤j≤n(Xi⁢j).

Then, with the m samples, R¯/d2⁢(n) is unbiased for σ, where

R¯=1m⁢∑i=1mRi.

Substituting μ^=X¯¯ and σ^=R¯/d2⁢(n) into (1), we have the control limits

UCL =X¯¯+gn⁢R¯d2⁢(n)=X¯¯+A2⁢(n)⁢R¯,
CL =X¯¯,
LCL =X¯¯−gn⁢R¯d2⁢(n)=X¯¯−A2⁢(n)⁢R¯,

where A2⁢(n)=A⁡(n)/d2⁢(n)=g/{d2⁢(n)⁢n}.

As alternatives to the above, we can use robust estimates of location and scale. For example, using the median, we can estimate μ

μ^=M1+M2+⋯+Mmm=1m⁢∑i=1mMi,

where

Mi=median1≤j≤n(Xi⁢j).

One can also consider estimating σ based on the conventional MAD (median absolute deviation) given by

MAD=⁡m⁢e⁢d⁢i⁢a⁢n1≤i≤n⁢|Xi−M|Φ−1⁢(3/4)≈1.4826⋅⁡m⁢e⁢d⁢i⁢a⁢n1≤i≤n⁢|Xi−M|,

where Xi∼N⁡(μ,σ2) and M=median⁡(Xi). Here Φ−1⁢(3/4) is needed to make this estimator Fisher-consistent [6] for the standard deviation under the normal distribution. For more details, see the references [7, 8]. It should be noted that the above conventional MAD estimator is Fisher-consistent but not unbiased. The “unbiased MAD” (uMAD) with a finite sample is developed by Park, Kim and Wang [8] and implemented in the rQCC package (see mad.unbiased function).

Then, with the m samples, we have the robust unbiased estimate of σ as follows

σ^=uMAD1+uMAD2+⋯+uMADmm=1m⁢∑i=1muMADi,

where

uMADi=uMAD1≤j≤n(Xi⁢j).

The rcc function constructs the control charts based on various unbiased estimates. For example, with the median and uMAD estimates, one can obtain the control limits using the following

> rcc(data, loc="median", scale="mad")

Another way of constructing the control limits is to use the Hodges-Lehmann [9] for location and Shamos [10] for scale which are respectively given by

HL =median(Xi+Xj2)
and
Shamos =mediani<j(|Xi−Xj|)2⁢Φ−1⁢(3/4)≈1.048358⋅mediani<j(|Xi−Xj|),

where 2⁢Φ−1⁢(3/4) is needed to make Shamos estimator Fisher-consistent for the standard deviation under the normal distribution [11]. For the Hodges-Lehmann estimate, the median is obtained by three ways: (i) the pairwise averages with i<j (denoted by HL1), (ii) the pairwise averages with i≤j (HL2), and (iii) all the pairwise averages (HL3). For more details, refer to [8]. It should be noted that the above Shamos is Fisher-consistent but not unbiased. The Hodges-Lehmann and “unbiased Shamos” are also developed by [8] and implemented in R (see HL and shamos.unbiased). For example, with the HL2 and unbiased Shamos estimates, one can obtain the control limits as below.

> rcc(data, loc="HL2", scale="shamos")

As shown above, by choosing the options for loc and scale, one can construct various control charts.

3 The S chart

In order to construct the CL±g⋅SE control limits, we can consider the relation

Sk−E⁡(Sk)SE⁡(Sk)=±g.

Since E⁡(Sk)=c4⁢(n)⁢σ and SE⁡(Sk)=1−c4⁢(n)2⋅σ, we have

E⁡(Sk)±g⋅SE⁡(Sk)={c4⁢(n)±g⁢1−c4⁢(n)2}⁢σ.

The control limits for the S chart are given by

UCL =B6⁢(n)⁢σ,
CL =c4⁢(n)⁢σ,
LCL =B5⁢(n)⁢σ,

where

B5⁢(n) =max⁡{c4⁢(n)−g⋅1−c4⁢(n)2,0},
B6⁢(n) =c4⁢(n)+g⋅1−c4⁢(n)2.

Since σ is unknown in practice, we need to choose an appropriate unbiased estimate for σ. One can consider σ^=S¯/c4⁢(n). Then we have

UCL =B4⁢(n)⁢S¯,
CL =S¯,
LCL =B3⁢(n)⁢S¯,

where B3⁢(n)=B5⁢(n)/c4⁢(n) and B4⁢(n)=B6⁢(n)/c4⁢(n).

To obtain the robustness property, one can consider a robust estimate of σ. For example, the unbiased MAD or unbiased Shamos estimates of σ can be used as seen before. The limits for the S chart are calculated using the rcc function with type="S" as below.

> rcc(data, scale="mad", type="S")
> rcc(data, scale="shamos", type="S")

4 The R chart

We consider the relation

Rk−E⁡(Rk)SE⁡(Rk)=±g.

Since E⁡(Rk)=d2⁢(n)⁢σ and Var⁡(Rk)=d3⁢(n)2⁢σ2, we have

E⁡(Rk)±g⋅SE⁡(Rk)={d2⁢(n)±g⁢d3⁢(n)}⁢σ.

The control limits for the R chart are given by

UCL =D2⁢(n)⁢σ,
CL =d2⁢(n)⁢σ,
LCL =D1⁢(n)⁢σ,

where

D1⁢(n) =max⁡{d2⁢(n)−g⋅d3⁢(n),0},
D2⁢(n) =d2⁢(n)+g⋅d3⁢(n),

Since σ is unknown in practice, we need to choose an appropriate unbiased estimate for σ. One can consider σ^=R¯/d2⁢(n). Then we have

UCL =D4⁢(n)⁢R¯,
CL =R¯,
LCL =D3⁢(n)⁢R¯,

where D3⁢(n)=D1⁢(n)/d2⁢(n) and D4⁢(n)=D2⁢(n)/d2⁢(n). These limits are easily calculated using the rcc function as below.

> rcc(data, scale="range", type="R")

As afore-mentioned, we can consider a robust estimate of σ. For example, the control limits with the unbiased Shamos are calculated as below.

> rcc(data, scale="shamos", type="R")

References

  • [1] W. A. Shewhart (1926) Quality control charts. Bell Systems Technical Journal, pp. 593–603. Cited by: §1.
  • [2] W. A. Shewhart (1927) Quality control. Bell Systems Technical Journal, pp. 722–735. Cited by: §1.
  • [3] W. A. Shewhart (1931) Economic control of quality of manufactured product. Van Nostrand Reinhold, Princeton, NJ. Note: Republished in 1981 by the American Society for Quality Control, Milwaukee, WI Cited by: §1.
  • [4] ASTM Committee E-11 (1951) ASTM manual on quality control of materials (STP 15-C). ASTM Special Technical Publication (STP) 15-C, American Society for Testing and Materials, Philadelphia, PA. Cited by: §1.
  • [5] ASTM Committee E-11 (1976) Manual on presentation of data and control chart analysis (STP 15-D). ASTM Special Technical Publication (STP) 15-D, 4th edition, American Society for Testing and Materials, Philadelphia, PA. Cited by: §1.
  • [6] R. A. Fisher (1922) On the mathematical foundations of theoretical statistics. Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical or Physical Character 222, pp. 309–368. Cited by: §2.
  • [7] F. R. Hampel, E. Ronchetti, P. J. Rousseeuw, and W. A. Stahel (1986) Robust statistics: the approach based on influence functions. John Wiley & Sons, New York. Cited by: §2.
  • [8] C. Park, H. Kim, and M. Wang (2022) Investigation of finite-sample properties of robust location and scale estimators. Communication in Statistics – Simulation and Computation 51 (5), pp. 2619–2645. Cited by: §2, §2.
  • [9] J. L. Hodges and E. L. Lehmann (1963) Estimates of location based on rank tests. Annals of Mathematical Statistics 34, pp. 598–611. Cited by: §2.
  • [10] M. I. Shamos (1976) Geometry and statistics: problems at the interface. In Algorithms and Complexity: New Directions and Recent Results, J. F. Traub (Ed.), pp. 251–280. Cited by: §2.
  • [11] C. Lèvy-Leduc, H. Boistard, E. Moulines, M. S. Taqqu, and V. A. Reisen (2011) Large sample behaviour of some well-known robust estimators under long-range dependence. Statistics 45, pp. 59–71. Cited by: §2.