Calculators
Confidence interval (mean or proportion) API
Compute a confidence interval for a mean (x̄ ± z·s/√n) or a proportion (Wald p̂ ± z·√(p̂(1−p̂)/n)) at any confidence level, returning margin of error, lower and upper bounds. Auditable: echoes the z critical value and standard error. Answers '95% confidence interval for the mean','margin of error for this proportion','CI bounds'.
Price$0.01per request
MethodPOST
Route/v1/calc/stat-confidence-interval
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calcstatisticsconfidence-intervalmargin-of-errorproportionmeanwaldinference
API URL
Integration docshttps://x402.hexl.dev/v1/calc/stat-confidence-intervalExample request
{
"type": "mean",
"mean": 100,
"sd": 15,
"n": 36,
"confidence": 0.95
}Example response
{
"type": "mean",
"confidence": 0.95,
"mean": 100,
"standardError": 2.5,
"z": 1.96,
"marginOfError": 4.89991,
"lower": 95.10009,
"upper": 104.89991,
"n": 36,
"rating": "95% CI",
"interpretation": "95% CI for the mean: [95.1001, 104.8999]."
}Input schema
{
"type": "object",
"required": [],
"properties": {
"type": {
"type": "string",
"enum": [
"mean",
"proportion"
],
"default": "mean"
},
"mean": {
"type": "number",
"examples": [
100
]
},
"sd": {
"type": "number",
"examples": [
15
]
},
"n": {
"type": "number",
"examples": [
36
]
},
"successes": {
"type": "number",
"description": "for proportion: number of successes",
"examples": [
60
]
},
"confidence": {
"type": "number",
"default": 0.95,
"examples": [
0.95
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}