CUSUM
The Cumulative Sum (CUSUM) is a sequential statistical technique used to monitor processes and detect small, persistent shifts in their parameters, such as the mean, by accumulating deviations from a target value over time.[1] Developed by E. S. Page in 1954 as a method for continuous inspection schemes in quality control, it addresses limitations of earlier Shewhart control charts by providing greater sensitivity to gradual changes rather than abrupt ones.[2] CUSUM operates by computing two cumulative sums—one for upward shifts (CUSUM for increases) and one for downward shifts (CUSUM for decreases)—using the formula S_i^+ = \max(0, S_{i-1}^+ + ( \bar{x}_i - \mu_0 - k )) and S_i^- = \max(0, S_{i-1}^- + ( \mu_0 - k - \bar{x}_i )), where \bar{x}_i is the sample mean, \mu_0 is the target mean, and k is a reference value typically set to half the shift size to detect (often 0.5 standard deviations).[3] These sums are plotted against time; if either exceeds a decision interval h (commonly 4 or 5 standard deviations), it signals an out-of-control process.[1] The method can be implemented in tabular form for precise monitoring or via a V-mask overlay, a visual aid introduced by G. A. Barnard in 1959 to interpret drifts.[1] Originally applied in industrial statistical process control to improve detection of shifts as small as 1 standard deviation—where Shewhart charts require larger samples—CUSUM has since expanded to diverse fields including healthcare, epidemiology, and environmental monitoring.[2] In surgical quality assurance, for instance, risk-adjusted CUSUM charts track cumulative outcomes like complication rates or mortality, rewarding acceptable performance and penalizing deviations to enable real-time intervention without fixed sample sizes.[4] Its advantages include enhanced power for small shifts (e.g., average run length reductions from hundreds to tens of samples) and adaptability to various data distributions through modifications like standardized or weighted variants.[1]Fundamentals
Definition and Purpose
The Cumulative Sum (CUSUM) control chart is a sequential statistical technique designed to monitor process stability by calculating and plotting the cumulative sum of deviations between observed values and a target mean.[1] This accumulation allows for the detection of gradual or small shifts in the process mean over time, making it particularly useful in quality control applications where maintaining consistent performance is critical.[5] The primary purpose of the CUSUM chart is to enable early identification of persistent changes in a process, which might otherwise go unnoticed in standard monitoring methods focused on individual outliers.[6] By emphasizing sustained deviations rather than isolated anomalies, it supports proactive adjustments to prevent defects and ensure product quality, especially in high-volume production environments.[7] Developed by E. S. Page in 1954 as part of continuous inspection schemes, the CUSUM method draws inspiration from the sequential probability ratio test (SPRT), adapting its principles for ongoing data analysis.[8][9] Beyond manufacturing, it serves as a tool for change point detection in diverse areas, including environmental monitoring[10] and financial time series analysis.[11] CUSUM monitoring can be configured as one-sided to target shifts in a single direction, such as increases or decreases, or two-sided to detect changes in either direction without altering the core accumulation process.[12]Historical Development
The cumulative sum (CUSUM) technique was first developed by E. S. Page in his 1954 paper "Continuous Inspection Schemes," published in Biometrika, where he proposed it as a method for monitoring process shifts in industrial quality control.[8] Page's work was directly inspired by Abraham Wald's sequential probability ratio test, which had been formulated during World War II to optimize decision-making under uncertainty in military applications, such as quality inspection of munitions.[13] This foundational contribution shifted focus from traditional Shewhart charts, which were less sensitive to small changes, toward cumulative approaches that accumulate evidence over time for more efficient detection. In 1959, G. A. Barnard introduced the V-mask as a graphical aid for interpreting CUSUM charts, allowing practitioners to visualize decision boundaries for signaling process deviations by overlaying a V-shaped mask on the cumulative sum plot. Barnard's innovation, detailed in his paper "Control Charts and Stochastic Processes" in the Journal of the Royal Statistical Society, Series B, enhanced the practicality of CUSUM for both upward and downward shifts, making it more accessible for routine use in manufacturing and inspection.[1] By the 1960s, CUSUM gained widespread adoption in quality control practices, as evidenced by its integration into statistical process monitoring discussions and applications in industries like chemicals and engineering, building on early implementations in continuous production processes.[14] Extensions and standardization efforts in the late 1970s and 1980s included its recognition in quality control guidelines, with further formalization in international standards such as ISO 7870-4 (2011) for cumulative sum charts.[15] Post-2000 developments have emphasized computational integration for real-time monitoring, with CUSUM algorithms embedded in statistical software like Minitab to enable automated charting and analysis in dynamic environments.[5] Recent adaptations in the 2020s include hybrids combining CUSUM with machine learning techniques, such as adjusted sequential CUSUM models for enhanced anomaly detection in high-dimensional data, though these build directly on the core framework without altering its foundational principles.[16]Mathematical Foundations
The CUSUM Statistic
The cumulative sum (CUSUM) statistic forms the basis of the CUSUM control chart, accumulating sequential deviations from a target process mean to enhance sensitivity to small, sustained shifts. Introduced by Page as a sequential testing procedure, it computes two one-sided statistics: an upper statistic to detect increases in the mean and a lower statistic to detect decreases.[2] The upper CUSUM statistic is given by S_i^{\upper} = \max\left(0, S_{i-1}^{\upper} + (\bar{x}_i - \mu_0) - k \right), where \bar{x}_i denotes the i-th sample mean from the process (or individual observation x_i when monitoring individuals), \mu_0 is the target (in-control) mean, and k > 0 is the reference value that determines the magnitude of shift to which the chart is tuned. The reference value is commonly chosen as k = \frac{\delta \sigma}{2}, with \delta representing the standardized shift size to detect (often around 1 or 2) and \sigma the standard deviation of the sample mean (or process standard deviation for individuals).[2][1] Symmetrically, the lower CUSUM statistic is S_i^{\lower} = \max\left(0, S_{i-1}^{\lower} + (\mu_0 - \bar{x}_i) - k \right), which can be rewritten as S_i^{\lower} = \max\left(0, S_{i-1}^{\lower} - (\bar{x}_i - \mu_0) - k \right). This formulation ensures that deviations below the target accumulate only when they exceed the reference value k in magnitude, mirroring the upper statistic's behavior for positive deviations. Both statistics are initialized at S_0^{\upper} = S_0^{\lower} = 0.[2][1] The CUSUM statistic assumes that the sample means \bar{x}_i (or observations x_i) are independent and identically distributed according to a normal distribution N(\mu, \sigma^2) with known variance \sigma^2. For processes with unknown variance, the data can be standardized by dividing the deviations by an estimate of \sigma, allowing the same recursive formulas to apply in standardized units where k and shifts are expressed relative to \sigma.[2][1]Performance Measures
The primary performance measure for the CUSUM control chart is the average run length (ARL), which quantifies the expected number of samples taken before the chart signals an out-of-control condition. The in-control ARL (ARL_0) is the average run length under stable process conditions and is typically targeted at approximately 370 for standard parameters such as a reference value k = 0.5 and decision interval h \approx 4.77, providing a false alarm rate comparable to that of a Shewhart \bar{X} chart with 3\sigma limits.[17] This value ensures the chart maintains a low rate of unnecessary signals while monitoring ongoing processes.[18] The out-of-control ARL (ARL_1) assesses the chart's ability to detect process shifts of standardized size \delta = |\mu - \mu_0| / \sigma, where smaller values indicate quicker detection as \delta increases; for example, with ARL_0 = 370, ARL_1 is less than 44 for a 1\sigma shift and less than 6.3 for a 2\sigma shift.[17] Exact ARL values are computed using Markov chain methods, which model the CUSUM statistic's state transitions as a discrete-state absorbing Markov process and solve for the fundamental matrix to obtain the expected time to absorption, or via integral equations that account for the continuous distribution of increments in the CUSUM statistic.[19] A simple approximation for ARL_1 is h / (\delta - k) for \delta > k, with more precise approximations adjusting for overshoot.[18] The operating characteristic (OC) curve for the CUSUM chart depicts the probability of signaling (1 - \beta, where \beta is the probability of not signaling) as a function of the shift size \delta, illustrating the chart's detection sensitivity across varying magnitudes of process changes; steeper curves indicate better discrimination between in-control and out-of-control states.[18] This curve is derived from ARL computations and helps evaluate trade-offs in parameter selection for specific shift detection goals. Factors affecting CUSUM performance include the reference value k, which tunes sensitivity to the targeted shift size (typically k = \delta^*/2 for a shift of interest \delta^*), and the decision interval h, which balances ARL_0 against detection speed.[18] The chart excels in detecting small shifts (\delta < 2\sigma), where it outperforms Shewhart charts by accumulating subtle deviations more effectively, but it can be slower for large shifts (\delta > 2\sigma) due to the cumulative nature of the statistic.[18]Implementation
Parameter Selection
The selection of parameters for a CUSUM chart is crucial for achieving desired detection performance, primarily involving the reference value k and the decision interval h. These parameters are chosen to optimize the chart's sensitivity to specific process shifts while controlling the false alarm rate, often guided by the in-control average run length (ARL_0). The reference value k is typically set to half the magnitude of the targeted shift in the process mean, expressed in standardized units. For a shift from the in-control mean \mu_0 to an out-of-control mean \mu_1, where the shift size is \delta \sigma with \delta = |\mu_1 - \mu_0| / \sigma and \sigma the process standard deviation, k = \delta / 2. This choice minimizes the out-of-control average run length (ARL_1) for the specified shift \delta, making the chart most sensitive to that level of change; a common default is k = 0.5 for detecting a 1\sigma shift.[1] The decision interval h determines the threshold for signaling an out-of-control condition and is selected to achieve a target in-control ARL_0, such as 370, which corresponds to a Type I error rate comparable to a 3\sigma Shewhart chart. For k = 0.5, h \approx 4.77 yields ARL_0 \approx 370; h = 5 yields ARL_0 \approx 465 in common two-sided implementations. More precise values are obtained from ARL tables, software simulations, or approximations like Markov chain methods.[18][3] Key considerations include estimating the process standard deviation \sigma from historical in-control data, often using the sample standard deviation from an initial Phase I sample of at least 20–30 subgroups to ensure stability. The desired shift sensitivity influences k, with smaller k values enhancing detection of minor shifts but increasing false alarms if h is not adjusted accordingly. For non-normal data, where normality assumptions may not hold, \sigma can be estimated via bootstrap resampling to approximate the distribution of the statistic and derive robust control limits.[1] An alternative to the tabular CUSUM is the V-mask representation, where the angle \theta of the mask arms relates to h and k via \tan(\theta/2) = k / (h \sqrt{1 + k^2}), but the tabular form is generally preferred for computational accuracy and ease of implementation in modern software.[20]Chart Construction and Interpretation
To construct a CUSUM chart, the cumulative sum statistic S_i^+ (for detecting increases) or S_i^- (for decreases) is calculated for each sample or observation and plotted against time or sample number i. When the process is in control, the plotted points exhibit random variation around zero; persistent upward drift in S_i^+ signals a mean shift increase, while upward drift in S_i^- indicates a decrease.[1] The decision interval H, typically scaled as H = h \sigma where h is a standardized reference value and \sigma is the process standard deviation, establishes the control limit; an out-of-control signal occurs if S_i^+ > H or S_i^- > H.[1] An alternative to tabular limits is the V-mask method, originally proposed by G. A. Barnard, which overlays a V-shaped mask on the cumulative sum plot. The mask's arms have a slope related to the reference value k (e.g., k = \frac{[\delta](/page/Delta) \sigma}{2} for a shift size \delta) and a height tied to the decision parameter h; a signal is triggered if the path of subsequent points crosses either arm of the mask.[1] This geometric approach allows visual assessment of shifts, with the mask slid backward along the plot to pinpoint the onset of the change.[1] Interpreting a CUSUM signal involves assessing the direction and magnitude of the drift: an upper signal (S_i^+ > H) suggests the process mean has increased, prompting downward adjustments to recenter the process, while a lower signal (S_i^- > H) indicates a decrease, requiring upward adjustments.[1] Upon signaling, the cumulative sum is typically reset to zero to restart monitoring from the in-control state, enabling ongoing detection of new shifts.[1] For practical implementation, CUSUM charts can be automated using statistical software, such as the qcc package in R, which provides functions for computing and plotting the statistics, or relevant modules in Python's statsmodels library for residual-based CUSUM analysis.[21]Examples
Numerical Example
To illustrate the application of the CUSUM control chart for individual observations, consider a synthetic dataset of 20 measurements from a normally distributed process with in-control mean \mu_0 = 10 and standard deviation \sigma = 1. The chart is designed to detect an upward shift of \delta = 1 (i.e., to a new mean of 11), using the reference value k = 0.5 and decision interval h = 4. The first eight observations are generated from N(10, 1), followed by a shift beginning at the ninth observation, with the remaining values generated from N(11, 1). For simplicity, the values are taken as exactly 10 for i=1 to $8and exactly 11 fori=9 to $20, which represents a representative case without loss of generality for demonstrating the computations.[1] The upper CUSUM statistic for detecting an upward shift is computed as S_i^+ = \max\left(0, S_{i-1}^+ + x_i - (\mu_0 + k)\right), with S_0^+ = 0. Similarly, the lower CUSUM statistic for a downward shift is S_i^- = \max\left(0, S_{i-1}^- + (\mu_0 - k) - x_i\right), with S_0^- = 0. An out-of-control signal occurs if S_i^+ > h or S_i^- > h. For each observation x_i, first compute the deviation x_i - \mu_0 - k = x_i - 10.5 for the upper arm and (\mu_0 - k) - x_i = 9.5 - x_i for the lower arm. The cumulative sums are then updated iteratively, resetting to zero if the increment would make them negative.[1] The following table presents the observations, deviations for the upper arm, and the resulting S_i^+ and S_i^- values:| i | x_i | x_i - 10.5 | S_i^+ | S_i^- |
|---|---|---|---|---|
| 1 | 10.0 | -0.5 | 0.0 | 0.0 |
| 2 | 10.0 | -0.5 | 0.0 | 0.0 |
| 3 | 10.0 | -0.5 | 0.0 | 0.0 |
| 4 | 10.0 | -0.5 | 0.0 | 0.0 |
| 5 | 10.0 | -0.5 | 0.0 | 0.0 |
| 6 | 10.0 | -0.5 | 0.0 | 0.0 |
| 7 | 10.0 | -0.5 | 0.0 | 0.0 |
| 8 | 10.0 | -0.5 | 0.0 | 0.0 |
| 9 | 11.0 | 0.5 | 0.5 | 0.0 |
| 10 | 11.0 | 0.5 | 1.0 | 0.0 |
| 11 | 11.0 | 0.5 | 1.5 | 0.0 |
| 12 | 11.0 | 0.5 | 2.0 | 0.0 |
| 13 | 11.0 | 0.5 | 2.5 | 0.0 |
| 14 | 11.0 | 0.5 | 3.0 | 0.0 |
| 15 | 11.0 | 0.5 | 3.5 | 0.0 |
| 16 | 11.0 | 0.5 | 4.0 | 0.0 |
| 17 | 11.0 | 0.5 | 4.5 | 0.0 |
| 18 | 11.0 | 0.5 | 5.0 | 0.0 |
| 19 | 11.0 | 0.5 | 5.5 | 0.0 |
| 20 | 11.0 | 0.5 | 6.0 | 0.0 |
Real-World Application
In pharmaceutical manufacturing, the cumulative sum (CUSUM) control chart has been effectively applied to monitor tablet weight uniformity, ensuring consistent dosage and regulatory compliance. A case study from a Turkish pharmaceutical company in 2015 illustrates its practical impact in the compression stage of tablet production, where assignable causes such as machine tool wear or inadequate mixing can lead to mean shifts in weight.[22] The process targeted a mean tablet weight of 250.8 mg with a historical standard deviation σ = 2.68 mg, using data from multiple production batches involving hourly sampling of 10–15 tablets over compression runs.[22] Parameters were selected via economic design optimization with R software (edcc package), setting the sample size n = 15, sampling interval h ≈ 5.34 hours, decision interval H = 0.653, and reference shift δ = 1.4σ (approximately k = 0.7 in standardized terms) to balance detection speed and costs, with a low false alarm rate (FAR ≈ 0.00014).[22] This setup, based on normally distributed weight data verified by the Kolmogorov-Smirnov test, enabled monitoring across extended production periods equivalent to over 100 batches. The CUSUM chart proved sensitive to small mean shifts, such as a 0.5σ deviation (about 1.34 mg, or roughly 0.5% of the target weight), detecting out-of-control conditions while maintaining a low false alarm rate.[22] Compared to traditional Shewhart X-bar charts, the CUSUM approach excelled in early detection of subtle shifts, signaling faster for small process changes that Shewhart might miss until larger deviations occur, thus reducing nonconforming tablets and associated waste through timely interventions like machine adjustments.[22] Implementation challenges included the need for precise parameter tuning to avoid excessive sensitivity leading to unnecessary downtime and integration with existing quality systems, though the low FAR minimized operational disruptions.[22] In the 2020s, CUSUM methods have extended to supply chain monitoring for anomaly detection, aiding resilience against disruptions like those from the COVID-19 pandemic by identifying shifts in inventory or delivery patterns.[23]Comparisons and Variants
Comparison to Other Control Charts
The cumulative sum (CUSUM) control chart offers distinct advantages over the Shewhart chart, particularly in detecting small process shifts. While both charts maintain similar in-control average run lengths (ARL_0 ≈ 370), CUSUM is more effective for small shifts (δ < 1σ), where Shewhart's lack of memory results in slower detection, often requiring ARL_1 > 150 for δ = 0.5. In contrast, Shewhart excels at identifying large shifts (δ > 2σ), with quicker signals due to its reliance on current observations alone.[1][24] CUSUM's cumulative nature provides "memory" of past deviations, enhancing sensitivity to gradual or sustained changes that Shewhart might overlook.[1] Compared to the exponentially weighted moving average (EWMA) chart, CUSUM and EWMA both demonstrate strong performance for small shifts, with comparable ARL properties; however, CUSUM provides sharper detection for sustained step shifts at or near the designed size, while EWMA offers smoother responses in noisy environments due to its exponential decay of older data.[25][26] EWMA may detect transitory or very small shifts (δ < 0.8σ) slightly faster in some cases, but CUSUM's structure makes it preferable for persistent changes in stable processes.[26] CUSUM is typically chosen for monitoring step shifts in processes with low variability, where quick detection of small to moderate changes (δ = 0.5–2σ) is critical. The following table illustrates representative zero-state ARL_1 comparisons (ARL_0 ≈ 370, n=4, uncorrelated data) for Shewhart, standard CUSUM (k=0.5), and EWMA (λ=0.2) charts, highlighting CUSUM's superiority for δ ≤ 1.5σ.[24][25]| Shift (δ) | Shewhart ARL_1 | CUSUM ARL_1 | EWMA ARL_1 |
|---|---|---|---|
| 0.5 | 155 | 36 | 33 |
| 1.0 | 44 | 10 | 10 |
| 1.5 | 15 | 5 | 5 |
| 2.0 | 6 | 3 | 4 |