Sub topic 9
Interpreting kappa values
This chapter assumes you can compute Cohen's kappa for two annotators, as in the previous chapter. The question here is what to do with the number. A kappa of 0.68 does not tell you whether a dataset is good enough. That depends on the task, the cost of label noise, and how much data the kappa was computed from.
What a kappa value says
Kappa is the share of the possible above-chance agreement that the annotators actually achieved:
- 1 means perfect agreement.
- 0 means agreement no better than chance, given each annotator's label frequencies.
- Negative values mean agreement worse than chance. This usually points to a systematic problem, such as one annotator reading the label scheme backwards.
In the running example, observed agreement is 0.8 and chance agreement is 0.38, so kappa is about 0.677. Annotators matched on 80% of items, but 38% would have matched by luck alone, so kappa credits them with about two thirds of the remaining agreement.
Common interpretation scales
Several scales map kappa to verbal labels. None is a law. They are conventions, and they disagree with each other.
| Kappa | Landis and Koch (1977) | McHugh (2012) |
|---|---|---|
| below 0 | poor | none |
| 0.00 to 0.20 | slight | none |
| 0.21 to 0.39 | fair | minimal |
| 0.40 to 0.59 | moderate | weak |
| 0.60 to 0.79 | substantial | moderate |
| 0.80 to 0.90 | almost perfect | strong |
| above 0.90 | almost perfect | almost perfect |
(Landis and Koch's own boundaries fall at 0.20, 0.40, 0.60 and 0.80. The row at 0.21 to 0.39 simply merges their "fair" band with McHugh's cut at 0.39.)
The same 0.68 is "substantial" on one scale and "moderate" on another. Name the scale you use, or report the number alone.
Computational linguistics has its own rule of thumb. Krippendorff suggests that reliability of 0.80 or higher is good enough for firm conclusions, and that values from 0.67 to 0.80 allow only tentative ones. Many NLP papers adopt 0.80 as a target for kappa as well, and treat 0.67 as the floor.
Thresholds depend on the task
A fixed threshold ignores how hard the task is. Reasonable expectations differ:
- Surface-level tasks. Language identification or spam detection should reach 0.8 or more. Lower values suggest unclear guidelines.
- Subjective tasks. Sarcasm, offensiveness, and emotion often reach only 0.4 to 0.6 even with good guidelines and trained annotators. A kappa of 0.5 can be the ceiling for such a task. It does not mean the project failed.
- Many labels. Fine-grained schemes with 20 or more classes usually score lower than coarse ones, because more labels give more ways to disagree.
Decide the target before the pilot round. Setting it afterwards tempts you to pick a scale that fits the result you got.
The same agreement can give different kappa
Kappa depends on label prevalence. Two annotators can agree on 92% of items and still get a low kappa when one class dominates.
| Item pairs (100 items) | Annotator 2: pos | Annotator 2: neg |
|---|---|---|
| Annotator 1: pos | 2 | 4 |
| Annotator 1: neg | 4 | 90 |
Observed agreement is 0.92. Each annotator labels 94% of items negative, so chance agreement is 0.06 × 0.06 + 0.94 × 0.94 = 0.8872. Kappa is (0.92 − 0.8872) / (1 − 0.8872), about 0.29. Percent agreement looks excellent, and kappa calls the result "fair". Both are accurate. Almost all the agreement comes from the easy negative class, and the annotators agree on only 2 of the 10 items that either one marked positive.
When prevalence is skewed, report kappa together with the confusion matrix and per-class agreement. Do not rely on a single number.
Kappa is an estimate, so give an interval
A kappa computed from 10 items has very wide uncertainty. Changing a single label can move it by 0.1 or more. A bootstrap shows how much the value would vary if you had drawn a different sample of items.
import random
from collections import Counter
def cohen_kappa(a, b):
n = len(a)
p_o = sum(x == y for x, y in zip(a, b)) / n
count_a, count_b = Counter(a), Counter(b)
p_e = sum(count_a[l] * count_b[l] for l in set(a) | set(b)) / n ** 2
if p_e == 1: # both annotators used one identical label: kappa undefined
return None
return (p_o - p_e) / (1 - p_e)
def bootstrap_ci(a, b, reps=2000, seed=0):
rng = random.Random(seed)
n = len(a)
scores = []
for _ in range(reps):
idx = [rng.randrange(n) for _ in range(n)]
k = cohen_kappa([a[i] for i in idx], [b[i] for i in idx])
if k is not None:
scores.append(k)
scores.sort()
lo = scores[int(0.025 * len(scores))]
hi = scores[int(0.975 * len(scores)) - 1]
return lo, hi
ann1 = ["pos", "pos", "neg", "neg", "pos", "neu", "neg", "pos", "neu", "neg"]
ann2 = ["pos", "neg", "neg", "neg", "pos", "neu", "neg", "pos", "pos", "neg"]
print(round(cohen_kappa(ann1, ann2), 3))
low, high = bootstrap_ci(ann1, ann2)
print(round(low, 2), round(high, 2))The point estimate is 0.677, but the 95% interval from 10 items is very wide. It can span "fair" to "almost perfect" on the scales above. The None check matters. A resample can contain only one label for both annotators, which makes chance agreement 1 and kappa a division by zero.
Pilot rounds are often small, so treat their kappa as a rough signal for fixing guidelines. For a final quality claim, use a few hundred items, or more for rare classes.
A decision flow
The flow below turns a kappa value into a next step. Check the sample size and prevalence before you read the value.
Common mistakes
- Comparing kappa across datasets as if it were a score. A 0.6 on a hard, skewed task is not worse than a 0.7 on an easy balanced one.
- Treating the scale label as a verdict. "Substantial" is a convention and does not mean the data is usable for your purpose.
- Ignoring annotator bias. If one annotator uses "pos" far more often than the other, kappa rises relative to a case with identical marginals. Check the marginals in the confusion matrix.
- Chasing a number. Telling annotators to agree more, or merging labels until kappa rises, raises the score and can destroy useful distinctions. Raise agreement by clarifying guidelines, not by shrinking the schema without a reason.
- Reporting kappa alone. Include the number of items, annotators, and labels, the label distribution, and the interval.
Practical checklist
- State which scale or target you use and why.
- Compute kappa on enough items, and give a bootstrap interval.
- Print the confusion matrix and label distribution next to the score.
- Compare observed agreement with kappa. A large gap signals a prevalence problem.
- Use the confusion matrix to decide what to change, which leads into the disagreement analysis chapter.
Exercise
Two annotators label 200 tweets as "toxic" or "ok". They agree on 190 tweets, and each labels 95% of tweets "ok". Observed agreement is 0.95. Chance agreement is 0.95 × 0.95 + 0.05 × 0.05 = 0.905. What is kappa, and what does the gap between 0.95 and your answer tell you?
Show answer
Kappa = (0.95 − 0.905) / (1 − 0.905) = 0.045 / 0.095, about 0.47. The 95% raw agreement looks excellent, but 90.5% would be expected by chance because "ok" dominates. Kappa is only "moderate" on the Landis and Koch scale, which shows that prevalence strongly affects it. You should report the confusion matrix and per-class agreement on "toxic", and not rely on either number alone.
Exercise
A pilot of 12 items gives kappa 0.72. The project target was 0.80. Should you start full annotation, revise the guidelines, or collect more pilot data first? Give a reason.
Show answer
Collect more pilot data first, and inspect the confusion matrix. With 12 items, one changed label can shift kappa by 0.1 or more, so the interval almost certainly includes values both below and above 0.80. A larger pilot gives a usable estimate, and the confusion matrix shows whether specific label pairs need clearer guidelines.