Sub topic 13
Pitfalls: autocorrelation, non-normality, overdispersion, and overreaction
This chapter assumes you can already build and read I-MR, X-bar and R, p, and u charts, and that you know the difference between control and specification limits. It covers four ways a correctly computed chart can still mislead you. For each one you will see the symptom, the cause, a check you can run, and a remedy.
Why correct arithmetic is not enough
Every limit formula in this tutorial rests on assumptions about the data. Three of them matter most:
- Points are independent of each other.
- The within-sample spread is a fair estimate of the spread between samples.
- The distribution is close enough to the one the limits assume (roughly symmetric for variables charts, binomial or Poisson for attribute charts).
When an assumption fails, the chart still draws a center line and limits. The limits are just in the wrong place. You get either false alarms that send people chasing noise, or missed signals that let real shifts go by.
Autocorrelation
Autocorrelation means that each observation is related to the one before it. Temperatures in a furnace, tank levels, and tool wear all behave this way. If today's value is high, tomorrow's is likely high too.
What goes wrong
The I-MR chart estimates sigma from the average moving range. Consecutive points that are similar produce small moving ranges. The average moving range then understates the real spread of the process, and the limits come out too narrow.
For a simple first-order autoregressive process with correlation phi, the true standard deviation is sigmax. The moving range method estimates only about sigmax times the square root of (1 − phi). With phi = 0.7 that is about 55% of the true value. Points then fall outside the "3-sigma" limits roughly 10% of the time, against 0.27% for independent data. Many of those alarms are false.
How to check
Compute the lag-1 autocorrelation of the baseline data. Values near zero are fine. Values above about 0.3 in absolute terms, on 50 or more points, deserve attention. A run chart that moves in slow waves is another sign.
import numpy as np
def lag1_autocorr(x):
"""Sample autocorrelation at lag 1."""
d = np.asarray(x, dtype=float)
d = d - d.mean()
return float(np.sum(d[1:] * d[:-1]) / np.sum(d * d))
def imr_limits(x):
"""Center line and I-chart limits from the average moving range."""
x = np.asarray(x, dtype=float)
mr_bar = np.abs(np.diff(x)).mean()
center = x.mean()
return center - 2.66 * mr_bar, center, center + 2.66 * mr_bar
def simulate_ar1(n, phi, rng):
e = rng.normal(size=n)
x = np.zeros(n)
for t in range(1, n):
x[t] = phi * x[t - 1] + e[t]
return x
rng = np.random.default_rng(7)
for phi in (0.0, 0.7):
alarm_rates = []
for _ in range(300):
x = simulate_ar1(200, phi, rng)
lcl, _, ucl = imr_limits(x)
alarm_rates.append(np.mean((x > ucl) | (x < lcl)))
print(f"phi={phi}: lag-1 = {lag1_autocorr(x):.2f}, "
f"mean false-alarm rate = {np.mean(alarm_rates):.3f}")Run this and compare the two false-alarm rates. The independent case stays near 0.003. The correlated case is several times higher.
Remedies
- Sample less often. If the process has memory, wider spacing between samples reduces the correlation. This is the cheapest fix when measurement cost allows it.
- Chart the residuals. Fit a time-series model (for example an AR(1)) and put an I-MR chart on the differences between observed and predicted values. The residuals should be nearly independent.
- Accept that some drift is normal. For processes like tool wear, a planned adjustment cycle is often better than a chart that alarms continuously.
Non-normality
The 3-sigma limits are most trustworthy when the data are roughly symmetric and bell-shaped. Skewed data break this in a predictable way.
Individual values on an I chart
An I chart acts on single measurements, so the shape of the raw distribution matters directly. Consider waiting times or particle counts, which are often right-skewed. For an exponential distribution with mean m, sigma also equals m. The upper limit lands at 4m, and the chance of a point beyond it is e^(−4), about 1.8%. That is roughly 13 times the 0.135% you expect in one tail of a normal distribution. The lower limit falls at −2m, which is impossible for a time measurement. The chart can never signal a downward shift and gives frequent false upward alarms.
Subgroup means help
X-bar charts are protected by the central limit theorem. Means of 4 or 5 observations are much closer to normal than the individual values. This is a practical reason to prefer subgrouped data when you can collect it. The R chart is less protected, because ranges stay skewed even in moderate subgroups. Treat a lone range point just above the upper limit with a little caution.
Attribute charts with small counts
A p chart assumes the number of defectives is approximately normal. That holds when n × pbar is at least about 5 (many practitioners use 10). With n = 50 and pbar = 0.02 the expected count is 1. The lower limit is truncated at zero, and the upper limit is too tight or too loose depending on the exact distribution. The same problem affects u charts when the expected defects per sample are about 5 or fewer.
Remedies
| Situation | Remedy |
|---|---|
| Skewed individual measurements | Transform (log for strictly positive data, or a power transform), chart the transformed values, and label the axis clearly |
| Skewed process by nature (times, counts of rare events) | Chart the time or count between events instead, or use subgroup means |
| Small expected counts on p or u | Increase the sample size per period, or combine periods |
| Rare events | Use a chart designed for rare events, such as one that plots time between failures |
Overdispersion
Overdispersion is the attribute-data counterpart of too-narrow limits. A p chart assumes each period's defective count is binomial, so its variance is p(1 − p)/n. A u chart assumes a Poisson count, so its variance is u/n. Real processes often vary more than that. Batches of raw material differ, shifts differ, and operators differ. These extra causes add between-period variation on top of the pure sampling noise.
Symptoms
- Many points outside the limits, with no pattern that points to a single cause.
- The problem gets worse as sample sizes grow. With n in the thousands, the binomial limits become extremely tight, and small ordinary differences between batches fall outside them.
- Investigation of each alarm finds nothing specific.
Check: standardize and compare
Convert each point to a z score, using its own limits: z = (p − pbar) / sigmap. If the binomial model is right, the z scores have a standard deviation near 1. Estimate their actual spread with the moving range method. A ratio well above 1 indicates overdispersion.
import numpy as np
d = np.array([4, 6, 3, 8, 5, 7, 4, 6])
n = np.array([100, 120, 90, 150, 110, 130, 100, 125])
p = d / n
p_bar = d.sum() / n.sum()
sigma_p = np.sqrt(p_bar * (1 - p_bar) / n)
z = (p - p_bar) / sigma_p
sigma_z = np.abs(np.diff(z)).mean() / 1.128 # moving range estimate, d2 = 1.128
print("overdispersion ratio:", round(float(sigma_z), 2))
# Laney-style adjusted limits: widen by the ratio when it exceeds 1
adj = max(1.0, float(sigma_z))
ucl = p_bar + 3 * sigma_p * adj
lcl = np.maximum(0.0, p_bar - 3 * sigma_p * adj)
print("adjusted UCL:", np.round(ucl, 4))
print("adjusted LCL:", np.round(lcl, 4))The max(1.0, ...) call means the adjustment only ever widens the limits. A ratio below 1 (underdispersion) is rare and often points to data problems such as rounding or sorted samples. Look for that cause before you narrow anything.
Remedies
The adjusted chart in the code is often called a Laney p′ or u′ chart. It treats the extra variation as part of the normal background noise. Use it when you cannot or will not remove the between-period causes. If the between-period differences are worth eliminating, for example differences between shifts, investigate them directly. In that case the unadjusted chart is doing its job by flagging them.
Overreaction
The last pitfall is human. Charts exist to stop people from reacting to noise, and yet charts often become the tool for it.
Tampering
Tampering means adjusting a stable process in response to each common-cause fluctuation. Suppose the output is 0.3 units above target, so an operator lowers a setting by 0.3. Next time the output is 0.2 below, so the setting goes up by 0.2. Each adjustment adds the previous noise to the process. In the classic funnel experiment, this compensation rule increases the variance of the output by about 40%, and other rules do worse.
The rule: act on points that signal, and leave points inside the limits alone.
Other forms of overreaction
- Too many signal rules. Each extra rule adds false alarms. If you apply eight rules at once to a stable process, you will see an alarm every so often by chance alone. Choose a small set that fits your risk, such as a point beyond the limits plus a run of eight.
- Recalculating limits after every signal. Limits recomputed each time a point looks odd will drift to include the odd points, and the chart never signals again. Recalculate only after a confirmed, lasting process change.
- Treating every signal as a crisis. A single point beyond the limits has a small probability of being a false alarm even in a stable process (0.27% for normal data). Check the measurement system and the record first, then look for a cause.
- Reacting to the chart's pattern instead of the process. A point that is high because the gauge was recalibrated is a measurement signal, not a process signal.
A sensible response order
- Confirm the data point is real (entry error, gauge, sample mix-up).
- Check whether the signal repeats on the next points.
- Look for a specific, assignable cause tied to the time of the signal.
- Adjust the process only if a cause is found.
- If none is found and the signal does not repeat, note it and continue monitoring.
Summary of pitfalls
| Pitfall | Symptom | Check | Typical remedy |
|---|---|---|---|
| Autocorrelation | Slow waves, too many alarms on I charts | Lag-1 autocorrelation | Sample less often, chart residuals |
| Non-normality | One-sided alarms, impossible limits | Histogram, small n × p_bar | Transform, use subgroup means, larger samples |
| Overdispersion | Many unexplained alarms on p or u charts | Standard deviation of z scores | Laney-style limits, investigate between-period causes |
| Overreaction | Frequent adjustments, constant recalculation | Review adjustment log against chart signals | Act only on signals, fix a rule set |
Exercise
A p chart for daily defective counts has sample sizes near 2,000. Of 30 points, 9 fall outside the limits, and checking each one finds no specific cause. The standard deviation of the z scores, estimated from the moving range, is 2.1. What is the most likely issue, and what do you do with the limits?
Show answer
Overdispersion. The z-score spread of 2.1 means the real day-to-day variation is about twice what the binomial model assumes, and the large sample size makes the binomial limits very narrow. Widen the limits by multiplying the 3-sigma half-width by 2.1 (Laney p′ chart), then investigate any remaining signals. Also look for recurring between-day causes, such as shift or batch differences, if you want to reduce the extra variation itself.
Exercise
An I chart of oven temperature has a lag-1 autocorrelation of 0.8 and shows many points beyond the limits, but the process is stable and no cause is found. Name two actions that address the real problem, and one action to avoid.
Show answer
Sample less often so consecutive readings are less correlated, or fit a time-series model and chart its residuals. Avoid widening the limits by hand or ignoring signals, because the narrow limits come from the understated moving-range sigma, and manual changes would hide real shifts as well as false ones.
Exercise
Why does an X-bar chart with subgroups of 5 cope with skewed data better than an I chart on the same process, and which chart in the pair is still sensitive?
Show answer
Means of 5 values are closer to normal because of the central limit theorem, so the 3-sigma limits on the X-bar chart behave roughly as expected. The R chart remains sensitive, because ranges stay skewed, so a single range point just above the upper limit should be treated with caution.