Skip to content

BCompare groups · Guide test 276

Cauchy combination test

Combines tangent transformed p values with useful tail approximations under broad dependence conditions.

Runs in CodeSplashPython example validatedR example validated

Do it in CodeSplash

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

In Combine p-values (global test across studies), choose Combination method = Cauchy (ACAT).

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 · Cauchy combination test

10
1.20
0.50
0.050

Your data

Drag a point or use ↑/↓ to change it
p-values · n = 10 · mean 0.41

If H₀ were true

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

How the studies combine

Each p becomes a Cauchy deviate tan((½ − p)π); the smallest p-values dominate the average. Dashed gray: what k uniform p-values would look like.

The formula

T=∑i=1kwitan⁡ ⁣[π(12−pi)],pC=12−arctan⁡TπT=\sum_{i=1}^kw_i\tan\!\big[\pi(\tfrac12-p_i)\big],\qquad p_C=\tfrac12-\frac{\arctan T}{\pi}

With your numbers

T=3.62,wi=1/10T = 3.62,\quad w_i = 1/10
wiw_i
nonnegative weights summing to one (equal here)
TT
approximately standard Cauchy in the upper tail, the curve drawn, under broad dependence

The verdict

T = 3.62, p = .086

p > α = .050: compatible with H₀

Dominated by the smallest p-values and robust to dependence in the tail, so it suits genome-wide sets of tests; the approximation is for small p_C, not exact at every level.

Statistic
3.623
p-value
0.0857
Cauchy combination test on p-values: n = 10: T = 3.62, p = .086. The p-value is above α = .050, so the data are compatible with H0.

Cauchy combination test on p-values: n = 10: T = 3.62, p = .086. 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 and prespecified nonnegative weights summing to one. Exact Cauchy stability holds for independent components; broad dependent-tail validity requires the paper’s conditions.

Formula

T=∑iwitan⁡[π(1/2−pi)]pC=12−π−1arctan⁡T\begin{gathered}T=\sum_iw_i\tan[\pi(1/2-p_i)]\\[5pt] p_C=\tfrac12-\pi^{-1}\arctan T\end{gathered}

Parameters and notation

wi weights; numerical implementations use stable limits for extremely small/large p values.

Structure of the method

Transform each p value by tan[π(1/2−p)], average with nonnegative weights summing to one, and evaluate a standard Cauchy upper tail. Independent transformed uniforms have the exact stability property; dependent applications rely on the theorem’s tail conditions and approximation regime.

Estimated and nuisance parameters

The component probabilities and weighted statistic are computed outputs. Weights are prespecified information choices, not fitted neural parameters. The basic analytic calculation does not estimate a full dependence matrix, which is useful computationally but does not remove assumptions on valid inputs and dependence behavior.

Settings and design choices

Record weights, input direction conventions and the intended significance range. Implement stable small-p and near-one limits; direct tangent and 1/2−atan(T)/π arithmetic can overflow or cancel in extreme tails. Do not silently replace exact zero or one by an arbitrary epsilon without documenting why.

Fitting and adaptation

There is no fine-tuning stage. Validate the component analyses and use simulations under scientifically plausible dependence when applying the approximation outside a well-understood setting. If weights are learned or selected from outcomes, incorporate that selection into a justified inference procedure.

Sensitivity and robustness

Near-zero and near-one p values can create large opposing terms and severe cancellation. Strong dependence, discreteness and finite-sample component miscalibration deserve explicit checks. The moderate-p baseline example is numerically illustrative; production genomic-scale tails need a stable implementation and sensitivity assessment.

How to use and calibrate

Use the upper standard Cauchy tail; interpret dependent calibration as a tail approximation under its conditions.

Example application

Aggregate sparse evidence across highly related tests.

Interpretation and pitfalls

Watch out

It is not an exact finite-sample guarantee for every arbitrary dependence structure. Opposing extreme p values require numerical care.

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

Cauchy combination with equal nonnegative weights summing to one. Extreme p-values need numerically stable tail handling; arbitrary finite-sample dependence does not make every resulting p-value exact.

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)
p=np.array([.01,.04,.2,.5,.1])
w=np.ones(len(p))/len(p);T=np.sum(w*np.tan(np.pi*(.5-p)));print(T,.5-np.arctan(T)/np.pi)
Output
8.838079299945221 0.03586320743778282
R

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

p<-c(.01,.04,.2,.5,.1)
w<-rep(1/length(p),length(p));T<-sum(w*tan(pi*(.5-p)));pc<-.5-atan(T)/pi;print(c(statistic=T,p=pc))
Output
 statistic          p 
8.83807930 0.03586321

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 276, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT276.