Okay, let's look at the best metrics for inter-annotator agreement when the values being annotated are numeric. This is different from categorical agreement (where you might use Cohen's Kappa).
For numeric data, agreement means the annotators' values are close to each other, not just that they pick the same category.
Here are the most common and appropriate metrics:
Intraclass Correlation Coefficient (ICC):
What it measures: This is often considered the gold standard for inter-rater reliability with continuous data. It quantifies the proportion of the total variance in the measurements that is attributable to the variability among the items being measured, rather than the variability among the annotators or random error. Essentially, how much variance in the scores is due to actual differences in the items vs. differences in the raters or random noise?
How it works: Based on an analysis of variance (ANOVA) framework. There are different models of ICC (e.g., ICC(1,1), ICC(2,1), ICC(3,k), etc.) depending on your study design (e.g., whether annotators are randomly selected or the only ones of interest, whether you're interested in the reliability of a single rater or the average of k raters). Choosing the right model is crucial.
Interpretation: Ranges from 0 to 1. Higher values indicate better agreement.
< 0.50: Poor reliability
0.50 - 0.75: Moderate reliability
0.75 - 0.90: Good reliability
0.90: Excellent reliability (these are rough guidelines, interpretation depends on the field).
Pros: Specifically designed for continuous data agreement. Can handle two or more annotators. Provides a single, standardized reliability coefficient. Accounts for both random error and systematic bias (depending on the model).
Cons: Can be confusing to choose the correct ICC model. Doesn't easily show where the disagreements occur (e.g., specific items or ranges). Doesn't show systematic bias visually.
Bland-Altman Plot (also known as Tukey Mean-Difference Plot):
What it measures: A graphical method to visualize the agreement between two different measurements or annotators. It plots the difference between the two annotators' scores against the average of their scores for each item.
How it works:
For each item, calculate the average of the two annotator scores: Average = (Score_A + Score_B) / 2.
For each item, calculate the difference between the two annotator scores: Difference = Score_A - Score_B (or vice versa).
Plot Difference on the Y-axis against Average on the X-axis.
Add horizontal lines representing the mean difference (indicating systematic bias) and the limits of agreement (typically mean difference ± 1.96 * standard deviation of the differences). These limits are expected to contain about 95% of the differences.
Interpretation:
If there's no systematic bias, the mean difference line should be close to zero.
The scatter of points around the mean difference line indicates the random error.
Points lying outside the limits of agreement show items where disagreement is larger than expected.
If the scatter of points gets wider as the average increases (or decreases), it indicates that the magnitude of disagreement depends on the value being measured (heteroscedasticity).
Pros: Excellent for visualization. Clearly shows systematic bias. Shows if the magnitude of disagreement varies across the range of measurements. Allows assessing if the level of disagreement is clinically or practically acceptable (based on the limits of agreement).
Cons: Primarily designed for comparing two annotators (can be adapted for multiple pairs, but less clean). Doesn't provide a single summary agreement statistic like ICC does.
Metrics Based on Differences (Mean Absolute Error - MAE, Root Mean Squared Error - RMSE):
What they measure: The average magnitude of the difference between annotator scores.
How they work (for two annotators):
For MAE: Calculate the absolute difference for each item, then average these absolute differences. MAE = (1/n) * Σ |Score_A_i - Score_B_i|
For RMSE: Calculate the difference for each item, square it, average the squared differences, and then take the square root. RMSE = sqrt[(1/n) * Σ (Score_A_i - Score_B_i)^2]
Interpretation: The result is in the units of your measurement. MAE tells you the average disagreement magnitude. RMSE penalizes larger errors more than MAE.
Pros: Simple to compute and understand. Provides a direct measure of the magnitude of disagreement in the original units. Useful for understanding the practical impact of disagreement.
Cons: Doesn't provide a standardized coefficient (hard to compare across different scales). Doesn't easily separate random error from systematic bias. Doesn't work directly for >2 annotators without pairwise comparisons or more complex formulations.
What it measures: The linear relationship between the two sets of scores. How well do the scores tend to go up or down together?
Pros: Easy to calculate and widely understood.
Cons:CRITICAL LIMITATION: Correlation measures association, not agreement. Two annotators could have perfect correlation (r=1) but disagree systematically (e.g., Annotator B's score is always 5 units higher than Annotator A's score). While a high correlation is necessary for good agreement, it is not sufficient and should not be used as the sole measure of inter-annotator agreement for numeric values.
Which are "Best"?
There's rarely one single "best" metric, but rather a set that provides a comprehensive view:
For overall reliability and a standardized coefficient:ICC is generally the preferred quantitative metric, especially if you have more than two annotators. Choose the appropriate ICC model based on your study design.
For visualizing agreement, bias, and disagreement across the range: The Bland-Altman Plot is invaluable, particularly for two annotators.
For understanding the practical magnitude of disagreement:MAE or RMSE can be useful, as they are in the original units.
Recommendation:
Use a combination. Calculate the ICC to get a standardized measure of overall reliability. If you have two annotators, create a Bland-Altman Plot to visualize bias and agreement limits. You might also report MAE or RMSE to give context to the typical magnitude of disagreement.
Avoid using correlation coefficients (like Pearson's r) alone as a measure of agreement, as they only assess association, not agreement on the actual values.
User
In my case, the numeric value is either correct or incorrect. I want to compare value 1 and value 2, where value 1 is a gold standard annotated value. I want to know if table 2 is accurate
Assistant
Okay, this changes things significantly! When you have a gold standard (Value 1) and you want to assess how accurate another set of values (Value 2) is compared to that gold standard, you are no longer strictly doing "inter-annotator agreement" in the traditional sense (comparing two potentially fallible annotators). You are performing an accuracy assessment or performance evaluation of Value 2 against the known truth (Value 1).
The "correct or incorrect" aspect further suggests you might be interested in whether the difference between Value 2 and Value 1 falls within an acceptable tolerance.
Here are the best metrics for this scenario:
Mean Absolute Error (MAE):
What it measures: The average magnitude of the error between Value 2 and the gold standard (Value 1).
How it works: Calculate the absolute difference between Value 2 and Value 1 for each item, and then average these absolute differences. MAE = (1/n) * Σ |Value2_i - Value1_i|
Interpretation: Gives you the typical size of the error in the original units of your numeric value. A lower MAE indicates higher accuracy.
Root Mean Squared Error (RMSE):
What it measures: Similar to MAE, but it penalizes larger errors more heavily because the differences are squared before averaging.
How it works: Calculate the difference between Value 2 and Value 1 for each item, square these differences, average the squared differences, and then take the square root. RMSE = sqrt[(1/n) * Σ (Value2_i - Value1_i)^2]
Interpretation: Also in the original units. Often slightly higher than MAE if there are some larger errors. A lower RMSE indicates higher accuracy.
Percentage Correct (based on a defined tolerance):
What it measures: The proportion of items where Value 2 is considered "correct" relative to Value 1, based on a specific acceptable difference.
How it works:You need to define what "correct" means. For example, is Value 2 correct if it's within +/- 0.5 of Value 1? Or within +/- 10%? Once you have this tolerance (T), you iterate through each item and check if |Value2_i - Value1_i| <= T (for absolute tolerance) or |Value2_i - Value1_i| / Value1_i <= T_percentage (for percentage tolerance). Then calculate the percentage of items that satisfy this condition.
User
You don't understand. If value 2 (pred) = value 1 (true value) then I want to count 1 (true). If pred is not the same as true value, I want to count it as 0 (false). It's a binary. I want a confusion matrix. And common metrics: F1, precision, etc
Assistant
Okay, I understand completely now. You're not interested in the magnitude of difference, or typical inter-annotator reliability for continuous values. You have a very specific, strict definition of "correct": Value 2 MUST be exactly equal to Value 1. If it is, that's a success (1). If it's not, that's a failure (0).
This transforms your numeric comparison problem into a binary classification problem for each instance.
For each item:
True Label: Is Value2 equal to Value1? (Conceptually: Yes/No)
Predicted Label: The outcome of the comparison: Value2 == Value1. This is your binary result for that item (1 or 0).
In this specific scenario:
An item is considered a "positive" case if Value2_i == Value1_i.
An item is considered a "negative" case if Value2_i != Value1_i.
Let's map this to the components of a confusion matrix and common classification metrics.
For each item i:
If Value1_i == Value2_i: This is an Exact Match.
If Value1_i != Value2_i: This is a Mismatch.
Let's consider the "Positive" class to be "Exact Match".
True Positive (TP): The actual state is "Exact Match" (Value1_i == Value2_i), and your system (which produces Value 2) achieved an exact match.
Count: The number of items where Value1_i == Value2_i.
False Positive (FP): The actual state is "Mismatch" (Value1_i != Value2_i), but your system somehow resulted in an "Exact Match". This is impossible by your definition. If Value1_i != Value2_i, your system cannot produce Value2_i such that Value1_i == Value2_i unless Value1_i itself was changing, which it isn't (it's the gold standard).
Count:0
False Negative (FN): The actual state is "Exact Match" (Value1_i == Value2_i), but your system somehow resulted in a "Mismatch". This is also impossible by your definition. If Value1_i == Value2_i, your system cannot produce such that .
Interpretation: Gives a straightforward percentage indicating how many of your Value 2 entries meet the accuracy standard you've defined.
Mean Absolute Percentage Error (MAPE):
What it measures: The average absolute percentage error relative to the gold standard.
How it works: Calculate the absolute percentage difference for each item: (|Value2_i - Value1_i| / Value1_i) * 100%. Then average these percentages. MAPE = (1/n) * Σ [(|Value2_i - Value1_i| / Value1_i) * 100%]
Interpretation: Useful when the magnitude of the value matters for judging accuracy (e.g., an error of 1 is small if the value is 100, but large if the value is 2). It provides the average error size as a percentage of the true value. Note: This metric can be problematic if Value 1 is zero.
Scatter Plot (Value 2 vs. Value 1):
What it measures: A visual representation of how well Value 2 tracks Value 1.
How it works: Plot Value 1 on the X-axis and Value 2 on the Y-axis for each item. Include a diagonal line representing Y = X (where perfect accuracy would lie).
Interpretation: Points close to the Y = X line indicate high accuracy. Points far away show larger errors. You can visually identify systematic bias (points mostly above or below the line) or if accuracy varies depending on the value magnitude (scatter widening or narrowing).
Which are "Best"?
Again, a combination provides the most complete picture:
Use MAE and/or RMSE to quantify the typical magnitude of the error in your data's units.
Use Percentage Correct (after carefully defining your tolerance) if the "correct or incorrect" nature based on a threshold is key. This is often the most intuitive metric for stating overall accuracy.
Use the Scatter Plot to visually inspect the relationship and identify patterns or outliers.
Avoid:
ICC: While technically adaptable, it's not the most direct or intuitive metric for accuracy against a gold standard.
Bland-Altman Plot: Primarily designed for comparing two measurement methods where neither is necessarily the truth. It focuses on the difference distribution, not the deviation from a gold standard.
Correlation (e.g., Pearson's r): As mentioned before, correlation measures association, not accuracy against a gold standard. You could have a high correlation even if Value 2 is consistently off by a large amount.
In summary, for comparing numeric values (Value 2) against a gold standard (Value 1) to assess accuracy:
Prioritize MAE/RMSE, Percentage Correct (with a defined tolerance), and a Scatter Plot. MAE/RMSE tell you the error magnitude, Percentage Correct tells you how often you meet a defined accuracy standard, and the Scatter Plot shows you the relationship visually.
Value2_i
Value1_i != Value2_i
Count:0
True Negative (TN): The actual state is "Mismatch" (Value1_i != Value2_i), and your system correctly resulted in a "Mismatch".
Count: The number of items where Value1_i != Value2_i.
Confusion Matrix:
Based on this specific definition, your confusion matrix for the outcome (Match vs. No Match) looks like this:
Result is Exact Match
Result is Not Exact Match
Actual: Exact Match
TP
FN = 0
Actual: Not Exact Match
FP = 0
TN
Where:
TP = Count(Value1 == Value2)
TN = Count(Value1 != Value2)
FP = 0
FN = 0
Common Classification Metrics:
Given this confusion matrix structure, the standard classification metrics simplify:
Accuracy:
Formula: (TP + TN) / (TP + FP + FN + TN)
In your case: (Count(V1==V2) + Count(V1!=V2)) / (Count(V1==V2) + 0 + 0 + Count(V1!=V2))
This simplifies to: Total Instances / Total Instances = 1. This isn't right. Let's rethink the matrix structure slightly.
Let's structure the confusion matrix based on the prediction (Value 2) vs. the truth (Value 1) directly, treating each possible numeric value as a class in a multi-class classification scenario.
Multi-Class Confusion Matrix:
Rows: True Values (Unique values in Value 1)
Columns: Predicted Values (Unique values in Value 2)
Cell (i, j): Count of instances where Value1 was the i-th unique value and Value2 was the j-th unique value.
True Value \ Predicted Value
Value A
Value B
Value C
...
Value A
Count(V1=A, V2=A)
Count(V1=A, V2=B)
Count(V1=A, V2=C)
...
Value B
Count(V1=B, V2=A)
Count(V1=B, V2=B)
Count(V1=B, V2=C)
...
Value C
Count(V1=C, V2=A)
Count(V1=C, V2=B)
Count(V1=C, V2=C)
...
...
...
...
...
...
The diagonal elements (Count(V1=X, V2=X)) represent the number of times Value 2 exactly matched Value 1 for that specific value X.
The off-diagonal elements represent the number of times Value 2 had a different value than Value 1.
Now, let's consider the metrics you asked for in this multi-class context, evaluated based on your strict "exact match" requirement.
Overall Accuracy:
This is the sum of all diagonal elements divided by the total number of instances.
Overall Accuracy = (Sum of all Count(V1=X, V2=X) cells) / Total Instances
This is equivalent to: Count(Value1 == Value2) / Total Instances.
Interpretation: This is the proportion of instances where Table 2's value exactly matches Table 1's value. This is the most direct metric corresponding to your binary "correct/incorrect" definition.
Precision, Recall, F1 Score:
These metrics are typically calculated per class in a multi-class setting.
For a specific value (class) X:
TP_X: Number of times the true value was X and the predicted value was X (Count(V1=X, V2=X)) - This is the diagonal element.
FP_X: Number of times the true value was not X, but the predicted value was X (Sum of the column for X, excluding the diagonal).
FN_X: Number of times the true value was X, but the predicted value was not X (Sum of the row for X, excluding the diagonal).
Precision_X = TP_X / (TP_X + FP_X)
Interpretation: Of all the times your system predicted value X, how often was the true value actually X?
Recall_X = TP_X / (TP_X + FN_X)
Interpretation: Of all the times the true value was X, how often did your system correctly predict X?
Interpretation: The harmonic mean of Precision and Recall for predicting value X.
Averaging Precision/Recall/F1: You can then average these per-class scores (e.g., Macro Average, Weighted Average, Micro Average) to get an overall score.
Micro Average F1: This is equivalent to the Overall Accuracy calculated above for multi-class problems. This again points to Overall Accuracy as the most relevant single number for your "exact match" criterion.
Macro/Weighted Averages: These give you a sense of how well the system performs across different values, but are perhaps more detail than you need if you only care about the global exact match rate.
The Most Direct Metrics for Your Scenario:
Based on your requirement for a strict binary correct/incorrect (Value2 == Value1 is 1, Value2 != Value1 is 0):
Exact Match Count: The total number of instances where Value2 == Value1.
Mismatch Count: The total number of instances where Value2 != Value1.
Exact Match Accuracy:Exact Match Count / Total Number of Instances. This is the primary metric that directly reflects the proportion of your data in Table 2 that is "correct" according to your definition.
While you can construct the multi-class confusion matrix and calculate per-class or averaged P/R/F1, the Overall Accuracy derived from that multi-class matrix is the same as the simple Exact Match Accuracy, and it's the most intuitive measure of how often Table 2's value is exactly right compared to Table 1.
You wouldn't typically use a simple 2x2 confusion matrix derived directly from the Value2==Value1 outcome because the FP and FN counts become zero, which makes the standard P/R/F1 calculations degenerate and not informative in the usual sense.
So, calculate the Exact Match Accuracy. If you want to see which values are commonly mismatched, the multi-class confusion matrix is useful for diagnosis.