Between/within capability analysis: Cpk when subgroups shift
A between/within capability analysis is a capability study for processes in which the subgroup means vary more than the variation inside a subgroup can explain, and that extra variation is a permanent part of the process. It estimates a between-subgroup standard deviation and a within-subgroup standard deviation, combines them into σ_B/W, and computes Cp and Cpk from that combined σ. Without it, the usual Cpk would count only the within part and overstate capability.
When to use it
- Each subgroup comes from a different coil, batch, mold setup, raw-material lot or roll, and these naturally differ a little from each other.
- An Xbar chart shows many points outside its limits, but the subgroup means themselves are stable over time on an individuals chart. The I-MR-R/S chart is the control chart that matches this analysis.
- The within-subgroup Cpk looks excellent and yet parts fail at the customer.
- If the subgroup means drift or jump unpredictably, fix the stability first; this analysis assumes the between-subgroup variation is stable too.
How it works
The analysis splits the variation into two parts and adds them back together:
- Within σ (σ_W) from the variation inside each subgroup: the pooled standard deviation, or R̄/d₂ or S̄/c₄.
- Variation of the subgroup means. Take the moving ranges of consecutive subgroup means; their average divided by 1.128 estimates σ_x̄, the standard deviation of a subgroup mean.
- Between σ (σ_B). A subgroup mean varies because of between-subgroup differences and because it averages only n values, which contributes σ_W²/n. Removing that part:
σ_B² = max(0, σ_x̄² − σ_W² / n)
σ_B/W = √(σ_B² + σ_W²)- Indices. Cp and Cpk use σ_B/W in the usual formulas: Cp = (USL − LSL)/(6σ_B/W), Cpk = min(USL − x̄, x̄ − LSL)/(3σ_B/W). Pp and Ppk still use the overall sample standard deviation.
Example
A coil coating line paints galvanized steel. The paint film must be 22 to 28 µm thick. From each of 10 consecutive coils, a technician cuts a sample from the tail and takes three readings (µm):
| Coil | Reading 1 | Reading 2 | Reading 3 | Mean |
|---|---|---|---|---|
| 1 | 25.6 | 25.9 | 25.2 | 25.567 |
| 2 | 26.0 | 25.8 | 26.3 | 26.033 |
| 3 | 25.6 | 25.5 | 25.2 | 25.433 |
| 4 | 24.0 | 24.1 | 24.0 | 24.033 |
| 5 | 26.8 | 26.6 | 24.8 | 26.067 |
| 6 | 24.8 | 25.6 | 25.5 | 25.300 |
| 7 | 24.9 | 24.9 | 25.9 | 25.233 |
| 8 | 25.3 | 25.6 | 26.8 | 25.900 |
| 9 | 26.0 | 26.0 | 25.4 | 25.800 |
| 10 | 24.7 | 25.6 | 25.6 | 25.300 |
The grand mean is 25.467 µm. The pooled within-coil standard deviation is σ_W = 0.547. With limits from that within variation (x̄ ± 3σ_W/√3, from 24.52 to 26.41), the chart of coil means already shows that coils differ by more than the readings inside a coil do: coil 4 falls below the lower limit.
The nine moving ranges of the coil means average 0.733, so σ_x̄ = 0.733 / 1.128 = 0.650. Then σ_B² = 0.650² − 0.547²/3 = 0.323, σ_B = 0.568, and σ_B/W = √(0.568² + 0.547²) = 0.789. The overall standard deviation of the 30 readings is 0.730.
| Basis | σ | Cp or Pp | Cpk or Ppk | Expected PPM |
|---|---|---|---|---|
| Within only | 0.547 | 1.83 | 1.54 | 2 |
| Between/within | 0.789 | 1.27 | 1.07 | 664 |
| Overall | 0.730 | 1.37 | 1.16 | 260 |
An individuals chart of the coil means (limits 23.52 to 27.42) and a moving range chart (upper limit 2.40, largest moving range 2.03) show no special causes, and the range chart of the readings within each coil is in control too. The coil-to-coil differences are stable, so they belong in the capability estimate.
How to read the results
- The within-only Cpk is misleading. At 1.54 it describes a process that never changes coils. Real production does, and the between/within Cpk of 1.07 is what the customer will see.
- Half the variance is between coils. σ_B² (0.323) is slightly larger than σ_W² (0.299). Reducing the coil-to-coil differences (incoming zinc layer, line speed, paint viscosity per batch) is worth as much as reducing variation within a coil.
- Between/within against overall. Both estimate the full process spread and should be close; here they are 0.789 and 0.730. The between/within estimate leans on only nine moving ranges, so differences of this size are expected.
- Decide on the target. The mean (25.47) is 0.47 µm above the middle of the tolerance; centering would raise Cpk from 1.07 to Cp = 1.27, still short of 1.33.
Common mistakes
- Reporting the within Cpk because it is the default. If the subgroups are coils or batches, between-subgroup variation is part of what you ship.
- Using it to excuse instability. Between/within assumes the coil-to-coil variation is random and stable. A trend or a sudden step in the coil means is a special cause, not "between variation".
- Too few subgroups. σ_B rests on the moving ranges of the subgroup means. With 10 subgroups it is rough; 25 or more give a much better estimate.
- Subgroups that mix sources. If one subgroup contains readings from two coils, the within σ grows and the between σ shrinks, and the split loses its meaning.
Frequently asked questions
How is this different from Ppk?
Ppk uses the overall standard deviation of all values, which also includes both between and within variation. Between/within Cpk builds the same total from its parts, using moving ranges of the subgroup means, so it is less affected by slow drifts and it shows how much each part contributes.
What if σ_x̄² is smaller than σ_W²/n?
Then the subgroup means vary no more than averaging alone predicts, the between component is set to 0, and σ_B/W equals σ_W. The ordinary within capability applies.
Which control chart goes with this analysis?
The I-MR-R/S chart: an individuals chart and a moving range chart of the subgroup means, plus an R or S chart of the variation within subgroups.
Can I use it for batches measured at the same time, not in sequence?
The moving range method assumes the subgroups are in time order. For batches without a natural order, a variance-components approach, as in batch capability, is a better fit.