Statistics
CI: difference of two means API
Builds a Welch or pooled t confidence interval for the difference between two independent means from summary stats, returning the interval, df, t-critical and margin of error. Answers 'What is the 95% CI for the gap between two group means?', 'Does the mean difference exclude zero?'.
Price$0.06per request
MethodPOST
Route/v1/stats/ci-diff-means
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
statisticsconfidence-intervaldifference-of-meanswelchtwo-sampleinferencemargin-of-errort-distribution
API URL
Integration docshttps://x402.hexl.dev/v1/stats/ci-diff-meansExample request
{
"mean1": 10,
"sd1": 2,
"n1": 30,
"mean2": 8,
"sd2": 2.5,
"n2": 30
}Example response
{
"difference": 2,
"confidence": 0.95,
"method": "Welch",
"df": 55.3337,
"tCritical": 2.0038,
"standardError": 0.584523,
"marginOfError": 1.171251,
"lower": 0.828749,
"upper": 3.171251,
"rating": "excludes zero (significant)",
"interpretation": "95% CI for (mean1 - mean2): [0.8287, 3.1713]."
}Input schema
{
"type": "object",
"required": [
"mean1",
"sd1",
"n1",
"mean2",
"sd2",
"n2"
],
"properties": {
"mean1": {
"type": "number",
"examples": [
10
]
},
"sd1": {
"type": "number",
"examples": [
2
]
},
"n1": {
"type": "integer",
"examples": [
30
]
},
"mean2": {
"type": "number",
"examples": [
8
]
},
"sd2": {
"type": "number",
"examples": [
2.5
]
},
"n2": {
"type": "integer",
"examples": [
30
]
},
"confidence": {
"type": "number",
"examples": [
0.95
]
},
"equalVariance": {
"type": "boolean"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}