XCHART Statement: CUSUM Procedure

Formulas for Cumulative Sums

One-Sided Cusum Schemes
Positive Shifts

If the shift $\delta $ to be detected is positive, the cusum computed for the tth subgroup is

\[ S_{t}=\max (0,S_{t-1}+(z_{t}-k))  \]

for t=1, 2, . . . , n, where $S_{0}$=0, $z_{t}$ is defined as for two-sided schemes, and the parameter k, termed the reference value, is positive. The cusum $S_{t}$ is referred to as an upper cumulative sum. Since $S_{t}$ can be written as

\[ \max \left(0,S_{t-1}+\frac{\bar{X}_{i}-(\mu _{0}+k\sigma _{\bar{X}_{i}})}{\sigma _{\bar{X}_{i}}} \right)  \]

the sequence $S_{t}$ cumulates deviations in the subgroup means greater than k standard errors from $\mu _{0}$. If $S_{t}$ exceeds a positive value h (referred to as the decision interval), a shift or out-of-control condition is signaled. This formulation follows that of Lucas (1976), Lucas and Crosier (1982), and Montgomery (1996).

Negative Shifts

If the shift $\delta $ to be detected is negative, the cusum computed for the tth subgroup is

\[ S_{t}=\max (0,S_{t-1}-(z_{t}+k))  \]

for t=1, 2, . . . , n, where $S_{0}$=0, $z_{t}$ is defined as for two-sided cusum schemes, and the parameter k, termed the reference value, is positive. The cusum $S_{t}$ is referred to as a lower cumulative sum. Since $S_{t}$ can be written as

\[ \max \left(0,S_{t-1}-\frac{\bar{X}_{i}-(\mu _{0}-k\sigma _{\bar{X}_{i}})}{\sigma _{\bar{X}_{i}}}\right)  \]

the sequence $S_{t}$ cumulates the absolute value of deviations in the subgroup means less than k standard errors from $\mu _{0}$. If $S_{t}$ exceeds a positive value h (referred to as the decision interval), a shift or out-of-control condition is signaled.

This formulation follows that of Lucas (1976), Lucas and Crosier (1982), and Montgomery (1996). Note that $S_{t}$ is always positive and h is always positive, regardless of whether $\delta $ is positive or negative. For schemes designed to detect a negative shift, some authors, including van Dobben de Bruyn (1968) and Wadsworth, Stephens, and Godfrey (1986), define a reflected version of $S_{t}$ for which a shift is signaled when $S_{t}$ is less than a negative limit.

Headstart Values

Lucas and Crosier (1982) describe the properties of a fast initial response (FIR) feature for cusum schemes in which the initial cusum $S_{0}$ is set to a headstart value. Average run length calculations given by Lucas and Crosier (1982) show that the FIR feature has little effect when the process is in control and that it leads to a faster response to an initial out-of-control condition than a standard cusum scheme. You can provide headstart value $S_{0}$ with the HEADSTART= option or the variable _HSTART_ in a LIMITS= data set.

Constant Sample Sizes

When the subgroup sample sizes are constant ( = n), it may be preferable to compute cusums that are scaled in the same units as the data. Refer to Montgomery (1996) and Wadsworth, Stephens, and Godfrey (1986). To request this, specify the DATAUNITS option. Cusums are then computed as

\[ S_{t}=\max (0,S_{t-1}+(\bar{X}_{i}-(\mu _{0}+k\sigma / \sqrt {n})))  \]

for $\delta $ >0 and the equation

\[ S_{t}=\max (0,S_{t-1}-(\bar{X}_{i}-(\mu _{0}-k\sigma / \sqrt {n})))  \]

for $\delta <0$. In either case, a shift is signaled if $S_{t}$ exceeds $h’=h\sigma /\sqrt {n}$. Wadsworth, Stephens, and Godfrey (1986) use the symbol H for $h’$.

If the subgroup sample sizes are not constant, you can specify a constant nominal sample size n with the LIMITN= option or the variable _LIMITN_ in a LIMITS= data set. In this case, only those subgroups with sample size n are analyzed unless you also specify the option ALLN. You can further specify the option NMARKERS to request special symbol markers for points corresponding to sample sizes not equal to n.

Two-Sided Cusum Schemes

If the cusum scheme is two-sided, the cumulative sum $S_{t}$ plotted for the tth subgroup is

\[ S_{t}=S_{t-1}+z_{t} \]

for t=1, 2, . . . , n. Here $S_{0}$=0, and the term $z_{t}$ is calculated as

\[ z_{t}=(\bar{X}_{t}-\mu _{0})/(\sigma /\sqrt {n_{t}})  \]

where $\bar{X}_{t}$ is the tth subgroup average, and $n_{t}$ is the tth subgroup sample size. If the subgroup samples consist of individual measurements $x_{t}$, the term $z_{t}$ simplifies to

\[ z_{t}=(x_{t}-\mu _{0})/\sigma  \]

Since the first equation can be rewritten as

\[ S_{t}={\sum _{i=1}^{t}} z_{i} = {\sum _{i=1}^{t}} (\bar{X}_{i}-\mu _{0})/ \sigma _{\bar{X}_{i}} \]

the sequence $S_{t}$ cumulates standardized deviations of the subgroup averages from the target mean $\mu _{0}$.

In many applications, the subgroup sample sizes $n_{i}$ are constant ($n_{i}=n$), and the equation for $S_{t}$ can be simplified.

\[ S_{t}=(1/\sigma _{\bar{X}})\, {\sum _{i=1}^{t}} (\bar{X}_{i}-\mu _{0}) =(\sqrt {n}/\sigma )\, {\sum _{i=1}^{t}} (\bar{X}_{i}-\mu _{0})  \]

In some applications, it may be preferable to compute $S_{t}$ as

\[ S_{t}={\sum _{i=1}^{t}} (\bar{X}_{i}-\mu _{0})  \]

which is scaled in the same units as the data. Refer to Montgomery (1996), Wadsworth, Stephens, and Godfrey (1986), and American Society for Quality Control (1983). If the subgroup sample sizes are constant (= n) and if you specify the DATAUNITS option in the XCHART statement, the CUSUM procedure computes cusums using the final equation above. In this case, the procedure rescales the V-mask parameters h and k to $h’=h\sigma /\sqrt {n}$ and $k’=k\sigma /\sqrt {n}$, respectively. Wadsworth, Stephens, and Godfrey (1986) use the symbols F for $k’$ and H for $h’$.

If the subgroup sample sizes are not constant, you can specify a constant nominal sample size n with the LIMITN= option or with the variable _LIMITN_ in a LIMITS= data set. In this case, only those subgroups with sample size n are analyzed unless you also specify the option ALLN. You can further specify the option NMARKERS to request special symbol markers for points corresponding to sample sizes not equal to n.

If the process is in control and the mean $\mu $ is at or near the target $\mu _{0}$, the points will not exhibit a trend since positive and negative displacements from $\mu _{0}$ tend to cancel each other. If $\mu $ shifts in the positive direction, the points exhibit an upward trend, and if $\mu $ shifts in the negative direction, the points exhibit a downward trend.