/v1/mean
Sample size for a mean
Δοκιμάστε το ζωντανά
10 δωρεάν κλήσεις την ημέρα — χωρίς εγγραφή, χωρίς κλειδί API. Μέσω του gateway του oanor.
Δουλεύει. Πάρε ένα κλειδί API και χρησιμοποίησέ το στο έργο σου.
Λάβετε ένα κλειδί APIΑποσπάσματα κώδικα
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_..."}
)
Παράδειγμα απόκρισης
Πραγματική απόκριση αυτού του endpoint, από τον τελευταίο έλεγχο υγείας.
{
"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
}