Means: One and Two Groups
Calculate the minimum sample size for a two-sided or one-sided two-sample Welch t-test when the two population variances are not assumed to be equal. The calculation uses the noncentral t power function and searches over integer group sizes, matching the approach documented by PASS.
This calculator implements the two-sample unequal-variance t-test, commonly called Welch's t-test or the Aspin-Welch-Satterthwaite test. PASS describes the corresponding procedure as a sample-size and power calculation for one- or two-sided two-sample t-tests without an equal-variance assumption. The underlying analysis assumes normally distributed populations.
For group means x̄1 and x̄2, standard deviations s1 and s2, and sample sizes n1 and n2, the Welch statistic is
The Welch-Satterthwaite degrees of freedom are
For planning, the assumed population standard deviations (σ1, σ2) replace the sample standard deviations in the variance terms. For a specified true mean difference δ, the noncentrality parameter is
For each candidate integer pair (n1, n2), the calculator obtains the critical value from the central t distribution using the Welch degrees of freedom and evaluates the rejection probability under the corresponding noncentral t distribution. It then searches upward until the calculated power is at least the requested target.
For a two-sided test, the rejection region is in both tails. For an upper one-sided test, rejection is in the upper tail; for a lower one-sided test, rejection is in the lower tail. The allocation ratio is defined as n2/n1; when the ratio is 1, the groups are equal in size.
The PASS documentation's Example 1 provides a direct validation target. With a two-sided test, target power 0.90, α = 0.05, equal allocation, mean difference δ = 2, σ1 = 1, and σ2 = 2.5, PASS reports n1 = 21 and n2 = 21, for a total sample size of 42, with actual power 0.90607. The same PASS example also reports n1 = n2 = 30 for α = 0.01.
Welch, B. L. (1938). The Significance of the Difference Between Two Means when the Population Variances are Unequal. Biometrika, 29(3–4), 350–362. DOI: 10.1093/biomet/29.3-4.350.
NCSS, LLC. PASS Sample Size Software, Chapter 424: Two-Sample T-Tests Allowing Unequal Variance. The PASS documentation specifies the Welch/Aspin-Welch-Satterthwaite test statistic, Welch degrees of freedom, noncentral t power calculation, and the worked sample-size example used above.