InfluentialPoints.com
Biology, images, analysis, design...
 Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

Sample size for testing a difference between means

We introduced the topic of sample size in Unit 5. There we were estimating the required sample size for comparing a sample mean with a known parametric mean using the Z-test. That approach can readily be extended to estimate the sample size required for detecting a difference between means with a given power using the two-sample t-test.

With the z-test the population standard deviation was assumed to be known. But now the population standard deviation is estimated rather than known. Strictly speaking we should therefore replace the z-values with t-values and use an integrative procedure to estimate sample size (this is because the values of t will be dependent on n).

Such a method was proposed by Snedecor & Cochran (1980) and is given in various texts - however, it is much more time-consuming and will usually give similar results to the method given here. It should also be remembered that estimating required sample size can only ever be an approximate exercise since there is no guarantee that variability will remain constant.

Algebraically speaking:

For a one-tailed test:

 n = (r + 1)2(zα + zβ)2 σ2 δ2r
where

• n is the required total sample size = n1 + n2.
• r is the ratio of the sample sizes for each group (n1/ n2),
• zα is obtained from your probability calculator or tables given that P(Z < zα) = 1 − α and α is the significance level.
• zβ is obtained from your probability calculator or tables, given that P(Z < zβ) = 1 − β and 1 − β is the power,
• δ is the difference that one wishes to be able to detect,
• σ is the known common standard deviation. In practice we only have an estimate of this being the square root of the pooled estimate of the variance. Some authorities recommend adding 2 to the number of samples required to allow for this.

For a two-tailed test, we use zα/2 in place of zα. This is an approximation since it ignores the possibility of a type III error. However, for large treatment effects, it will not usually introduce any serious error.

Where n1 = n2 the formula simplifies to:

 n = 4(zα + zβ)2 σ2 δ2