When you compare the average level of several groups, the spread within each group is not necessarily the same: one group's observations may be tightly clustered while another's are much more scattered. The Alexander–Govern test offers an approximate way to handle this situation. The question it answers is whether the population means of the groups are equal, not whether their population variances are equal. [1]

Suppose there are k independent populations. The null hypothesis is H₀: μ₁ = μ₂ = … = μₖ, and the alternative is that at least one population mean differs. The method allows the groups to have different sample sizes and different population variances, but it requires that observation units be sampled independently and that each group come from a normal population. [1]

First, Set a Common Center by Precision

For group i, let the sample size be nᵢ, the sample mean mᵢ, the unbiased sample variance sᵢ², and the standard error of the mean SEᵢ = sᵢ/√nᵢ. The test first takes 1/SEᵢ², which is nᵢ/sᵢ², as an unnormalized weight, and then divides each group's weight by the sum of all weights to obtain wᵢ, which sum to 1. The common center is the weighted mean m_w = Σwᵢmᵢ.

The weights reflect how precisely each group mean is estimated, not merely how many observations a group has. A group with a small sample size can still have a large influence on the common center if its within-group variance is also small. Next, each group's deviation from the common center is divided by its own standard error, giving tᵢ = (mᵢ − m_w)/SEᵢ.

Using each group's degrees of freedom nᵢ − 1, the Alexander–Govern method approximately converts these standardized deviations into quantities zᵢ on a normal scale, then adds up their squares: A = Σzᵢ². Under the null hypothesis, the right-tail probability p is computed approximately from a chi-square distribution with k − 1 degrees of freedom. The larger A is, the harder it is for a common mean to explain the observed between-group deviations, given the precision of each group. [1]

A Simulated Example with a Fixed Seed

The calculation below uses three independent simulated normal samples. The sample sizes are 12, 20, and 32; the population means set when generating the data are 0, 0.7, and 1.1; and the population standard deviations are 0.5, 2, and 1. The random seed is fixed at 2026111734.

Sample points and mean error bars for three simulated groups, alongside comparisons of each group's weight and squared contribution to the statistic

Three fixed-seed normal simulated samples, with the group means, standard errors, inverse-squared-standard-error weights, and Alexander–Govern standardized squared contributions actually computed. The error bars show 1 standard error and are not confidence intervals; the approximate chi-square p-value was cross-checked against SciPy using an independent formula.

This draw gave group means of about 0.021, 1.309, and 1.195, with corresponding standard errors of about 0.134, 0.440, and 0.163. The normalized weights of the three groups are about 0.565, 0.053, and 0.382, and the weighted common center is about 0.537. Although the first group has the smallest sample size, it also has the smallest sample variance, so it receives the highest weight.

The squared contributions of the three groups to A are about 8.988, 2.775, and 12.854, for a total of A = 24.6175. Using a chi-square distribution with 2 degrees of freedom as the approximation gives p ≈ 0.000004512. If a significance level of 0.05 was chosen in advance, this result supports rejecting the null hypothesis that the three population means are equal. The single-group contributions shown in the figure describe how the overall statistic is composed; they do not mean that any one group completed a significance test on its own.

Reproducing It with SciPy

Generate the three groups of data in order, then pass each group to scipy.stats.alexandergovern as a separate argument. In the returned object, statistic is A and pvalue is the corresponding approximate p-value. [1]

import numpy as np
from scipy.stats import alexandergovern

rng = np.random.default_rng(2026111734)
groups = [
    rng.normal(0, 0.5, 12),
    rng.normal(0.7, 2, 20),
    rng.normal(1.1, 1, 32),
]
result = alexandergovern(*groups)
print(f"A = {result.statistic:.6f}")
print(f"p = {result.pvalue:.8g}")

Output:

A = 24.617504
p = 4.5120821e-06

What the Result Can Tell You

The conclusion of the overall test is that at least one group's population mean differs. It does not say which pairs differ, nor does it measure whether the difference matters in practice. The p-value describes the probability of obtaining the current statistic or a more extreme one when the null hypothesis and the test's model hold; it is not the probability that the null hypothesis is true. If the research question requires locating differences between groups, combine the test with pre-specified contrasts or a suitable multiple-comparison procedure that allows unequal variances, and control the error rate across the multiple comparisons.

When applying the test, first check whether the study design supports independent observations, and use the data to judge whether a within-group normal model is appropriate. Each group needs at least two observations; if a group's values are all identical, SciPy issues a warning and returns NaN, which must not be read as a statistic of zero or as no difference between groups. [1]

References

  1. [1] SciPy. scipy.stats.alexandergovern. SciPy Manual. https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.alexandergovern.html