Skip to content
GET /v1/ztest

One-sample z-test

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/inference-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/inference-api/v1/ztest" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/inference-api/v1/ztest", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/inference-api/v1/ztest");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/inference-api/v1/ztest",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "note": "z = (x̄ − μ₀)/(σ/√n). p-value from the standard normal; significant when p < alpha. Known-σ (z) test.",
        "inputs": {
            "n": 50,
            "tail": "two",
            "alpha": 0.05,
            "stddev": 15,
            "sample_mean": 105,
            "population_mean": 100
        },
        "p_value": 0.01842209,
        "z_score": 2.357023,
        "significant": true,
        "standard_error": 2.12132
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:14.611Z",
        "request_id": "f23825a5-c530-48ca-acdb-6ec2fa76a478"
    },
    "status": "ok",
    "message": "Z-test",
    "success": true
}