Estimate sample size to find population proportion with given tolerance

required.sample.size(epsilon, pest = 0.5, alpha = 0.05, N = Inf)

Arguments

epsilon

Tolerange of proportion estimate (see details)

pest

The estimated proportion (leave at 0.5 if unknown)

alpha

The confidence interval is (1-alpha)*100%

N

Population size (default implies infinite population)

Value

numeric

Details

Estimated proportion should have (1-alpha)*100% confidence of being within p +/- epsilon of the true proportions

References

See https://onlinecourses.science.psu.edu/stat414/node/264

See also

Examples

required.sample.size(0.04, alpha=0.1)
#> [1] 422.7412
required.sample.size(0.04, alpha=0.1, N=40)
#> [1] 36.62148
# epsilon here is equivalent to +/- 4 required.sample.size(10/40, alpha=0.1, N=40)
#> [1] 8.68864