BCompare groups · Guide test 269
Stouffer Z test
Combines independent signed normal scores, optionally with weights.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Combine p-values (global test across studies) — Taken together, do several independent tests of the same question show an effect anywhere?
In Combine p-values (global test across studies), choose Combination method = Stouffer Z.
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 · Stouffer Z test
Your data
Drag a point or use ↑/↓ to change itIf H₀ were true
- The reference: how z 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 = .124).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- each study's z score
The verdict
Z = 1.15, z = 1.15, p = .124
p > α = .050: compatible with H₀
Rewards consistent moderate evidence more than Fisher does, and allows weights (e.g. √n).
- Statistic
- 1.154
- p-value
- 0.1242
Stouffer Z test on p-values: n = 10: Z = 1.15, z = 1.15, p = .124. The p-value is above α = .050, so the data are compatible with H₀.
Question and hypotheses
H0: all component null hypotheses hold; H1: at least one fails.
Assumptions
Valid component p values for the individual nulls; a prespecified combination and study/test set. Exact formulas below generally assume independent continuous Uniform(0,1) p values under the complete null; dependence requires a justified adjustment.
Formula
Parameters and notation
wi are prespecified nonnegative weights, often √sample size. With known dependence replace denominator by √(wᵀRw), where R is the null Z correlation matrix.
Structure of the method
Map compatible one-sided p values to normal scores, take their prespecified weighted sum and standardize by its null standard deviation. With correlated scores, a known or credibly estimated null correlation matrix replaces the independent sum-of-squared-weights denominator.
Estimated and nuisance parameters
The normal scores are transformed observations, not fitted effects. Weights are fixed information choices unless a valid adaptive procedure is explicitly developed. A dependence-adjusted version estimates a nuisance correlation matrix; those correlations refer to the null normal scores, not arbitrary raw measurements.
Settings and design choices
Choose equal weights or a scientifically justified information scheme such as square-root sample sizes before inspecting outcomes. Align positive directions across studies. If starting from two-sided p values, retain effect signs and state the signed-score construction rather than pretending direction was present in the p values.
Fitting and adaptation
No neural optimization is applicable. For a new collection, validate component inference, direction coding and weighting. Estimate dependence from suitable null/reference information or calibrate the full weighted score by a justified resampling scheme. Do not fit significance weights on the same evidence being combined.
Sensitivity and robustness
Large conflicting effects can cancel in signed scores, which may be desirable for a directional question but differs from Fisher combination. Extreme p values need stable normal inverse-survival evaluation. Weight imbalance, discrete tests, estimated correlations and overlapping subjects can change both power and calibration.
How to use and calibrate
Use the upper normal tail; ensure component directions are aligned.
Example application
Combine independent directional evidence with sample-size weights.
Interpretation and pitfalls
Watch out
Weights chosen from significance can invalidate inference. Two-sided p values discard direction unless explicitly restored.
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
These standard calibrations assume independent, valid null p-values. Combine tests of a coherent global null and align directional alternatives before aggregation.
Validated — Executed successfully in the validation environment · needs numpy, scipy
import numpy as np
from scipy import stats
rng = np.random.default_rng(2026)
p=np.array([.01,.04,.2,.5,.1])
print(stats.combine_pvalues(p,method="stouffer"))
Output
SignificanceResult(statistic=np.float64(2.772816751010919), pvalue=np.float64(0.0027786702716320606))
Not run — Syntax checked; runtime not verified in the final environment · needs metap
p<-c(.01,.04,.2,.5,.1)
print(metap::sumz(p))
Sources
- metap — metap · sumzAuthor documentation/source reviewed: metap 1.14.search.r-project.org
- sumzsearch.r-project.org
- Statistics guide v4 (historical):
- R: Syntax checked; runtime not verified in the final 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 269, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT269.