Indietro

#survey

1 APIs con questa etichetta

Sample Size API

Survey and poll sample-size planning as an API, computed locally and deterministically. The proportion endpoint computes the number of respondents needed to estimate a proportion within a target margin of error at a chosen confidence level, n = z²·p(1−p)/E², defaulting to the worst-case p = 0.5 that maximises the required size, with an optional finite-population correction n/(1 + (n−1)/N) for a known population — the classic ±5 % margin at 95 % confidence needs 385 responses, ±3 % needs 1 068, and capping the population at 1 000 cuts the ±5 % requirement to 278. The mean endpoint sizes a sample for estimating a mean to within a margin of error from the standard deviation, n = (z·σ/E)². The margin endpoint inverts the relationship, returning the margin of error a given sample size actually achieves. The critical z-value is computed from the confidence level with a high-accuracy inverse-normal so any confidence works, not just the textbook 90/95/99 %. Margins, proportions and confidence are decimals (0.05, 0.5, 0.95). Everything is computed locally and deterministically, so it is instant and private. Ideal for market-research, polling, UX-research, survey-platform, product-analytics and statistics-education app developers, study-planning and sample-size tools, and research software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is sample-size planning with the normal approximation; for A/B-test significance use an A/B-test API and for descriptive statistics a statistics API.

api.oanor.com/samplesize-api