Compare the mean of a continuous measurement in two samples. This calculator shows detectable effect size given sample size and allows for clustered sampling. Although the t-test will be used to compare the means, this calculator approximates the t-statistic with the z-statistic.

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.
C1 = Number of clusters in C1 (treatment group)
C0 = Number of clusters in C0 (control group)
m = Size of each cluster
ρ = Within-cluster correlation coefficient
S = Standard deviation of measurement

The standard normal deviate for α = Zα =

The standard normal deviate for β = Zβ =

Sample size including cluster correction:

Treatment group size = N'1 =

Control group size = N'0 =

Size of combined group = N'total =

Design effect = 1 + (ρ(m-1)) =

Functional sample size (i.e., excluding cluster correction):

Treatment group size = N1 = N'1/Design effect (rounded) =

Control group size = N0 = N'0/Design effect (rounded) =

Size of combined group = Ntotal =

Proportion of total in treatment group = q1 =

Proportion of total in control group = q0 =

A = 1/q1 + 1/q0 =

B = (Zα + Zβ)2 =

AB/N =

Detectable effect size = E = S√AB/N =

Reference:
Donner A, Birkett N, Buck C. Randomization by cluster. Sample size requirements and analysis. Am J Epidemiol 1981;114:906-14.