Quality

Attribute Agreement Analysis (Kappa)

Compare two inspectors' pass/fail judgments with each other and with a reference, and read how far their agreement is above chance. Every value is entered by you; the tool adds no data of its own.

01Inputs

Paste one part per line as CSV with the header Part,A1,A2,B1,B2, or Part,Ref,A1,A2,B1,B2 when a reference judgment exists: A and B are the two inspectors, 1 and 2 their two trials. Judgments are P or F (pass, fail, 1, 0, OK, NG, accept and reject are also understood). 10 to 200 parts.

02Result

03Method

Use this tool after two inspectors have each judged the same set of parts twice, without knowing which part is which, and, if possible, a reference judgment for each part has been made with better equipment or by a senior engineer. It is the pass/fail counterpart of a Gage R&R study: it asks whether an inspector repeats their own judgment, whether the two inspectors agree with each other, and whether they agree with the truth.

AHow it is calculated

The tool compares the judgments of the same parts in four ways. With n parts, two trials per inspector and, if given, a reference judgment for each part:

  1. Within-inspector agreement is the share of parts where the inspector's two judgments agree.
  2. Both trials match reference is the share of parts where both of the inspector's judgments equal the reference.
  3. All four agree is the share of parts where A1 = A2 = B1 = B2; all four agree and match reference also requires the judgments to equal the reference.
  4. Cohen's kappa is computed over the 2n paired judgments. A vs B pairs A's judgments with B's trial by trial; A vs reference pairs A's 2n judgments with the reference repeated twice, and B vs reference likewise.
pₒ = share of pairs that agree; pₑ = Σ over {P, F} of (share of the category on side 1 × share on side 2)
κ = (pₒ − pₑ)/(1 − pₑ)
  1. κ is undefined when pₑ = 1, that is when every judgment on both sides is the same category.
  2. Fails called pass counts the 4n judgments that read P where the reference is F; passes called fail counts the reverse.

The default data is the worked example from the Measurement system analysis guide: 30 parts, 8 reference fails; A repeats on 29 of 30 parts (96.7 %), B on 27 of 30 (90.0 %); all four judgments agree on 26 of 30 (86.7 %); A and B agree on 56 of their 60 paired judgments, pₒ = 0.933, pₑ = 0.642, κ = 0.81; against the reference κ = 0.96 for A and 0.86 for B; 4 judgments call a fail pass and none calls a pass fail.

BScope and limitations
  • Two inspectors, two trials, two categories. More inspectors (Fleiss' kappa), more trials or more categories are not supported; split a larger study into pairs, or run the multi-rater statistic elsewhere.
  • Kappa depends on the mix of parts. With few fails in the set, chance agreement is high and κ is low even for good inspectors; a study set should contain enough fails, and borderline parts, to exercise the judgment. Attribute agreement study design shows how far kappa moves with the share of fails.
  • The reference is treated as true. If it was made by the same method the inspectors use, "against the reference" measures agreement with a third inspector, not accuracy.
  • Kappa says nothing about the direction of the disagreements. A fail called pass ships a defect; a pass called fail costs a rework. The two counts are reported separately because the fix is different.
  • The guidance most engineers quote treats kappa above 0.75 as good agreement and below 0.40 as poor, with an effectiveness (judgments matching the reference) of 90 % or more expected of an acceptable inspector; treat these as guidance, not limits.
  • The study design, what each number means and what to do with a low one are in the Measurement system analysis guide; the Gage R&R after calibration guide covers the variables-gauge counterpart.
CCommon mistakes
  1. Reporting percent agreement without kappa. When most parts pass, two inspectors who pass everything agree with each other every time; kappa removes the agreement that chance alone would produce.
  2. Letting the inspectors see the reference, or each other's judgments, or the part labels. The study measures what they do unaided; any of these makes the agreement look better than it is.
  3. Using the production reject rate for the study set. A set with 3 fails in 30 cannot show whether fails are caught; load the set with fails and borderline parts, then weigh the result against the production mix.
  4. Reading kappa to two decimals as a difference. κ = 0.81 from 30 parts has a wide uncertainty; a second study at 0.78 is not evidence of a change, and two close values are not proof of the same performance either, until the study size, the mix of parts and the uncertainty are considered. Attribute agreement study design puts an approximate interval around kappa and sizes the study.
  5. Treating "both match the reference" as the whole story. An inspector can match the reference on 96.7 % of parts and still pass a fail; look at the direction counts.
  6. Pasting trials in the wrong columns. A1 and A2 are the same inspector's two looks at every part; if a column is another inspector's, the within-inspector figure is meaningless.

Further reading

  • Cohen, J. (1960), A coefficient of agreement for nominal scales, Educational and Psychological Measurement 20, 37–46: the definition of kappa used here.
  • NIST/SEMATECH e-Handbook of Statistical Methods, Chapter 2, Measurement Process Characterization: gauge studies and check standards, free online.
  • AIAG Measurement Systems Analysis (MSA) Reference Manual — attribute measurement systems study; referenced by name, not reproduced here.