ADescribe · Guide test 101
Pitman–Morgan test
Tests equal variances in paired, bivariate normal observations using the correlation of sums and differences.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Paired variance test — Do two measurements on the same subjects have the same spread?
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
Your data
Two measures on the same peopleIf H₀ were true
- The reference: how t varies across samples when H₀ is true.
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = < .001).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- sums and differences: correlated only if the variances differ
- 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, 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
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.
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))
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.5095887Sources
- PairedData — PairedData · Variance and Pitman–Morgan testssearch.r-project.org
- Var.testsearch.r-project.org
- 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.