Compare the mean of a continuous measurement in two samples

The sample sizes are calculated in two different ways: first using the T statistic (with a non-centrality parameter), then using the Z statistic. The Z statistic approximates the T statistic, but provides sample sizes that are slightly too small. (We provide the Z statistic calculation to allow comparison with other calculators which use the Z approximation.)

Instructions: Enter parameters in the red cells. Answers will appear in blue below.

α (two-tailed) = Threshold probability for rejecting the null hypothesis. Type I error rate.
β = Probability of failing to reject the null hypothesis under the alternative hypothesis. Type II error rate.
q1 = Proportion of subjects that are in Group 1 (exposed)
q0 = 0.000 Proportion of subjects that are in Group 0 (unexposed); 1-q1
E = Effect size (If μ1 = mean in Group 1 and μ0 = mean in Group 0, then E = μ1 - μ0.)
S = Standard deviation of the outcome in the population

The standard normal deviate for α = Zα =

The standard normal deviate for β = Zβ =

Standardized Effect Size = (E/S) =

1. Calculation using the T statistic and non-centrality parameter:

2. Normal approximation using the Z statistic instead of the T statistic:

A = (1/q1 + 1/q0) =

B = (Zα+Zβ)2 =

Total group size = N = AB/(E/S)2 =

This formula uses the Z statistic to approximate the T statistic. As a result it slightly underestimates the sample size. We provide this approximation to allow comparison to other calculators that use the Z statistic.

Reference: Hulley SB, Cummings SR, Browner WS, Grady D, Newman TB. Designing clinical research : an epidemiologic approach. 4th ed. Philadelphia, PA: Lippincott Williams & Wilkins; 2013. Appendix 6A, page 73.

Chow S-C, Shao J, Wang H. Sample size calculations in clinical research. 2nd ed. Boca Raton: Chapman & Hall/CRC; 2008. Section 3.2.1, page 58.