Indietro

#sample-size

2 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

Statistical Inference API

Inferential-statistics maths as an API, computed locally and deterministically. The samplesize endpoint computes how many respondents a survey or experiment needs for a proportion, n = Z²·p(1−p)/E², from a confidence level and a margin of error (using p = 0.5 for the most conservative size), with a finite-population correction when the population is known. The confidence endpoint builds a confidence interval for a mean (estimate ± Z·σ/√n) or a proportion (p ± Z·√(p(1−p)/n)), returning the standard error, margin of error and the lower and upper bounds. The ztest endpoint runs a one-sample z-test, z = (x̄ − μ₀)/(σ/√n), and returns the z-score, the one- or two-tailed p-value and whether the result is significant at the chosen alpha. The z-scores come from an exact inverse-normal and the p-values from the normal CDF. Everything is computed locally and deterministically, so it is instant and private. Ideal for A/B-testing, survey, research and analytics app developers, experiment dashboards and data-science tools, and education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is inferential statistics; for descriptive statistics use a statistics API and for probability distributions use a probability API.

api.oanor.com/inference-api