Statistics
Fisher's exact test (2x2) API
Performs Fisher's exact test on a 2x2 contingency table (left/right/two-tailed) with exact hypergeometric tail probabilities and the odds ratio — correct for small counts where chi-square fails. Answers 'Is there an exact association in this 2x2 table?', 'What is Fisher's exact p-value?'.
Price$0.08per request
MethodPOST
Route/v1/stats/fisher-exact-test
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
statisticsfisher-exactcontingency2x2categoricalp-valuesmall-sampleodds-ratio
API URL
Integration docshttps://x402.hexl.dev/v1/stats/fisher-exact-testExample request
{
"a": 8,
"b": 2,
"c": 1,
"d": 5
}Example response
{
"table": {
"a": 8,
"b": 2,
"c": 1,
"d": 5
},
"tail": "two",
"pValue": 0.03496503,
"pLeft": 0.99912587,
"pRight": 0.02447552,
"pTwoTailed": 0.03496503,
"oddsRatio": 20,
"rating": "significant",
"interpretation": "Fisher's exact (two-tailed) p=0.03497 for 2x2 [[8,2],[1,5]]; association."
}Input schema
{
"type": "object",
"required": [
"a",
"b",
"c",
"d"
],
"properties": {
"a": {
"type": "integer",
"examples": [
8
]
},
"b": {
"type": "integer",
"examples": [
2
]
},
"c": {
"type": "integer",
"examples": [
1
]
},
"d": {
"type": "integer",
"examples": [
5
]
},
"tail": {
"type": "string",
"enum": [
"two",
"left",
"right"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}