Process monitoring
Overdispersion in p and u Charts: When to Use Laney p′ and u′
A p chart with a few thousand units a day can put several ordinary days outside its limits, because the limits allow only for sampling variation and not for the real day-to-day variation that many processes have. This guide explains why that happens, how to check whether your data show it, how the Laney p′ chart measures the extra variation and widens the limits to match, and what that costs, with a worked example that starts in the site's Attribute Control Chart Calculator and finishes in a spreadsheet.
Quick answer
The limits of a p chart assume that every day's fraction defective comes from the same binomial distribution: one true fraction, with only sampling variation around it. Their width shrinks with the square root of the sample size, so with thousands of units a day they can become narrow enough that the ordinary variation between days falls outside them. That is overdispersion: more variation between subgroups than the binomial model allows. The Laney p′ chart converts each day to a z-score against the p chart, measures how widely the z-scores actually vary with a moving range, and multiplies the distance from p̄ to each of the p chart's limits by that factor, σz. With σz close to 1 the p′ chart is the p chart; with σz above 1 its limits are wider. The u′ chart does the same for defects per unit. In the worked example, the p chart flags two days and the p′ chart flags only the one day that was made to be different. The price is that the day-to-day variation becomes part of what the chart treats as normal.
Why large samples make p and u charts cry wolf
The NIST/SEMATECH e-Handbook derives the p chart from the binomial model: with a process fraction p and samples of n units, the limits are p ± 3√(p(1 − p)/n). When p is not known, it is estimated from preliminary samples. For a c chart the e-Handbook's section on counts control charts uses the Poisson model, and the u chart applies the same idea to defects per unit.
Both models describe sampling variation only. Nothing in √(p(1 − p)/n) allows for the true fraction itself moving a little from day to day. With small samples the sampling variation is large and hides that movement. With large samples it is not: at a fraction of 0.02 and 2,000 units, the binomial standard deviation of the daily fraction is 0.0031, so a day only 0.0094 above the average falls outside the 3σ limit. If the true daily fraction itself varies with a standard deviation of half a percentage point (0.005), about one day in nine falls outside the 3σ limits at that sample size, although nothing unusual has happened on it.
Minitab's documentation describes the same effect: traditional P and U charts assume the rate is constant, so with large subgroups the limits become narrow and points can appear out of control when they are not. Laney's Quality Digest article notes that there is sometimes batch-to-batch variation as well, and calls the result overdispersion.
Checking for overdispersion
Two checks are freely documented.
- σz from the data. Laney's suggestion is to compute the spread of the z-scores instead of assuming it is 1. If the data are binomial, the z-scores have a standard deviation of about 1; if there is overdispersion, σz comes out greater than 1. The calculation is the same as for the Laney chart itself (next section), so σz is both the check and the correction.
- Minitab's P Chart Diagnostic. Minitab compares the observed variation with the variation the binomial model expects and reports their ratio. A ratio above an upper confidence limit, which depends on the number of subgroups, the average subgroup size and the average proportion, indicates overdispersion; a ratio below a fixed 60 % indicates underdispersion. In Minitab's examples the ratios are 175.7 % against an upper limit of 136.6 %, and 184.3 % against 129.4 % with subgroups averaging more than 2,500 records. This guide does not reproduce the diagnostic's formulas.
Underdispersion, a σz below 1, means the data vary less than the binomial model allows. Minitab's documentation names autocorrelation as a possible cause, for example from a wearing tool; the p′ chart then narrows the limits.
The Laney p′ chart step by step
With subgroups in time order, the numbers of defectives dᵢ and the subgroup sizes nᵢ, Minitab's documentation and Laney's article give the same steps:
- Center line. p̄ = Σdᵢ / Σnᵢ, the pooled fraction, as for the p chart.
- Standard deviation for each subgroup. σpᵢ = √(p̄(1 − p̄)/nᵢ), the p chart's value for that subgroup size.
- z-scores. zᵢ = (pᵢ − p̄) / σpᵢ, where pᵢ = dᵢ / nᵢ.
- Moving ranges of the z-scores. MRᵢ = |zᵢ − zᵢ₋₁| for consecutive subgroups, and their average MR̄.
- σz. σz = MR̄ / 1.128, as on an individuals (XmR) chart.
- Limits. UCL = p̄ + 3 σpᵢ σz and LCL = p̄ − 3 σpᵢ σz for each subgroup. Minitab sets a negative LCL to 0 and caps the UCL at 1.
Laney points out two special cases. If the data are binomial, σz is about 1 and the p′ chart is the p chart. If every subgroup has the same size, the p′ limits are those of an individuals chart on the fractions themselves. The p′ chart can be read as an individuals chart that keeps the p chart's adjustment for unequal subgroup sizes.
The u′ chart
For defects counted per unit, Minitab's Laney U′ chart follows the same steps with the Poisson standard deviation: uᵢ = cᵢ / nᵢ for cᵢ defects on nᵢ units, ū = Σcᵢ / Σnᵢ, zᵢ = (uᵢ − ū) / √(ū/nᵢ), σz = MR̄ / 1.128 from the moving ranges of the zᵢ, and limits ū ± 3 √(ū/nᵢ) σz, with a negative LCL set to 0. The steps and the cautions in this guide apply to it in the same way; Minitab's diagnostic for defects data is the U Chart Diagnostic.
Worked example: 25 days of visual inspection
The data below are synthetic. They represent the number of molded housings inspected each day at a final visual inspection and the number rejected, over 25 days. Each day's inspected count was drawn between 1,800 and 2,600. Each day's true fraction rejected was drawn from a normal distribution with mean 0.02 and standard deviation 0.005, so the days differ for reasons a p chart does not allow for; on day 18 it was set to 0.045 instead, to represent a real excursion. The rejected counts were then drawn unit by unit. The random seed was the first, counting up from 1, for which the p′ chart flags day 18 alone and the p chart flags at least one other day; that was seed 1.
Step 1: the p chart. Pasted into the Attribute Control Chart Calculator as a p chart, one "inspected,rejected" pair per line, the 25 days give p̄ = 0.0208 (1,155 rejected out of 55,419 inspected), limits of 0.0117 to 0.0299 at the average sample size of 2,217, and limits computed for each day's own size. Two days fall outside their limits: day 18 at 0.0486, above its UCL of 0.0296, and day 21 at 0.0108, below its LCL of 0.0124.
Step 2: z-scores and moving ranges. The table gives each day's fraction, its z-score against the p chart and the moving range of the z-scores.
| Day | Inspected | Rejected | Fraction rejected | z | Moving range of z |
|---|---|---|---|---|---|
| 1 | 1,937 | 37 | 0.0191 | −0.54 | — |
| 2 | 2,252 | 36 | 0.0160 | −1.61 | 1.08 |
| 3 | 2,419 | 40 | 0.0165 | −1.48 | 0.13 |
| 4 | 1,890 | 33 | 0.0175 | −1.03 | 0.45 |
| 5 | 2,370 | 32 | 0.0135 | −2.50 | 1.47 |
| 6 | 2,353 | 41 | 0.0174 | −1.16 | 1.34 |
| 7 | 2,376 | 33 | 0.0139 | −2.37 | 1.21 |
| 8 | 2,243 | 44 | 0.0196 | −0.41 | 1.97 |
| 9 | 2,204 | 42 | 0.0191 | −0.59 | 0.18 |
| 10 | 1,961 | 30 | 0.0153 | −1.72 | 1.13 |
| 11 | 2,114 | 52 | 0.0246 | +1.21 | 2.93 |
| 12 | 1,800 | 52 | 0.0289 | +2.39 | 1.18 |
| 13 | 2,089 | 37 | 0.0177 | −1.00 | 3.39 |
| 14 | 1,929 | 43 | 0.0223 | +0.45 | 1.45 |
| 15 | 2,253 | 51 | 0.0226 | +0.60 | 0.15 |
| 16 | 2,268 | 65 | 0.0287 | +2.61 | 2.01 |
| 17 | 2,335 | 62 | 0.0266 | +1.93 | 0.67 |
| 18 | 2,408 | 117 | 0.0486 | +9.53 | 7.60 |
| 19 | 2,470 | 39 | 0.0158 | −1.76 | 11.29 |
| 20 | 2,017 | 56 | 0.0278 | +2.18 | 3.93 |
| 21 | 2,595 | 28 | 0.0108 | −3.58 | 5.76 |
| 22 | 1,944 | 29 | 0.0149 | −1.83 | 1.76 |
| 23 | 2,347 | 58 | 0.0247 | +1.31 | 3.14 |
| 24 | 2,516 | 49 | 0.0195 | −0.48 | 1.79 |
| 25 | 2,329 | 49 | 0.0210 | +0.07 | 0.55 |
The 24 moving ranges average 2.357, so σz = 2.357 / 1.128 = 2.09. The z-scores vary about twice as much as the binomial model allows: the data are overdispersed.
Step 3: the p′ limits. Each day's p chart half-width, 3 σpᵢ, is multiplied by 2.09. At the average sample size the limits become 0.0018 to 0.0399, against 0.0117 to 0.0299 for the p chart. For the two days the p chart flagged:
| Day | Fraction rejected | p chart limits | p′ limits | p chart | p′ chart |
|---|---|---|---|---|---|
| 18 | 0.0486 | 0.0121 to 0.0296 | 0.0026 to 0.0391 | Above UCL | Above UCL |
| 21 | 0.0108 | 0.0124 to 0.0293 | 0.0033 to 0.0384 | Below LCL | Inside |
Day 21 was an ordinary day at the low end of the day-to-day variation, and the p′ chart no longer flags it. Day 18 was the excursion, and the p′ chart still flags it.
Step 4: the effect of the excursion on σz. Day 18 enters two moving ranges, 7.60 and 11.29, which together make up 33 % of the total. Recomputed without day 18, the 24 remaining days give σz = 1.63; the p chart now flags days 16 and 21, and the p′ chart flags none. A large excursion inflates σz and widens the limits for every other day, which is one more reason to look for the cause of a flagged day before using the limits for monitoring.
What Laney limits give up
The p′ chart treats the day-to-day variation it measures as part of the process. That is the right reading when that variation is routine and nobody intends to remove it. It is the wrong reading when the variation between days is itself the problem: if material lots or setups differ enough to move the daily fraction, the p chart's signals point at something that could be reduced, and widening the limits hides it. Before switching to the p′ chart, decide which of the two the process is.
σz is also an estimate. Twenty-five subgroups give 24 moving ranges, and a value of 1.3 from that many days says less than one of 2 or more. The worked example shows how much one unusual day can move it.
Common mistakes
- Switching to p′ because the p chart has too many signals. Check first whether the signals mark days with a real difference; the p′ chart is for variation that is accepted as routine.
- Taking moving ranges of the fractions instead of the z-scores when the subgroup sizes differ. The z-scores put every day on the same scale; the fractions do not.
- Breaking the time order. The moving ranges are only meaningful between consecutive subgroups.
- Computing σz from data that include known excursions and then using the limits for monitoring. Find the cause of a flagged day, and recompute without it if it is not part of the routine process.
- Using p′ when the subgroups are small. With a few dozen units per subgroup the binomial variation is large, overdispersion is hard to see, and the p chart is usually adequate.
Using the tools with this guide
The Attribute Control Chart Calculator gives p̄ or ū, the limits for each subgroup's own size and the subgroups outside them for p, np, c and u charts. It does not compute Laney limits: for steps 2 and 3, put the subgroup sizes and counts in a spreadsheet and add columns for pᵢ, σpᵢ, zᵢ and the moving range. Which control chart for which data covers when a count chart is the right chart, and Control chart run rules explains why the zone rules need care on count charts.
Sources and further reading
- NIST/SEMATECH e-Handbook of Statistical Methods, Section 6.3.3, What are Attributes Control Charts? — c, p and u charts.
- NIST/SEMATECH e-Handbook, Section 6.3.3.1, Counts Control Charts — the c chart and its Poisson basis.
- NIST/SEMATECH e-Handbook, Section 6.3.3.2, Proportions Control Charts — the p chart and its binomial basis.
- Laney, D. B., P-Charts and U-Charts Work (But Only Sometimes), Quality Digest, What Works column — overdispersion, σz from moving ranges of z-scores, and the p′ limits.
- Minitab Support: Methods and formulas for Laney P′ Chart and for Laney U′ Chart — z-scores, σz and the limits.
- Minitab Support: Overdispersion and underdispersion — the effect of large subgroups on traditional limits.
- Minitab Support: Overview for P Chart Diagnostic, Example of P Chart Diagnostic and Methods and formulas for P Chart Diagnostic — the observed-to-expected ratio and its limits.
- Laney, D. B., "Improved Control Charts for Attributes", Quality Engineering, 14(4), 531–537, 2002, doi:10.1081/QEN-120003555.
- Kitstead Labs guides: Which control chart for which data, Control chart run rules, I-MR control charts.