Skip to content

ADescribe · Guide test 101

Pitman–Morgan test

Tests equal variances in paired, bivariate normal observations using the correlation of sums and differences.

Runs in CodeSplashPython example validatedR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In Paired variance test, choose Test = Pitman–Morgan.

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Pitman–Morgan test

25
0.50
1.60
0.050

Your data

Two measures on the same people
Measure 1 · n = 25 · mean 10.32Measure 2 · n = 25 · mean 10.11

If H₀ were true

t = 5.25
  1. The reference: how t varies across samples when H₀ is true.
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = < .001).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

t=rsdn−21−rsd2,rsd=cor⁡(x+y, x−y)t=r_{sd}\sqrt{\dfrac{n-2}{1-r_{sd}^2}},\quad r_{sd}=\operatorname{cor}(x+y,\ x-y)

With your numbers

rsd=0.74,t=5.25,s12/s22=4.28r_{sd} = 0.74,\qquad t = 5.25,\qquad s_1^2/s_2^2 = 4.28
x+y, x−yx+y,\ x-y
sums and differences: correlated only if the variances differ
n−2n-2
df

The verdict

t(23) = 5.25, p < .001, s₁²/s₂² = 4.28

p ≤ α = .050: reject H₀

Effect size: variance ratio s₁²/s₂² = 4.277

Equal variances of paired measures is the same as zero correlation between their sums and differences, so the test is a correlation t test. It assumes bivariate normality.

Statistic
5.252
p-value
0.0000
Pitman–Morgan test on Measure 1: n = 25; Measure 2: n = 25: t(23) = 5.25, p < .001, s1²/s2² = 4.28. The p-value is below α = .050, so the data are hard to reconcile with H0.

Pitman–Morgan test on Measure 1: n = 25; Measure 2: n = 25: t(23) = 5.25, p < .001, s₁²/s₂² = 4.28. The p-value is below α = .050, so the data are hard to reconcile with H₀.

Question and hypotheses

H0: paired normal measurements have equal marginal variances.

Assumptions

Independent pairs drawn from a bivariate normal distribution; nondegenerate sums and differences.

Formula

Si=Xi+YiDi=Xi−Yit=rSDn−21−rSD2\begin{gathered}S_i=X_i+Y_i\\[5pt] D_i=X_i-Y_i\\[5pt] t=r_{SD}\sqrt{\frac{n-2}{1-r_{SD}^2}}\end{gathered}

Parameters and notation

Cov(S,D)=Var(X)−Var(Y); rSD is their sample correlation; df=n−2.

Structure of the method

Transform each paired observation into its sum and difference, then test their Pearson correlation against zero. The covariance identity Cov(X+Y,X-Y)=Var(X)-Var(Y) converts equality of marginal variances into a correlation null under the bivariate-normal paired sampling model.

Estimated and nuisance parameters

Estimate means and variances of sums and differences and their correlation. Original within-pair covariance is retained through the transformation rather than discarded. The target is equality of marginal variances, not equality of means or absence of association between the original measurements.

Settings and design choices

Choose paired alignment, alternative direction, missing-pair policy, and variance-ratio target. The displayed sum/difference construction corresponds to ratio one; other targets require a suitably rescaled formulation. Keep the sign of X-Y consistent with any one-sided scientific claim.

Fitting and adaptation

Refit on complete independent pairs whenever observations change. A parametric null simulation should preserve a plausible within-pair covariance and equal marginal variances, then recompute sums and differences. Fine-tuning is irrelevant; arbitrary independent resampling of X and Y destroys the paired design.

Sensitivity and robustness

Nonnormality and outliers affect the exact correlation reference. Nearly identical measurements can make differences almost constant, causing degeneracy. A significant result concerns precision under the model; it does not establish accuracy against a gold standard or acceptable agreement between instruments.

How to use and calibrate

Test zero correlation of sums and differences using the t reference.

Example application

Compare the precision of two methods measured on the same specimens.

Interpretation and pitfalls

Watch out

The independent F ratio ignores pairing. Nonnormal paired data require more robust alternatives.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Pitman–Morgan reduces equality of paired normal variances to zero correlation of sums and differences. This is a two-sided test.

Python · native

Validated — Executed successfully in the validation environment · needs numpy, scipy

import numpy as np
from scipy import stats
rng = np.random.default_rng(2026)
x = np.array([4.2,5.1,5.4,4.8,6.0,5.8,4.9,5.6,6.2,5.0])
y = np.array([4.0,4.4,4.8,5.0,5.1,4.3,4.7,4.6,5.2,4.9])
print(stats.pearsonr(x+y,x-y))
Output
PearsonRResult(statistic=np.float64(0.5095886679611455), pvalue=np.float64(0.1324336849482394))
R

Validated — Executed successfully in the validation environment · needs Base/standard library

x <- c(4.2,5.1,5.4,4.8,6.0,5.8,4.9,5.6,6.2,5.0)
y <- c(4.0,4.4,4.8,5.0,5.1,4.3,4.7,4.6,5.2,4.9)
print(cor.test(x+y,x-y))
Output
	Pearson's product-moment correlation

data:  x + y and x - y
t = 1.6752, df = 8, p-value = 0.1324
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 -0.176747  0.862486
sample estimates:
      cor 
0.5095887

Sources

Statistics guide v4 (historical):
R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: executed · R: not executed (Rscript unavailable). Python: Ran in the reference's review, on this exact code. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 101, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT101.