R/finite_pop_sampling.R
required.sample.size.Rd
Estimate sample size to find population proportion with given tolerance
required.sample.size(epsilon, pest = 0.5, alpha = 0.05, N = Inf)
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) |
numeric
Estimated proportion should have (1-alpha)*100% confidence of being within p +/- epsilon of the true proportions
See https://onlinecourses.science.psu.edu/stat414/node/264
Other population-sampling: prop.ci
,
sample_finite_population
,
truepos_given_sample
required.sample.size(0.04, alpha=0.1)#> [1] 422.7412required.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