Inter-Annotator Agreement › Worked Example
Language AI HandbookAll chapters Inter-Annotator Agreement › Worked ExampleOne section · Sections in this chapter6 / 11 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Let's calculate all three metrics on a concrete example. Suppose three annotators (A, B, C) label 10 sentences for sentiment: Positive (P), Neutral (N), or Negative (G).
| Item | A | B | C |
|---|---|---|---|
| 1 | P | P | P |
| 2 | P | P | N |
| 3 | N | N | N |
| 4 | P | P | P |
| 5 | N | P | N |
| 6 | G | G | G |
| 7 | P | N | P |
| 8 | N | N | N |
| 9 | P | P | P |
| 10 | G | P | G |
Six items (1, 3, 4, 6, 8, 9) are unanimously agreed upon. The four disagreement items (2, 5, 7, 10) each have a 2-1 split, with different categories causing trouble in each case.
Cohen's Kappa (A vs B)
First, construct the agreement matrix between A and B:
| B:P | B:N | B:G | |
|---|---|---|---|
| A:P | 4 | 1 | 0 |
| A:N | 1 | 2 | 0 |
| A:G | 1 | 0 | 1 |
Observed agreement:
Row marginals for A: , , Column marginals for B: , ,
Expected agreement:
Cohen's kappa:
This falls in the "moderate" range. Notice that A uses "Negative" 20% of the time while B uses it only 10% of the time. This rater-level difference in base rates is exactly what Cohen's kappa captures through separate marginals.
Fleiss' Kappa (All Three)
For Fleiss' kappa, we calculate for each item:
- Item 1 (P,P,P):
- Item 2 (P,P,N):
-
Item 3 (N,N,N):
-
Item 4 (P,P,P):
-
Item 5 (N,P,N):
-
Item 6 (G,G,G):
-
Item 7 (P,N,P):
-
Item 8 (N,N,N):
-
Item 9 (P,P,P):
-
Item 10 (G,P,G):
Mean observed agreement:
Category proportions (total assignments = 10 items 3 raters = 30):
Expected agreement:
Fleiss' kappa:
Krippendorff's Alpha
For nominal data with 3 raters per item, we build the coincidence matrix. Each item contributes ordered pairs of ratings, one per ordered pair of raters.
Item 5: A(N), B(P), C(N). Ordered pairs: -, -, -, -, -, -. This contributes , , .
Counting all contributions:
- : Items 1(6), 2(2), 4(6), 7(2), 9(6)
- : Items 3(6), 5(2), 8(6)
- : Items 6(6), 10(2)
- : Items 2(2), 5(2), 7(2) each
- : Item 10(2) each
- : None
Total: (which matches ordered pairs).
Observed disagreement:
Expected disagreement:
Alpha:
For this case with complete data and nominal categories, Fleiss' kappa and Krippendorff's alpha give the same value (0.563), as theory predicts. Cohen's kappa between specific rater pairs varies. The A vs B pair showed ; A vs C and B vs C would produce different values because each pair has different marginal distributions.