BCompare groups · Guide test 275
Brown combined probability test
Adapts Fisher’s combination statistic for dependent tests by matching moments.
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 = Brown.
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 · Brown combined probability test
The studies' z-statistics share this correlation (e.g. overlapping samples).
Your data
Drag a p-value or use ↑/↓ to change itIf H₀ were true
- The reference: how X/c varies across samples when H₀ is true (scaled χ² matching the mean and variance under correlation ρ (Kost–McDermott)).
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .622).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
How the studies combine
Fisher's −2 Σ log p, rescaled because correlated studies make the sum more variable than χ²(2k). Dashed gray: what k uniform p-values would look like.
The formula
With your numbers
- the mean of Fisher's X, unchanged by dependence
- its variance: 4k plus the covariances from the correlation ρ (Kost–McDermott)
The verdict
X/c(4.77) = 3.30, p = .622
p > α = .050: compatible with H₀
Correlated studies make Fisher's X more variable, so plain Fisher would reject too often. Brown is only as good as the stated correlation; it cannot recover it from the p-values.
- Statistic
- 3.302
- p-value
- 0.6219
Brown combined probability test on p-values: n = 10: X/c(4.77) = 3.30, p = .622. 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 dependent p values and a trustworthy estimate/model of covariance among their transformed values; a moment-matched approximation.
Formula
Parameters and notation
E=2k for uniform components; V=4k+2Σi<j Cov(−2log pi,−2log pj). Empirical Brown estimates covariance from underlying data.
Structure of the method
Retain Fisher’s log-sum statistic but match its first two null moments to a scaled chi-square distribution. The covariance of transformed p values determines the scale and effective degrees of freedom. The procedure is an approximation to a dependent null distribution, not an exact distribution-free repair.
Estimated and nuisance parameters
Estimated nuisance quantities are the covariance terms among −2 log p values, or the underlying empirical quantities used by the selected Brown variant. With uniform marginal p values the mean is 2k; variance estimation determines both the scale c and degrees of freedom ν.
Settings and design choices
Choose the covariance/reference-data strategy, transformation, eligible test set and numerical safeguards before inspecting combined significance. Record whether covariance comes from a model, null simulations or the empirical Brown procedure. Raw-data Pearson correlation is not generally the covariance required by the displayed formula.
Fitting and adaptation
For a new domain, refit or re-estimate the null dependence using suitable data and assess calibration by null simulations that replicate the component tests. More reference simulations reduce Monte Carlo uncertainty, but they do not fix an incorrectly specified dependence model.
Sensitivity and robustness
Small reference samples and nearly redundant tests can produce unstable effective degrees of freedom. Check positive variance, numerical conditioning and sensitivity to influential covariance estimates. The baseline code uses simulated null p values and is a moment-matching demonstration, not the complete empirical-CDF algorithm of the Bioconductor package.
How to use and calibrate
Use P(χ²ν≥T/c); state how covariance was estimated.
Example application
Combine correlated evidence from related measurements.
Interpretation and pitfalls
Watch out
This is an approximation, not an exact universal correction. Estimated dependence can be unstable in small samples.
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
Brown moment-matched scaled chi-square approximation. Covariance is estimated from an explicit simulated joint null, not inferred from five observed p-values; application requires a defensible null dependence model.
Validated — Executed successfully in the validation environment · needs numpy, scipy
import numpy as np
from scipy import stats
rng = np.random.default_rng(2026)
k=5;B=5000;Sigma=np.full((k,k),.3);np.fill_diagonal(Sigma,1)
Z=rng.multivariate_normal(np.zeros(k),Sigma,size=B);nullP=2*stats.norm.sf(abs(Z))
V=np.cov(-2*np.log(nullP),rowvar=False);mu=2*k;variance=V.sum();cscale=variance/(2*mu);df=2*mu**2/variance
p=np.array([.01,.04,.2,.5,.1]);T=-2*np.log(p).sum();print(cscale,df,stats.chi2.sf(T/cscale,df))
Output
1.357285287329542 7.367647828611621 0.013268046173412307
Validated — Executed successfully in the validation environment · needs Base/standard library
set.seed(2026)
k<-5;B<-5000;Sigma<-matrix(.3,k,k);diag(Sigma)<-1;Z<-matrix(rnorm(B*k),B,k)%*%chol(Sigma)
# Reference covariance must describe the joint null distribution.
nullP<-2*pnorm(-abs(Z));V<-cov(-2*log(nullP));mu<-2*k;variance<-sum(V);cscale<-variance/(2*mu);df<-2*mu^2/variance
p<-c(.01,.04,.2,.5,.1);T<--2*sum(log(p));print(c(scale=cscale,df=df,p=pchisq(T/cscale,df,lower.tail=FALSE)))
Output
scale df p 1.3675051 7.3125868 0.0135118
Sources
- Empirical Brown method documentationbioconductor.org
- ebmVignettebioconductor.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 275, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT275.