Sub topic 2
Repeatability and reproducibility
This chapter assumes you know the mean, variance and standard deviation, and that you can read an ANOVA table. Gage R&R splits measurement error into two parts. Repeatability is the variation when one operator measures the same part several times with the same gage. Reproducibility is the variation when different operators measure the same part with the same gage.
Planning a crossed gage R&R study
In a crossed study, every operator measures every part, and each operator repeats each measurement a set number of times. A common plan uses 10 parts, 3 operators and 2 or 3 replicates. Randomize the measurement order so operators cannot recall earlier readings. Choose parts that span the real process range. A narrow sample hides part-to-part variation and makes the gage look worse than it is.
The average and range method
The average and range method estimates repeatability from the average range within each operator's readings. It estimates reproducibility from the spread of the operator averages. It is quick by hand, but it cannot separate operator-by-part interaction from repeatability. The ANOVA method handles that.
The ANOVA method and variance components
ANOVA splits the total sum of squares into parts, operators, their interaction, and repeat error. Mean squares convert these into variance components:
- Repeatability: varrep = MSrep
- Interaction: varint = (MSint - MS_rep) / r
- Operator: varoper = (MSoper - MS_int) / (p * r)
- Part: varpart = (MSpart - MS_int) / (o * r)
Here p is the number of parts, o the number of operators, and r the number of replicates. Negative estimates are set to zero. Reproducibility is varoper + varint, and gage R&R is repeatability plus reproducibility.
import numpy as np
def gage_rr_anova(x, tolerance=None):
"""Crossed gage R&R by the ANOVA method.
x has shape (parts, operators, replicates)."""
p, o, r = x.shape
grand = x.mean()
part = x.mean(axis=(1, 2))
oper = x.mean(axis=(0, 2))
cell = x.mean(axis=2)
ss_part = o * r * np.sum((part - grand) ** 2)
ss_oper = p * r * np.sum((oper - grand) ** 2)
ss_int = r * np.sum((cell - part[:, None] - oper[None, :] + grand) ** 2)
ss_rep = np.sum((x - cell[:, :, None]) ** 2)
ms_part = ss_part / (p - 1)
ms_oper = ss_oper / (o - 1)
ms_int = ss_int / ((p - 1) * (o - 1))
ms_rep = ss_rep / (p * o * (r - 1))
var_rep = ms_rep
var_int = max(0.0, (ms_int - ms_rep) / r)
var_oper = max(0.0, (ms_oper - ms_int) / (p * r))
var_part = max(0.0, (ms_part - ms_int) / (o * r))
var_repro = var_oper + var_int
var_grr = var_rep + var_repro
var_total = var_grr + var_part
sd_grr = np.sqrt(var_grr)
sd_part = np.sqrt(var_part)
out = {
"pct_contribution_grr": 100 * var_grr / var_total,
"pct_study_var_grr": 100 * np.sqrt(var_grr / var_total),
"ndc": int(np.floor(1.41 * sd_part / sd_grr)),
}
if tolerance is not None:
out["pct_tolerance_grr"] = 100 * 6 * sd_grr / tolerance
return out
rng = np.random.default_rng(1)
true_parts = rng.normal(10.0, 1.0, size=10)
bias_by_operator = np.array([0.0, 0.05, -0.05])
data = (true_parts[:, None, None]
+ bias_by_operator[None, :, None]
+ rng.normal(0, 0.1, size=(10, 3, 2)))
print(gage_rr_anova(data, tolerance=6.0))Computing %contribution, %study variation, %tolerance and ndc
The script returns four numbers that summarize the study:
- %contribution = 100 * varGRR / vartotal, the share of total variance caused by the gage.
- %study variation = 100 * sqrt(varGRR / vartotal).
- %tolerance = 100 6 sd_GRR / tolerance width. This needs a known specification width.
- ndc (number of distinct categories) = floor(1.41 * sdpart / sdGRR). Values of 5 or more are usually required.
| Metric | Acceptable | Marginal | Unacceptable |
|---|---|---|---|
| %study variation | under 10% | 10% to 30% | over 30% |
Exercise
The gage R&R variance is 0.04 and the total variance is 1.0. What are %contribution and %study variation?
Show answer
%contribution = 100 0.04 / 1.0 = 4%. %study variation = 100 sqrt(0.04) = 20%, which falls in the marginal range.