UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

21 lines 939 B
/** * Estimate ideal sample size given desired confidence level, error and population proportion with attribute in question. * * Implementation of Cochran's Sample Size formula * * Z values for confidence levels: * 50% | 0.67449 * 75% | 1.15035 * 90% | 1.64485 * 95% | 1.95996 * 97% | 2.17009 * 99% | 2.57583 * 99.9% | 3.29053 * * @param {number} z Standard distribution value. # of standard deviations. See statistical tables * @param {number} p Fraction of the population with attribute in question. For example if we want to estimate what time people have breakfast and we know that only 30% of people have have breakfast overall, p would be 0.3 * @param {number} e Error tolerance, 0.05 represents 5% error tolerance * @returns {number} Sample size */ export function computeSampleSize_Cochran(z: number, p: number, e: number): number; //# sourceMappingURL=computeSampleSize_Cochran.d.ts.map