Statistics
One-proportion z-test API
Tests an observed proportion against a hypothesized value with the normal approximation, returning z, the one/two-tailed p-value and the standard error. Answers 'Is my observed rate significantly different from the expected rate?', 'What is the z and p for a single proportion?'.
Price$0.04per request
MethodPOST
Route/v1/stats/one-proportion-z-test
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
statisticsproportionz-testhypothesis-testp-valueinferencebinomialsignificance
API URL
Integration docshttps://x402.hexl.dev/v1/stats/one-proportion-z-testExample request
{
"successes": 540,
"n": 1000,
"p0": 0.5
}Example response
{
"z": 2.529822,
"pValue": 0.01141208,
"tail": "two",
"alpha": 0.05,
"sampleProportion": 0.54,
"hypothesizedProportion": 0.5,
"standardError": 0.015811,
"successes": 540,
"n": 1000,
"rejectNull": true,
"rating": "significant",
"interpretation": "two-tailed one-proportion z=2.53, p=0.01141; p̂=0.54 vs p0=0.5; reject H0 at alpha=0.05."
}Input schema
{
"type": "object",
"required": [
"successes",
"n",
"p0"
],
"properties": {
"successes": {
"type": "integer",
"examples": [
540
]
},
"n": {
"type": "integer",
"examples": [
1000
]
},
"p0": {
"type": "number",
"examples": [
0.5
]
},
"tail": {
"type": "string",
"enum": [
"two",
"left",
"right"
]
},
"alpha": {
"type": "number",
"examples": [
0.05
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}