Learn R Programming

statpsych (version 1.7.0)

size.ci.prop: Sample size for a proportion confidence interval

Description

Computes the sample size required to estimate a population proportion with desired confidence interval precision. Set the proportion planning value to .5 for a conservatively large sample size.

Usage

size.ci.prop(alpha, p, w)

Value

Returns the required sample size

Arguments

alpha

alpha level for 1-alpha confidence

p

planning value of proportion

w

desired confidence interval width

Examples

Run this code
size.ci.prop(.05, .4, .2)

# Should return:
# Sample size
#          93


Run the code above in your browser using DataLab