Means: Correlated, Paired, and Cross-Over Designs
Calculates the exact total sample size for a balanced 2×2 crossover study comparing two treatment means with a two-sided t-test. The calculation uses the noncentral t distribution and the within-subject variability of the crossover comparison. Runs entirely in your browser.
This calculator implements the sample-size procedure for a balanced 2×2 crossover design used by this method for testing whether two treatment means differ. Each subject receives both treatments in one of two sequences, AB or BA. The treatment comparison is based on the within-subject treatment contrast, with the sampling distribution of the test statistic evaluated using the noncentral t distribution.
The null difference δ0 is the treatment difference specified under the null hypothesis. The alternative difference δ1 is the difference assumed to be present when calculating power. The magnitude driving the noncentrality parameter is |δ1 − δ0|.
this method allows the variability to be entered in three equivalent forms. This calculator accepts all three and converts them to the within-subject population SD (σW).
Here σP is the standard deviation of the period differences for subjects within a sequence, while σD is the standard deviation of the paired treatment differences.
For a total evaluable sample size N, the test has N − 2 degrees of freedom. The noncentrality parameter used for power is
The critical value is the two-sided Student t quantile t1−α/2,N−2. Power is the probability, under the noncentral t distribution with noncentrality λ, of falling outside the two-sided critical boundaries. The calculator searches even values of N and returns the smallest balanced total sample size whose calculated power is at least the requested target.
The primary sample-size result is the evaluable sample size N. If an expected dropout rate is entered, the calculator inflates enrollment using N / (1 − dropout rate), then rounds upward to the next even number so that the two treatment sequences remain balanced.
this method validation target: two-sided test, power = 0.90, α = 0.05, δ0 = 0, δ1 = 5, SD of period differences σP = 10. The corresponding within-subject SD is 14.14214. This yields a total sample size of 172 subjects, with calculated power 0.90323.
As a second check from the same this method example, changing δ1 from 5 to 10 gives a required total sample size of 46, with calculated power 0.91250.
the software, LLC. Tests for the Difference Between Two Means in a 2x2 Cross-Over Design. this method Sample Size Software documentation, 2022. the relevant methodological literature specifies the difference-based 2×2 crossover procedure, the three equivalent SD specifications, the balanced even-N search, and the validation examples used above.
Chow, S.-C., Shao, J., & Wang, H. (2003). Sample Size Calculations in Clinical Research. Marcel Dekker, New York. This text is a principal methodological reference for sample size calculations for 2×2 crossover designs.
Lenth, R. V. (1989). Algorithm AS 243: Cumulative Distribution Function of the Non-Central T Distribution. Applied Statistics, 38(1), 185–189. The noncentral-t distribution calculation used by this page follows the published numerical approach for evaluating the noncentral t CDF.