Measurement system analysis

MSA 6: Attribute agreement analysis with kappa, with example

TL;DR
  • MSA 6 assesses pass/fail ratings by appraisers, for example in visual inspection.
  • At least 50 reference parts with about one quarter borderline parts, 3 appraisers, 3 trials each.
  • Kappa above 0.75 counts as good; effectiveness ≥ 90 %, miss rate ≤ 2 % and false alarm rate ≤ 5 % also count.

About 8 min read

Contents

What this is about

Not everything is measured. Scratches on a painted surface, a burr on an edge, whether a connector clicks into place, whether a gage passes: here there is no result in millimetres, only a rating, usually OK or not OK. Such inspections can also be unreliable. One appraiser sees a scratch, the other does not; in the morning you judge differently than after an eight-hour shift.

MSA 6 checks how reliable such ratings are. Several appraisers rate the same parts several times without knowing which part they have in front of them. For each part the correct rating has been fixed beforehand. Afterwards three questions can be answered: does each appraiser rate the same way on repetition? Do the appraisers agree with each other? And do they rate correctly?

Rule of thumb: two errors are possible. A bad part passes as good (miss, the customer notices), or a good part is rejected (false alarm, that costs money). The first is usually the worse one.

The terms in plain words

Attribute
The result is a category, not a number. Here two categories: OK and not OK.
Reference rating
The correct rating for each part, fixed in advance, for example by an accurate measurement or a panel of experts with boundary samples.
Borderline part
A part close to the boundary between good and bad. This is where you see whether an inspection criterion is unambiguous.
Agreement
How often two ratings are the same. Easy to understand, but deceptive: if almost all parts are good, even two appraisers who roll dice will often agree.
Kappa κ
The agreement, adjusted for the share that would be expected by chance anyway. κ = 1 means perfect agreement, κ = 0 no better than chance.
Miss rate
Share of ratings in which a bad part was rated OK.
False alarm rate
Share of ratings in which a good part was rated not OK.
Effectiveness
Share of all ratings that agree with the reference.

Purpose

MSA 6 shows whether the appraisers of an attribute inspection rate consistently and correctly: within themselves on repetition, between each other and against a reference. The miss rate and the false alarm rate follow from this. The AIAG MSA manual (4th edition) calls it attribute agreement analysis.

If measured reference values exist for the parts, for example in go/no-go gaging, MSA 7 also shows how wide the uncertain zone at the limit is. For automatic gages without a human appraiser there is MSA 7A.

How it works

  1. Choose at least 50 parts with a known reference rating, from measurement or a boundary samples catalogue. Every defect type should occur. About one third should be bad parts and about one quarter borderline parts, because hardly anyone gets clear-cut parts wrong.
  2. Code the parts covertly, for example with a code on the underside that only the study leader knows.
  3. 3 appraisers rate every part 3 times, under production conditions: same lighting, same time per part. Reshuffle the parts for every trial, and the appraisers do not see their earlier ratings.
  4. Calculate: kappa for each appraiser within, between the appraisers and against the reference; plus effectiveness, miss rate and false alarm rate.
  5. Assess according to AIAG: kappa above 0.75 good, below 0.40 poor. Acceptable are effectiveness from 90 %, miss rate up to 2 % and false alarm rate up to 5 %; conditionally acceptable 80 %, 5 % and 10 %. For safety-relevant characteristics many customers require a 0 % miss rate.

Worked example, step by step

Three appraisers A, B and C visually inspect the surface of 50 covers, each part three times by each appraiser. 17 of them are bad parts and 12 borderline parts. That gives 3 · 3 · 50 = 450 ratings. The ratings are artificial and available below as CSV.

ReferenceA1A2A3B1B2B3C1C2C3Bad parts (not OK)Good parts (OK)OKnot OKbold outline: differs from the reference
Figure 1: All 450 ratings. The deviations from the reference cluster at the borderline parts.

Step 1: why not simply count?

You could simply count how often the appraisers agree. The problem: part of the agreement arises without any skill. Suppose two appraisers toss a coin that shows “good” 90 % of the time. Then both say “good” in 0.9 · 0.9 = 81 % of cases and “bad” in 0.1 · 0.1 = 1 %, so they agree in 82 % of cases, although they did not look at the parts at all. Kappa subtracts this chance share.

κ=observed agreement−chance agreement1−chance agreement
How much of the possible distance from chance was achieved?

Step 2: observed agreement p₀

We calculate kappa between all appraisers. Each part has 9 ratings. For each part, count how many of the possible pairs of ratings agree. With 9 ratings there are 9 · 8 = 72 ordered pairs. If a part has 7 OK and 2 not OK, 7 · 6 + 2 · 1 = 44 pairs agree, which is 44 / 72 = 0.611. In general: (nOK² + nNOK² − 9) / 72. In the example there are only a few different splits:

OK / not OKNumber of partsAgreement per partNumber · agreement
9 / 024(9² + 0² − 9) / 72 = 1.00024.000
8 / 15(8² + 1² − 9) / 72 = 0.7783.889
7 / 23(7² + 2² − 9) / 72 = 0.6111.833
6 / 31(6² + 3² − 9) / 72 = 0.5000.500
2 / 72(2² + 7² − 9) / 72 = 0.6111.222
1 / 82(1² + 8² − 9) / 72 = 0.7781.556
0 / 913(0² + 9² − 9) / 72 = 1.00013.000
Sum5046.000
p0=46.00050=0.920
mean observed agreement

Step 3: chance agreement pₑ

Of all 450 ratings, 289 are OK, a share of q = 289 / 450 = 0.642. If the appraisers rated randomly with these shares, two ratings would agree with this probability:

pe=q2+(1−q)2=0.6422+0.3582=0.412+0.128=0.540
agreement expected by chance

Step 4: kappa

κ=p0−pe1−pe=0.920−0.5401−0.540=0.3800.460=0.826
kappa between appraisers

The other kappa values are obtained the same way: for each appraiser from their own three ratings per part, and against the reference from their ratings together with the reference rating. The AIAG manual uses Cohen’s kappa for pairs; the values can differ slightly.

0.50.60.70.80.91.0Appraiser A, within0.879Appraiser B, within0.828Appraiser C, within0.774Between appraisers0.826Appraiser A vs. reference0.940Appraiser B vs. reference0.913Appraiser C vs. reference0.856All vs. reference0.9030.75 good (AIAG)
Figure 2: Kappa per comparison. Even the smallest kappa (0.774, Appraiser C, within) lies above 0.75.
InteractiveTry it: same agreement, different kappa

This chart needs JavaScript.

The rarer bad parts are in the lot, the more agreement arises by chance and the smaller kappa becomes. That is why the reference lot needs enough bad and borderline parts.

Step 5: miss rate, false alarm rate and effectiveness

These numbers are simpler; you just count. Each appraiser rated 17 bad parts three times each, i.e. 51 ratings of bad parts, and 33 good parts three times each, i.e. 99 ratings of good parts. Appraiser A rated 3 bad-part ratings as OK: 3 / 51 = 5.9 % miss rate. Appraiser C rated 8 good-part ratings as not OK: 8 / 99 = 8.1 % false alarm rate.

Appraisersame on repetitionEffectivenessMiss rateFalse alarm rate
A92 %97.3 % acceptable3 / 51 = 5.9 % unacceptable1 / 99 = 1.0 % acceptable
B88 %96.0 % acceptable1 / 51 = 2.0 % acceptable5 / 99 = 5.1 % conditional
C84 %93.3 % acceptable2 / 51 = 3.9 % conditional8 / 99 = 8.1 % conditional

“Same on repetition” means: for how many parts the appraiser gave the same rating all three times.

InteractiveTry it: borderline parts and error rates

This chart needs JavaScript.

Start: the ratings of the example. The sliders change the share of borderline parts and the error rates. “New draw” repeats the study with the same settings: chance alone moves kappa noticeably.

What the result means

With values above 0.75 kappa looks good, yet according to AIAG the inspection is unacceptable: appraiser A lets 5.9 % of the bad parts pass, i.e. more than 5 %. Appraiser C rejects 8.1 % of the good parts. This shows why you should never look at kappa alone: kappa says whether the appraisers agree, not which kind of error they make.

Both errors cluster at the borderline parts, as figure 1 shows. This points to a vague criterion, not to poor appraisers: A is a little more lenient, C a little stricter, because nobody knows exactly where the limit lies. Remedies: provide boundary samples showing what is still good and what is already bad; define lighting and viewing distance; align the appraisers together on borderline parts. Then repeat the study.

Common mistakes

  • Too few bad and borderline parts. Then everyone almost always agrees, but nothing is known about the difficult cases. Kappa also becomes unreliable.
  • Appraisers recognize the parts. A notch or number is enough, and the repetition only shows memory.
  • Uncertain reference rating. If the reference itself is disputed, the study measures the dispute about the reference.
  • Only kappa assessed. Miss rate and false alarm rate always belong with it, because they have very different consequences.
  • Study under ideal conditions. Best light, plenty of time and full concentration give a result that does not hold in production.

In STATlum

Create an “MSA 6” study on the characteristic and choose the rating scale, parts, appraisers, trials and reference. The ratings form a matrix with one column per appraiser and trial. The evaluation shows all indices of this example with adjustable limits.

STATlum: ratings of an MSA 6 study
Ratings of an MSA 6 study: one row per part, one column per appraiser and trial.
STATlum: results of an MSA 6 study
Results of an example with many borderline parts: kappa too low and miss rate too high, with recommendations.

Frequently asked questions

Which kappa value is good?

In the AIAG manual above 0.75 counts as good, below 0.40 as poor. Some company guidelines require stricter values. Your customer’s requirement is binding.

Is a good kappa enough?

No. Kappa measures agreement, not the consequences of errors. The miss rate and false alarm rate against the reference always belong to it, as the example shows.

Why does the study need borderline parts?

Nearly everybody rates clear parts correctly. Only borderline parts show whether the criterion is clear. Without them the inspection looks better than it is.

What sample size is needed?

Commonly at least 50 parts with a known reference decision, about a third of them bad parts and about a quarter borderline parts, plus 3 appraisers with 3 trials each.

Kappa vs signal detection: what is the difference?

Kappa (MSA 6) rates how well the decisions agree: within appraisers, between them and with the reference. Signal detection (MSA 7) needs measured reference values and gives the width of the uncertain zone at the limit, and from it a %GRR as in a gage R&R.

Sources

This article explains the method. It does not replace the guideline that applies to your part or the professional assessment of an actual study.