Sub topic 5
Estimating Sigma from Subgroups
Assume you know how to calculate a mean and understand the basic idea of a normal distribution. Familiarity with control charts is helpful but not required.
For capability analysis, the standard deviation, written as sigma or σ, measures process spread. Cp and Cpk are most useful when σ represents short-term, within-process variation. One practical estimate comes from rational subgroups.
What a subgroup represents
A subgroup is a small set of measurements collected close together under similar conditions. For example, you might measure five consecutive parts from a machine, then repeat the collection at regular intervals.
The variation inside each subgroup mainly reflects short-term, common-cause variation. Differences between subgroup averages may reflect shifts over time, changes in material, tool wear, or other longer-term effects.
Use subgroups only when their construction makes this distinction reasonable.
The R-bar over d2 method
For each subgroup, calculate its range:
\[ R_i = \text{largest value} - \text{smallest value} \]
Then calculate the average range, written as \(\bar{R}\):
\[ \bar{R} = \frac{R1 + R2 + \cdots + R_k}{k} \]
The within-subgroup standard deviation is estimated by:
\[ \hat{\sigma}{within} = \frac{\bar{R}}{d2} \]
The constant \(d_2\) depends on the subgroup size. It comes from the expected range of a sample from a normal distribution.
| Subgroup size | \(d_2\) |
|---|---|
| 2 | 1.128 |
| 3 | 1.693 |
| 4 | 2.059 |
| 5 | 2.326 |
For three subgroups of five measurements, suppose every subgroup has a range of 0.04. Then:
\[ \bar{R}=0.04 \]
\[ \hat{\sigma}_{within}=\frac{0.04}{2.326}\approx0.0172 \]
This estimate can then be used in Cp and Cpk calculations.
from statistics import mean
D2 = {2: 1.128, 3: 1.693, 4: 2.059, 5: 2.326}
subgroups = [
[10.01, 10.03, 9.99, 10.02, 10.00],
[10.04, 10.00, 10.02, 10.01, 10.03],
[9.98, 10.01, 10.00, 10.02, 9.99],
]
n = len(subgroups[0])
r_bar = mean(max(group) - min(group) for group in subgroups)
sigma_within = r_bar / D2[n]
print(round(r_bar, 4))
print(round(sigma_within, 4))The code prints an average range of 0.04 and a within-subgroup standard deviation of about 0.0172.
Checks before using the estimate
The R-bar method assumes that subgroup sizes are consistent and that the measurements are reasonably independent within each subgroup. It also assumes that the process is stable. If a control chart shows special-cause signals, calculate and remove the cause before treating the process as predictable.
A changing measurement system can also inflate the range. Confirm that the gage has adequate resolution and repeatability.
If subgroup sizes vary, do not blindly use one \(d_2\) value. Use a method that handles unequal sizes, or create a consistent subgrouping plan. For larger subgroups, the average subgroup standard deviation is often preferred over ranges because ranges use only the two extreme observations.
How the estimate affects capability
Because Cp and Cpk divide by σ, a smaller estimated sigma produces larger capability indices. Underestimating within-subgroup variation can therefore make a process appear better than it is. Record the subgroup size, number of subgroups, average range, and \(d_2\) value with every capability study.
Exercise
Five subgroups each have a range of 0.06, and the subgroup size is five. Using d2 = 2.326, what is the estimated within-subgroup sigma?
Show answer
R-bar is 0.06, so sigma within = 0.06 / 2.326, or about 0.0258.