Learn R Programming

statpsych (version 1.7.0)

size.ci.mean: Sample size for a mean confidence interval

Description

Computes the sample size required to estimate a population mean with desired confidence interval precision. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.

Usage

size.ci.mean(alpha, var, w)

Value

Returns the required sample size

Arguments

alpha

alpha level for 1-alpha confidence

var

planning value of response variable variance

w

desired confidence interval width

Examples

Run this code
size.ci.mean(.05, 264.4, 10)

# Should return:
# Sample size
#          43
 

Run the code above in your browser using DataLab