/v1/mean
Sample size for a mean
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/samplesize-api/v1/mean" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/samplesize-api/v1/mean", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/samplesize-api/v1/mean");
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/samplesize-api/v1/mean",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"note": "Mean sample size n = (z·σ/E)². Uses the normal (z) approximation, appropriate when σ is known or the sample is large.",
"inputs": {
"std_dev": 10,
"confidence": 0.95,
"margin_of_error": 2
},
"z_score": 1.959964,
"unrounded": 96.0365,
"required_sample_size": 97
},
"meta": {
"timestamp": "2026-06-05T19:50:22.286Z",
"request_id": "d4f5e832-2573-4472-9baf-59b0883ed40b"
},
"status": "ok",
"message": "Sample size for a mean",
"success": true
}