Statistical Calculators › Means: One and Two Groups › Unequal Allocation Two-Sample t-Test Sample Size
← All Calculators

Means: One and Two Groups

Unequal Allocation Two-Sample t-Test Sample Size

Calculate the sample size needed for a two-sided or one-sided two-sample t-test when the two independent groups are allocated unequally. The calculation assumes normally distributed outcomes with a common population standard deviation and uses the noncentral t distribution, matching the this method equal-variance method.

Study Design

Specify the planned difference, variability, power, significance level, and Group 2: Group 1 allocation ratio.
this method allocation rule: N2 = ceil(R × N1).
The calculator searches integer N1 values until the actual noncentral-t power reaches the target.

Required Sample Size

The reported allocation is the smallest Group 1 size found that achieves at least the requested power under the specified ratio.
Enter the design assumptions and click Calculate Sample Size.

Methodology

This calculator implements the traditional two-sample equal-variance t-test used by this method for independent groups. The planning assumptions are a common standard deviation, a specified difference in population means, a Type I error rate, a desired power, and an allocation constraint between the two groups. this method explicitly supports unequal allocation by setting R = N2/N1 and calculating N2 = ceil(R × N1).

Test statistic and degrees of freedom

For the final analysis, the pooled standard deviation is used because the two population variances are assumed equal:

sp2 = [(N1−1)s12 + (N2−1)s22] / (N1 + N2 − 2)

t = (x̄1 − x̄2) / [sp√(1/N1 + 1/N2)]

df = N1 + N2 − 2

Power calculation

For planning, this method calculates the degrees of freedom as df = N1 + N2 − 2 and the noncentrality parameter as:

λ = δ / [σ√(1/N1 + 1/N2)]

The power is then obtained from the noncentral t distribution using the appropriate central-t critical value. For a two-sided test, power is the probability outside the two critical values; for a one-sided test, it is the probability beyond the single critical value in the specified direction. when solving for sample size it uses this same power formulation and searches for the required parameter.

Unequal allocation

When the allocation ratio is R = N2/N1, the Group 2 sample size is calculated as N2 = ceil(R × N1). The calculator then searches over integer values of N1. The first combination whose actual power is at least the requested target is reported. Because sample sizes are discrete, actual power can be slightly above the target.

Worked verification example

Using the documented this method method, consider a two-sided test with α = 0.05, 80% target power, δ = 0.05, σ = 0.10, and R = 2.00. The allocation rule gives N2 = 2N1. The calculation gives N1 = 48 and N2 = 96, for a total sample size of 144, with actual power approximately 0.80214. The immediately smaller allocation, N1 = 47 and N2 = 94, has power approximately 0.79374, so 48/96 is the first allocation meeting 80% power.

Assumptions

The underlying outcome distributions are assumed to be normal and to have equal population variances. If unequal variances are expected, use an unequal-variance/Welch procedure instead. the relevant methodological literature identifies the equal-variance and unequal-variance procedures separately.

References

Chow, S.C., Shao, J., Wang, H., & Lokhnygina, Y. (2018). Sample Size Calculations in Clinical Research, 3rd Edition. Taylor & Francis/CRC, Boca Raton, Florida.

Julious, S.A. (2010). Sample Sizes for Clinical Trials. Chapman & Hall/CRC, Boca Raton, Florida.