Krippendorff's alpha explained

Krippendorff's alpha coefficient,[1] named after academic Klaus Krippendorff, is a statistical measure of the agreement achieved when coding a set of units of analysis. Since the 1970s, alpha has been used in content analysis where textual units are categorized by trained readers, in counseling and survey research where experts code open-ended interview data into analyzable terms, in psychological testing where alternative tests of the same phenomena need to be compared, or in observational studies where unstructured happenings are recorded for subsequent analysis.

Krippendorff's alpha generalizes several known statistics, often called measures of inter-coder agreement, inter-rater reliability, reliability of coding given sets of units (as distinct from unitizing) but it also distinguishes itself from statistics that are called reliability coefficients but are unsuitable to the particulars of coding data generated for subsequent analysis.

Krippendorff's alpha is applicable to any number of coders, each assigning one value to one unit of analysis, to incomplete (missing) data, to any number of values available for coding a variable, to binary, nominal, ordinal, interval, ratio, polar, and circular metrics (note that this is not a metric in the mathematical sense, but often the square of a mathematical metric, see levels of measurement), and it adjusts itself to small sample sizes of the reliability data. The virtue of a single coefficient with these variations is that computed reliabilities are comparable across any numbers of coders, values, different metrics, and unequal sample sizes.

Software for calculating Krippendorff's alpha is available.[2] [3] [4] [5] [6] [7] [8] [9] [10]

Reliability data

Reliability data are generated in a situation in which m ≥ 2 jointly instructed (e.g., by a code book) but independently working coders assign any one of a set of values 1,...,V to a common set of N units of analysis. In their canonical form, reliability data are tabulated in an m-by-N matrix containing N values vij that coder ci has assigned to unit uj. Define mj as the number of values assigned to unit j across all coders c. When data are incomplete, mj may be less than m. Reliability data require that values be pairable, i.e., mj ≥ 2. The total number of pairable values is

N
\sum
j=1

mj=

nmN.

To help clarify, here is what the canonical form looks like, in the abstract:

u1u2u3...uN
c1v11v12v13v1N
c2v21v22v23v2N
c3v31v32v33v3N
cmvm1vm2vm3vmN

General form of alpha

We denote by

R

the set of all possible responses an observer can give. The responses of all observers for an example is called a unit (it forms a multiset). We denote a multiset with these units as the items,

U

.

Alpha is given by:

\alpha=1-

Do
De
where

Do

is the disagreement observed and

De

is the disagreement expected by chance.

Do=

1
n

\sumc\sumk\delta(c,k)\sumumu

ncku
P(mu,2)

where

\delta

is a metric function (note that this is not a metric in the mathematical sense, but often the square of a mathematical metric, see below),

n

is the total number of pairable elements,

mu

is the number of items in a unit,

ncku

number of

(c,k)

pairs in unit

u

, and

P

is the permutation function. Rearranging terms, the sum can be interpreted in a conceptual way as the weighted average of the disagreements of the individual units---weighted by the number of coders assigned to unit j:

Do=

1
n
N
\sum
j=1

mjE(\deltaj)

where

E(\deltaj)

is the mean of the

mj\choose2

numbers

\delta(vij,vi'j)

(here

i>i'

and define pairable elements). Note that in the case

mj=m

for all

j

,

Do

is just the average all the numbers

\delta(vij,vi'j)

with

i>i'

. There is also an interpretation of

Do

as the (weighted) average observed distance from the diagonal.

De=

1
P(n,2)

\sumc\sumk\delta(c,k)Pck

where

Pck

is the number of ways the pair

(c,k)

can be made. This can be seen to be the average distance from the diagonal of all possible pairs of responses that could be derived from the multiset of all observations.

Pck=\begin{cases} c\nek&ncnk\\ c=k&nc(nc-1) \end{cases}

The above is equivalent to the usual form of

\alpha

once it has been simplified algebraically.[11]

One interpretation of Krippendorff's alpha is:

\alpha=1-

Dwithinunits
Dwithinandbetweenunits

\alpha=1

indicates perfect reliability

\alpha=0

indicates the complete absence of reliability. Units and the values assigned to them are statistically unrelated.

\alpha<0

when disagreements are systematic and exceed what can be expected by chance.

In this general form, disagreements Do and De may be conceptually transparent but are computationally inefficient. They can be simplified algebraically, especially when expressed in terms of the visually more instructive coincidence matrix representation of the reliability data.

Coincidence matrices

A coincidence matrix cross tabulates the n pairable values from the canonical form of the reliability data into a v-by-v square matrix, where v is the number of values available in a variable. Unlike contingency matrices, familiar in association and correlation statistics, which tabulate pairs of values (cross tabulation), a coincidence matrix tabulates all pairable values. A coincidence matrix omits references to coders and is symmetrical around its diagonal, which contains all perfect matches, viu = vi'u for two coders i and i' , across all units u. The matrix of observed coincidences contains frequencies:

\begin{align} ovv'&=

N
\sum
u=1
m
\sumI(viu=v)I(vi'u=v')
i\nei'
mu-1

=ov'v,\\[5pt] nv&=

V
\sum
\ell=1

ov\ell=

m,N
\sum
vij

I(vij=v)andn=

V
\sum
\ell=1,p=1

o\ell, \end{align}

omitting unpaired values, where I(∘) = 1 if is true, and 0 otherwise.

Because a coincidence matrix tabulates all pairable values and its contents sum to the total n, when four or more coders are involved, ock may be fractions.

The matrix of expected coincidences contains frequencies:

evv'=

m
\sumI(viu=v)I(vi'u=v')
i\nei'
n-1

=

1
n-1

\left.\begin{cases} nv(nv-1)&ifv=v'\\ nvnv'&ifv\nev' \end{cases}\right\} =ekc,

which sum to the same nc, nk, and n as does ock. In terms of these coincidences, Krippendorff's alpha becomes:

\alpha=1-

Do
De

=1-

V
\sumovv'\delta(v,v')
v=1,v'=1
V
\sum
v=1,v'=1
evv'\delta(v,v')

.

Difference functions

Difference functions

\delta(v,v')

[12] between values v and v' reflect the metric properties (levels of measurement) of their variable.

In general:

\begin{align} \delta(v,v')&\ge0\\[4pt] \delta(v,v)&=0\\[4pt] \delta(v,v')&=\delta(v',v) \end{align}

In particular:

For nominal data

\deltanominal(v,v')= \begin{cases} 0&ifv=v'\\ 1&ifv\nev' \end{cases}

, where v and v' serve as names.

For ordinal data

\deltaordinal(v,v')=\left(

g=v'
\sum
g=v

ng-

nv+nv'
2

\right)2

, where v and v′ are ranks.

For interval data

\deltainterval(v,v')=(v-v')2

, where v and v′ are interval scale values.

For ratio data

\deltaratio(v,v')=\left(

v-v'
v+v'

\right)2

, where v and v′ are absolute values.

For polar data

\deltapolar(v,v')=

(v-v')2
(v+v'-2vmin)(2vmax-v-v')

, where vmin and vmax define the end points of the polar scale.

For circular data

\deltacircular(v,v')=\left(\sin\left[180

v-v'
U

\right]\right)2

, where the sine function is expressed in degrees and U is the circumference or the range of values in a circle or loop before they repeat. For equal interval circular metrics, the smallest and largest integer values of this metric are adjacent to each other and U = vlargest – vsmallest + 1.

Significance

Inasmuch as mathematical statements of the statistical distribution of alpha are always only approximations, it is preferable to obtain alpha’s distribution by bootstrapping.[13] [14] Alpha's distribution gives rise to two indices:

The minimum acceptable alpha coefficient should be chosen according to the importance of the conclusions to be drawn from imperfect data. When the costs of mistaken conclusions are high, the minimum alpha needs to be set high as well. In the absence of knowledge of the risks of drawing false conclusions from unreliable data, social scientists commonly rely on data with reliabilities α ≥ 0.800, consider data with 0.800 > α ≥ 0.667 only to draw tentative conclusions, and discard data whose agreement measures α < 0.667.[15]

A computational example

Let the canonical form of reliability data be a 3-coder-by-15 unit matrix with 45 cells:

Units u:123456789101112131415
Coder A341211333
Coder B1213343
Coder C21344211334

Suppose “*” indicates a default category like “cannot code,” “no answer,” or “lacking an observation.” Then, * provides no information about the reliability of data in the four values that matter. Note that unit 2 and 14 contains no information and unit 1 contains only one value, which is not pairable within that unit. Thus, these reliability data consist not of mN = 45 but of n = 26 pairable values, not in N = 15 but in 12 multiply coded units.

The coincidence matrix for these data would be constructed as follows:

o11 = : \frac + : \frac + : \frac =6

o13 = : \frac =1= o31

o22 = : \frac + : \frac =4

o33 = : \frac + : \frac + : \frac + : \frac =7

o34 = : \frac + : \frac =2= o43

o44 = : \frac =3

Values v or v′:1234nv
Value 1617
Value 244
Value 317210
Value 4235
Frequency nv'7410526

In terms of the entries in this coincidence matrix, Krippendorff's alpha may be calculated from:

\alphametric=1-

Do
De

=1-

V
\sumovv'\deltametric(v,v')
v=1,v'=1
1
V
\sum
v=1,v'=1
nvnv'~\deltametric(v,v')
n-1

.

For convenience, because products with

\delta(v,v)=0

and

\delta(v,v')=\delta(v',v)

, only the entries in one of the off-diagonal triangles of the coincidence matrix are listed in the following:

\alphametric=1-

1\deltametric(1,3)+2\deltametric(3,4)
1(4 ⋅ 7\deltametric(1,2)+10 ⋅ 7\deltametric(1,3)+5 ⋅ 7\deltametric(1,4)+10 ⋅ 4\deltametric(2,3)+5 ⋅ 4\deltametric(2,4)+5 ⋅ 10\deltametric(3,4))
26-1

Considering that all

\deltanominal(v,v')=1

when

v{\ne}v'

for nominal data the above expression yields:

\alphanominal=1-

1+2
1(4 ⋅ 7+10 ⋅ 7+5 ⋅ 7+10 ⋅ 4+5 ⋅ 4+5 ⋅ 10)
26-1

=0.691

With

\deltainterval(1,2)=\deltainterval(2,3)=\deltainterval(3,4)=12,    \deltainterval(1,3)=

2,
\delta
interval(2,4)=2

and

2,
\delta
interval(1,4)=3
for interval data the above expression yields:

\alphainterval=1-

1 ⋅ 22+2 ⋅ 12
1(4 ⋅ 7 ⋅ 12+10 ⋅ 7 ⋅ 22+5 ⋅ 7 ⋅ 32+10 ⋅ 4 ⋅ 12+5 ⋅ 4 ⋅ 22+5 ⋅ 10 ⋅ 12)
26-1

=0.811

Here,

\alphainterval>\alphanominal

because disagreements happens to occur largely among neighboring values, visualized by occurring closer to the diagonal of the coincidence matrix, a condition that

\alphainterval

takes into account but

\alphanominal

does not. When the observed frequencies ovv are on the average proportional to the expected frequencies ev ≠ v',

\alphainterval=\alphanominal

.

Comparing alpha coefficients across different metrics can provide clues to how coders conceptualize the metric of a variable.

Alpha's embrace of other statistics

Krippendorff's alpha brings several known statistics under a common umbrella, each of them has its own limitations but no additional virtues.

\textP_o = \sum_c \frac,\textP_e = \sum_c \frac. When data are nominal, alpha reduces to a form resembling Scott's pi: _\text\alpha = 1 - \frac= \frac= \frac Scott's observed proportion of agreement

Po

appears in alpha’s numerator, exactly. Scott's expected proportion of agreement, P_e = \sum_c \frac is asymptotically approximated by \sum_c \frac when the sample size n is large, equal when infinite. It follows that Scott's pi is that special case of alpha in which two coders generate a very large sample of nominal data. For finite sample sizes:

{nominal\alpha}=1-\tfrac{n-1}{n}(1-\pi)\ge\pi

. Evidently, \lim_ = \pi.

\text\bar P= \frac \sum_^N \sum_c \frac = \sum_c \frac,\text\bar P_e = \sum_c \frac When sample sizes are finite, K can be seen to perpetrate the inconsistency of obtaining the proportion of observed agreements \bar P by counting matches within the m(m − 1) possible pairs of values within u, properly excluding values paired with themselves, while the proportion

\barPe

is obtained by counting matches within all (mN)2 = n2 possible pairs of values, effectively including values paired with themselves. It is the latter that introduces a bias into the coefficient. However, just as for pi, when sample sizes become very large this bias disappears and the proportion \sum_c \frac in nominalα above asymptotically approximates

\barPe

in K. Nevertheless, Fleiss' kappa, or rather K, intersects with alpha in that special situation in which a fixed number of m coders code all of N units (no data are missing), using nominal categories, and the sample size n = mN is very large, theoretically infinite.

\rho

's numerator \sum D^2=ND_o and

\rho

's denominator \frac= \frac ND_e, where n = 2N, which becomes

NDe

when sample sizes become large. So, Spearman's rho is that special case of alpha in which two coders rank a very large set of units. Again,

{ordinal\alpha}\ge\rho

and \lim_ = \rho.

{interval\alpha}\gerii

and \lim_ = r_.

Krippendorff's alpha is more general than any of these special purpose coefficients. It adjusts to varying sample sizes and affords comparisons across a wide variety of reliability data, mostly ignored by the familiar measures.

Coefficients incompatible with alpha and the reliability of coding

Semantically, reliability is the ability to rely on something, here on coded data for subsequent analysis. When a sufficiently large number of coders agree perfectly on what they have read or observed, relying on their descriptions is a safe bet. Judgments of this kind hinge on the number of coders duplicating the process and how representative the coded units are of the population of interest. Problems of interpretation arise when agreement is less than perfect, especially when reliability is absent.

Naming a statistic as one of agreement, reproducibility, or reliability does not make it a valid index of whether one can rely on coded data in subsequent decisions. Its mathematical structure must fit the process of coding units into a system of analyzable terms.

Notes

  1. Krippendorff, K. (2013) pp. 221–250 describes the mathematics of alpha and its use in content analysis since 1969.
  2. Hayes, A. F. & Krippendorff, K. (2007) describe and provide SPSS and SAS macros for computing alpha, its confidence limits and the probability of failing to reach a chosen minimum.
  3. https://cran.r-project.org/web/packages/irr/irr.pdf#page.16 Reference manual of the irr package containing the kripp.alpha function
  4. http://cswww.essex.ac.uk/Research/nle/arrau/alpha.html The Alpha resources page.
  5. http://www.mathworks.com/matlabcentral/fileexchange/36016-krippendorffs-alpha Matlab code to compute Krippendorff's alpha.
  6. https://github.com/grrrr/krippendorff-alpha Python code to compute Krippendorff's alpha.
  7. https://github.com/pln-fing-udelar/fast-krippendorff Python code for Krippendorff's alpha fast computation.
  8. https://ideas.repec.org/cgi-bin/htsearch?ul=%25%2Fc%2F%25&q=krippendorff+%2B+stata&cmd=Search%21&wf=4BFF&s=R&dt=range&db=&de=&m=all&fmt=long&sy=1&ps=10 Several user-written additions to the commercial software Stata are available.
  9. https://www.lighttag.io/blog/krippendorffs-alpha/ Open Source Python implementation supporting Dataframes
  10. Marzi . Giacomo . Balzano . Marco . Marchiori . Davide . 2024 . K-Alpha Calculator–Krippendorff's Alpha Calculator: A user-friendly tool for computing Krippendorff's Alpha inter-rater reliability coefficient . MethodsX . 12 . 102545 . 10.1016/j.mex.2023.102545 . 2215-0161. 10278/5046412 . free .
  11. Web site: Honour. David. Understanding Krippendorff's Alpha.
  12. Computing Krippendorff’s Alpha Reliability” http://repository.upenn.edu/asc_papers/43/
  13. Krippendorff, K. (2004) pp. 237–238
  14. Hayes, A. F. & Krippendorff, K. (2007) Answering the Call for a Standard Reliability Measure for Coding Data http://afhayes.com/public/cmm2007.pdf
  15. Krippendorff, K. (2004) pp. 241–243
  16. Scott, W. A. (1955)
  17. Fleiss, J. L. (1971)
  18. Cohen, J. (1960)
  19. Siegel, S. & Castellan, N. J. (1988), pp. 284–291.
  20. Spearman, C. E. (1904)
  21. Pearson, K. (1901), Tildesley, M. L. (1921)
  22. Krippendorff, K. (1970)
  23. Cohen, J. (1960)
  24. Krippendorff, K. (1978) raised this issue with Joseph Fleiss
  25. Zwick, R. (1988), Brennan, R. L. & Prediger, D. J. (1981), Krippendorff (1978, 2004).
  26. Nunnally, J. C. & Bernstein, I. H. (1994)
  27. Cronbach, L. J. (1951)
  28. Bennett, E. M., Alpert, R. & Goldstein, A. C. (1954)
  29. Goodman, L. A. & Kruskal, W. H. (1954) p. 758
  30. Lin, L. I. (1989)

References

External links