dmeanSampleSize: Difference in means sample size

Description Usage Arguments Value References Examples

Description

Calculate sample size (per group) needed to estimate a difference in means within a given margin of error. This function assumes the means come from Normal distributions with common variances. Those are big and likely untrue assumptions, therefore the estimated sample size should be treated as a rough estimate.

Usage

1
dmeanSampleSize(moe, sd, conf = 0.95)

Arguments

moe

margin of error expressed in your measure's units

sd

the common standard deviation of the two populations expressed in your measure's units

conf

confidence level associated with margin of error (default = 0.95)

Value

Estimated sample size for each group.

References

Hogg, R. V. and Tanis, E. A. (2006), Probability and Statistical Inference 7e, Pearson, New Jersey.

Examples

1
2
3
## Approximate sample size needed to estimate the difference in means between two
## populations within 1.5 units, each with standard deviation 20 units.
dmeanSampleSize(moe = 1.5, sd = 20)

clayford/nandc documentation built on May 13, 2019, 7:38 p.m.