{{ message }}

Multi-Sample Williams Test of Proportions

The multi-sample Williams design is a special case of a crossover design used to compare the means of multiple groups.

Suppose we are interested in comparing groups 1 and 2. Define \(d_{ij}\) as \(y_{ij1} - y_{ij2}\) where \(y_{ijl}\) is the binary response from the \(j^{th}\) subject in the \(i^{th}\) sequence from the \(l^{th}\) group. We can estimate the difference between the means of the two groups by

\[ \hat{\epsilon} = \frac{1}{kn} \sum^{k}_{i=1} \sum^{n}_{j=1} d_{ij} \]

which is normally distributed with mean \(\epsilon\) and variance \(\sigma^2_d / (kn)\).

We are able to rewrite the hypothesis test to test \(\epsilon\) relationship to 0. To perform the power calculation for this hypothesis, we need to calculate

\[ \hat{\sigma}_d = \frac{1}{k(n - 1)} \sum^{k}_{i=1} \sum^{n}_{j=1} \left( d_{ij} - \frac{1}{n} \sum_{j'=1}^n d_{ij'} \right)^2 \]

For the purposes of this calculator, we assume that each contrast has the same variance.

Power Calculation Parameters

To input multiple values, seperate them by a comma.

{{ this.errors }}

Power Calculation Explanation

Solve For
The unknown you are interested in solving for.
The sample size used to test the hypothesis.
The \(\alpha\) (Type I error rate) level of the hypothesis test.
The power (1 - Type II error rate) of the hypothesis test.
The proportions of each group seperated by a comma.
Standard Deviation (\(\sigma_d\))
The standard deviation of the sample, defined above.
The margin is a value the effect size needs to exceed to be meaningful. For hypotheses of equivalence, the margin must be greater than 0, or the calculation will not be solvable. For one sided tests, a margin is less than 0 implies a non-inferiority hypothesis. Otherwise, a superiority hypothesis is implied. Read More
There are three types of hypotheses that can be tested: two-sided, one-sided and equivalence. Tests of equivalence must include a margin if the unknown and null means are equal. Read More

Calculation Results

No calculation has been generated yet.

Sign Up to Save Power and Sample Size Calculators!

Hypothesis: {{ hypothesis }}

Proportions: {{ p }}

N Alpha Power Standard Deviation Margin
{{ val }}

Power Graph

There are no results to graph yet.


  • Chow, S., Shao, J., & Wang, H. (2003), Sample size calculations in clinical research, New York: Marcel Dekker.