Statistics
Cohen's kappa (2 raters) API
Computes Cohen's kappa inter-rater agreement from a square confusion matrix (rater A rows x rater B columns), correcting observed agreement for chance, with a Landis-Koch interpretation. Answers 'How much do two raters agree beyond chance?', 'What is kappa for this confusion matrix?'.
Price$0.04per request
MethodPOST
Route/v1/stats/cohens-kappa
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
psychometricscohens-kappainter-rateragreementreliabilityraterskappaannotation
API URL
Integration docshttps://x402.hexl.dev/v1/stats/cohens-kappaExample request
{
"matrix": [
[
20,
5
],
[
10,
15
]
]
}Example response
{
"kappa": 0.4,
"observedAgreement": 0.7,
"expectedAgreement": 0.5,
"nSubjects": 50,
"nCategories": 2,
"interpretation": "fair agreement"
}Input schema
{
"type": "object",
"required": [
"matrix"
],
"properties": {
"matrix": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
},
"description": "square confusion matrix of joint counts",
"examples": [
[
[
20,
5
],
[
10,
15
]
]
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}