for a single mean
Error bound
I’m not certain if this is identical to the “for a single mean” above, but calculating an error bound is done via
If we don’t have enough for the z-score.. we can use instead.
proportion testing??
NOTE: Unless is extremely large, the math below doesn’t work great if is near 0 or 1. See Wilson’s adjustment for estimating
If you sample the probability of a population, the distribution is an unbiased estimator of the probability, . The standard deviation of the sample is where . The sample is approximately normal for large samples, where large means both and .
I’m not certain, but I believe these conditions are required:
- Sample is randomly selected
- np > 15 (or 10??) and nq > 15 (10?)
- N >= 10n
To calculate a confidence interval, the formula is:
\begin{math} \hat{p} \pm z_{\frac{a}{2}}\sigma_{\hat{p}} = \hat{p} \pm z_{\frac{a}{2}}\sqrt{\frac{pq}{n}} \approx \hat{p} \pm z_{\frac{a}{2}}\sqrt{\frac{\hat{p}\hat{q}}{n}} \end{math}
where and .
Values of for different values of .
p | pq | |
---|---|---|
.5 | .25 | .5 |
.6 or .4 | .24 | .49 |
.7 or .3 | .21 | .46 |
.8 or .2 | .16 | .4 |
.9 or .1 | .09 | .3 |
Wilson’s adjustment for estimating .
If is near 0 or 1, the sample size has to be “extremely large” to make the math above work. Alternatively, we can use this formula:
where