Skip to content

Combining p-values

Fisher, Stouffer, Tippett, Simes and the rest each test a global null but look for different patterns. Choose before you look, and know what a small combined p does not say.

Advanced ~17 min10 steps

What runs in CodeSplash

You will be able to

  • State the global null that every combination method tests
  • Match Fisher, Stouffer, Edgington, Tippett, Simes and higher criticism to the pattern each detects
  • Explain why correlated tests need Brown or the Cauchy combination

Read first

01

When all you have is p-values

Read

Sometimes studies report only p-values. Combining themCombining p-valuesOne test of "every component null holds" from several independent tests' p-values. tests one thing: the global null that every component null is true.

Five trials give p-values with a minimum of 0.01, and 2 of the 5 are below 0.05. Fisher's method gives p = .006.

A small combined p says "at least one null is probably false." It doesn't say all are, which ones, or how large the effect is.

02

Build Fisher's statistic

Explore

Fisher's statistic adds logs, so one tiny p can dominate:

X2=−2∑i=1kln⁡pi∼χ2k2under the global nullX^2 = -2 \sum_{i=1}^{k} \ln p_i \sim \chi^2_{2k} \quad \text{under the global null}

Change the p-values and watch which ones move the statistic.

BExplorable · Fisher combined probability test

Is there any real effect among k independent studies?

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

χ² = 27.67
  1. The reference: how χ² 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 = .118).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

X2=−2∑i=1kln⁡pi∼χ2k2X^2 = -2\sum_{i=1}^{k}\ln p_i\sim\chi^2_{2k}

With your numbers

X2=27.67,k=10X^2 = 27.67,\quad k = 10
pip_i
one-sided p-values of independent studies

The verdict

χ²(20) = 27.67, p = .118

p > α = .050: compatible with H₀

Driven by the smallest p-values: one strong study can carry it. Choose the combination method before seeing the results.

Statistic
27.665
p-value
0.1176
Fisher combined probability test on p-values: n = 10: χ²(20) = 27.67, p = .118. The p-value is above α = .050, so the data are compatible with H0.

Fisher combined probability test on p-values: n = 10: χ²(20) = 27.67, p = .118. The p-value is above α = .050, so the data are compatible with H₀.

Stouffer's method adds z-scores instead, so it responds to steady moderate evidence:

BExplorable · Stouffer Z test

Do the studies point the same way on balance?

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

z = 1.15
  1. The reference: how z 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 = .124).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

Z=1k∑i=1kΦ−1(1−pi)Z = \dfrac{1}{\sqrt k}\sum_{i=1}^{k}\Phi^{-1}(1-p_i)

With your numbers

Z=1.15,k=10Z = 1.15,\quad k = 10
Φ−1(1−pi)\Phi^{-1}(1-p_i)
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 H0.

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₀.

Two-sided p-values and the direction of effects

Two-sided p-values hide the direction. Eight studies where two point the other way would all look like support. Give the effect estimates as Effect directions, and Stouffer turns each two-sided p into a signed z, zi=sign⁡(ei) Φ−1(1−pi/2)z_i = \operatorname{sign}(e_i)\,\Phi^{-1}(1 - p_i/2), so opposite effects cancel; the combined ZZ is then tested two-sided. On eight simulated studies the signed combination gives p < .001, while Fisher, which ignores direction, gives p < .001.

Check yourself

Two of eight studies found the effect in the opposite direction, with two-sided p-values. Which combination accounts for that?

Show the answer

Answer: b

A two-sided p says how surprising a result is in either direction. Only the signed Stouffer combination uses the sign; the other methods treat opposite effects as support.

03

One signal or many?

Predict

Predict first

You have twenty tests. Four have small p-values; the other sixteen look like noise.

Which method's p-value will come out smallest on this pattern?

FisherStoufferSimes
Reveal

Fisher: p = .006. Simes: p = .020. Stouffer: p = .045. Stouffer is diluted by the sixteen nulls. Edgington does worst of the classics, at p = .155: its sum barely notices a few small values.

Higher criticism gives p = .242 here. It was built for sparse signals among very many tests, and twenty is few for it.

04

A family of questions

Read
MethodMost sensitive to
FisherOne or a few very small p-values
LancasterFisher with weights
StoufferConsistent evidence across studies
EdgingtonAll p-values being smallish
Mudholkar–GeorgeBetween Fisher and Stouffer
TippettThe single smallest p
WilkinsonThe r-th smallest p
SimesA few small p-values; valid under many dependence patterns
Higher criticismSparse, weak signals
BrownFisher for correlated tests
Cauchy (ACAT)A few strong signals; robust to dependence
05

The same p-values, every method

Read
Combined test: Fisher (−2 Σ log p)Recorded · Python and R agreeRecorded 2026-11-21 · 18 values compared
R

Fisher (−2 Σ log p) combination of k = 5 tests: 24.86, p = .006

Combined statistic
24.858
p (global null)
.006
Tests combined
5

Plots

Observed p-values against the uniform nullAre there more small p-values than chance alone would give?
View data
testp
Trial A0.0100
Trial B0.0400
Trial C0.2000
Trial D0.5000
Trial E0.1000
Distribution of the component p-valuesDo the p-values pile up near zero, or spread flat as under the null?
View data
p
0.0100
0.0400
0.2000
0.5000
0.1000
Every method on the same p-values (sensitivity)Would other combination methods have reached a different answer on these p-values?
View data
chosenmethodcombined p
chosenFisher (−2 Σ log p)0.0056
Stouffer Z (weighted)0.0028
Tippett (minimum p)0.0490
Edgington (sum of p)0.0037
Lancaster (weighted χ²)0.0079
Wilkinson (r-th smallest p)0.0490
Simes0.0500
Brown (dependent Fisher)0.0056
Cauchy combination (ACAT)0.0359
Higher criticism0.0017
Mudholkar–George (logit)0.0035

Assumptions

  • Valid p-values — All 5 p-values lie in (0, 1].
  • Independent tests — This method assumes the tests are independent; with correlated tests use Brown, Simes or Cauchy.

Component tests

Testp
Trial A0.0100
Trial B0.0400
Trial E0.1000
Trial C0.2000
Trial D0.5000

Every method on the same p-values (sensitivity; the chosen one counts)

MethodStatisticReferencep
Fisher (−2 Σ log p)24.858χ²(10)0.0056chosen
Stouffer Z (weighted)2.773N(0, 1)0.0028
Tippett (minimum p)0.0100Beta(1, 5)0.0490
Edgington (sum of p)0.8500Irwin–Hall(5)0.0037
Lancaster (weighted χ²)15.656χ²(5)0.0079
Wilkinson (r-th smallest p)0.0100Beta(1, 5)0.0490
Simes0.0500Simes0.0500
Brown (dependent Fisher)24.8581·χ²(10)0.0056
Cauchy combination (ACAT)8.838standard Cauchy0.0359
Higher criticism3.354Monte Carlo, 10000 null draws0.0017
Mudholkar–George (logit)2.902t(29)0.0035
  • The method was fixed before the results: the other rows are a sensitivity check, not alternatives to pick from.
The exact R script · R R version 4.5.1 (2025-06-13)
# Combine p-values (global test across studies)
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method meta.combine_p 1.1.0 · spec cce5975d0878ff0d
# Dataset: m1_pvalues (version 1)
# Runs on its own: outside the app, cs_publish() writes $CS_RESULT_PATH or prints the result JSON.

# %% Setup
library(codesplashr) # cs_meta_combine_p (twin of codesplash.stats.meta)

# %% Data
df <- as.data.frame(nanoparquet::read_parquet("tests/parity/fixtures/m1_pvalues.parquet", col_select = c("p", "test")))
n_input <- nrow(df)
df[["test"]] <- factor(df[["test"]], levels = c("Trial A", "Trial B", "Trial C", "Trial D", "Trial E"))  # stored level order
df <- df[stats::complete.cases(df[c("p", "test")]), , drop = FALSE]  # listwise deletion
df[] <- lapply(df, function(x) if (is.factor(x)) droplevels(x) else x)
n_dropped <- n_input - nrow(df)
warnings <- list()
if (n_dropped > 0) {
  warnings <- c(warnings, cs_warning("CS_W_ROWS_DROPPED", dropped = n_dropped, total = n_input))
}
if (n_input > 0 && nrow(df) == 0) cs_error("CS_E_NO_ROWS")
cs_check_finite_columns(df, c("p", "test"))  # infinite values stop the run (registry/errors.yaml)

# %% Combine
p <- as.numeric(df[["p"]])
if (length(p) < 2) cs_error("CS_E_TOO_FEW_ROWS", what = "Combining p-values", min = 2, n = length(p))
n_bad <- sum(p <= 0 | p > 1)
if (n_bad > 0) cs_error("CS_E_INVALID_VALUES", column = "p", requirement = "a p-value in (0, 1]", count = n_bad)
labels <- as.character(df[["test"]])
weights <- NULL
method <- "fisher"  # chosen before looking at the results
res <- cs_meta_combine_p(p, method, weights, r = 1, rho = 0, sides = "two",
                         hc_alpha0 = 0.5, b = 10000, seed = 42)
chosen <- res$chosen
k <- length(p)
by <- setNames(res$all, cs_meta_combine_methods)

# %% Assumptions
assumptions <- list(
  list(key = "valid", label = "Valid p-values", status = if (all(p > 0 & p <= 1)) "pass" else "fail",
       detail = paste0(sprintf("All %d p-values lie in (0, 1].", k),
                       if (any(p == 1)) " Some equal 1: methods that need an open interval move them inside by 1e-12." else "")),
  list(key = "independence", label = "Independent tests", status = "info",
       detail = if (method == "brown") "Brown's scaled χ² accounts for the stated correlation."
                else if (method == "cauchy") "Valid under arbitrary dependence for small combined p."
                else if (method == "simes") "Valid under positive dependence."
                else "This method assumes the tests are independent; with correlated tests use Brown, Simes or Cauchy.")
)

# %% Result
rows <- lapply(res$all, function(r) list(method = r$label, statistic = r$statistic, reference = r$reference, p = r$p,
                                         chosen = if (r$method == method) "chosen" else ""))
ord <- order(p, method = "radix")
values <- list(k = k, statistic = chosen$statistic, p = chosen$p, df = chosen$df, method_label = chosen$label,
               min_p = min(p), n_below_05 = sum(p < 0.05))
for (m in cs_meta_combine_methods) values[[paste0("p_", m)]] <- by[[m]]$p
cs_publish(list(
  method = "meta.combine_p",
  methodVersion = "1.1.0",
  title = paste0("Combined test: ", chosen$label),
  engine = cs_engine_info("stats", "nanoparquet"),
  n = k,
  summary = sprintf("%s combination of %d p-values: statistic %s against %s, %s.", chosen$label, k, format(signif(chosen$statistic, 4)),
                    chosen$reference, cs_fmt_p(chosen$p)),
  apa = sprintf("%s combination of k = %d tests: %s, %s", chosen$label, k, cs_fmt_num(chosen$statistic), cs_fmt_p(chosen$p)),
  statistics = list(
    list(key = "statistic", label = "Combined statistic", value = chosen$statistic),
    list(key = "p", label = "p (global null)", value = chosen$p, format = "p"),
    list(key = "k", label = "Tests combined", value = k, format = "integer")
  ),
  tables = list(
    list(key = "components", title = "Component tests", columns = list(list(key = "label", label = "Test", type = "string"), list(key = "p", label = "p", type = "number")),
         rows = lapply(ord, function(i) list(label = labels[i], p = p[i]))),
    list(key = "methods", title = "Every method on the same p-values (sensitivity; the chosen one counts)",
         columns = list(list(key = "method", label = "Method", type = "string"), list(key = "statistic", label = "Statistic", type = "number"),
                        list(key = "reference", label = "Reference", type = "string"), list(key = "p", label = "p", type = "number"),
                        list(key = "chosen", label = "", type = "string")),
         rows = rows)
  ),
  assumptions = assumptions,
  warnings = warnings,
  notes = list("The method was fixed before the results: the other rows are a sensitivity check, not alternatives to pick from."),
  charts = list(
    cs_chart("pvalue_qq", "pvalue-qq", "Observed p-values against the uniform null", list(p = cs_col("p", p), label = cs_col("test", labels))),
    cs_chart("pvalue_hist", "pvalue-histogram", "Distribution of the component p-values", list(p = cs_col("p", p)), controls = list(bins = 10)),
    cs_chart("methods", "combine-compare", "Every method on the same p-values (sensitivity)",
             list(method = cs_col("method", vapply(rows, function(r) r$method, "")), p = cs_col("combined p", vapply(rows, function(r) r$p, 0)),
                  chosen = cs_col("chosen", vapply(rows, function(r) r$chosen, ""))))
  ),
  values = values
))
Python

Fisher (−2 Σ log p) combination of k = 5 tests: 24.86, p = .006

Combined statistic
24.858
p (global null)
.006
Tests combined
5

To keep this page light, the plots are shown once, under the R tab.

Assumptions

  • Valid p-values — All 5 p-values lie in (0, 1].
  • Independent tests — This method assumes the tests are independent; with correlated tests use Brown, Simes or Cauchy.

Component tests

Testp
Trial A0.0100
Trial B0.0400
Trial E0.1000
Trial C0.2000
Trial D0.5000

Every method on the same p-values (sensitivity; the chosen one counts)

MethodStatisticReferencep
Fisher (−2 Σ log p)24.858χ²(10)0.0056chosen
Stouffer Z (weighted)2.773N(0, 1)0.0028
Tippett (minimum p)0.0100Beta(1, 5)0.0490
Edgington (sum of p)0.8500Irwin–Hall(5)0.0037
Lancaster (weighted χ²)15.656χ²(5)0.0079
Wilkinson (r-th smallest p)0.0100Beta(1, 5)0.0490
Simes0.0500Simes0.0500
Brown (dependent Fisher)24.8581·χ²(10)0.0056
Cauchy combination (ACAT)8.838standard Cauchy0.0359
Higher criticism3.354Monte Carlo, 10000 null draws0.0017
Mudholkar–George (logit)2.902t(29)0.0035
  • The method was fixed before the results: the other rows are a sensitivity check, not alternatives to pick from.
The exact Python script · Python Python 3.13.5 · scipy 1.18.1 · pandas 3.1.0
# Combine p-values (global test across studies)
# Generated by CodeSplash Analytics 1.0.0 on 2026-11-09 · method meta.combine_p 1.1.0 · spec cce5975d0878ff0d
# Dataset: m1_pvalues (version 1)
# Runs on its own: outside the app, cs.publish() writes $CS_RESULT_PATH or prints the result JSON.

# %% Setup
import numpy as np
import pandas as pd

import codesplash as cs
from codesplash.stats import meta  # combination tests (twins of codesplashr::cs_meta_*)

# %% Data
df = pd.read_parquet("tests/parity/fixtures/m1_pvalues.parquet", columns=["p", "test"])
n_input = len(df)
df["test"] = pd.Categorical(df["test"], categories=["Trial A", "Trial B", "Trial C", "Trial D", "Trial E"])  # stored level order
df = df.dropna(subset=["p", "test"])  # listwise deletion over the analysis columns
df["test"] = df["test"].cat.remove_unused_categories()
n_dropped = n_input - len(df)
warnings = []
if n_dropped:
    warnings.append(cs.cs_warning("CS_W_ROWS_DROPPED", dropped=n_dropped, total=n_input))
if n_input and not len(df):
    cs.cs_error("CS_E_NO_ROWS")
cs.check_finite_columns(df, ["p", "test"])  # infinite values stop the run (registry/errors.yaml)

# %% Combine
p = df["p"].to_numpy(dtype=float)
if len(p) < 2:
    cs.cs_error("CS_E_TOO_FEW_ROWS", what="Combining p-values", min=2, n=len(p))
n_bad = int(np.sum((p <= 0) | (p > 1)))
if n_bad:
    cs.cs_error("CS_E_INVALID_VALUES", column="p", requirement="a p-value in (0, 1]", count=n_bad)
labels = df["test"].astype(str).tolist()
weights = None
method = "fisher"  # chosen before looking at the results
res = meta.combine_p(p, method, weights, r=1, rho=0, sides="two",
                     hc_alpha0=0.5, b=10000, seed=42)
chosen = res["chosen"]
k = len(p)
by = {r["method"]: r for r in res["all"]}

# %% Assumptions
assumptions = [
    {"key": "valid", "label": "Valid p-values", "status": "pass" if np.all((p > 0) & (p <= 1)) else "fail",
     "detail": f"All {k} p-values lie in (0, 1]." + (" Some equal 1: methods that need an open interval move them inside by 1e-12." if np.any(p == 1) else "")},
    {"key": "independence", "label": "Independent tests", "status": "info",
     "detail": ("Brown's scaled χ² accounts for the stated correlation." if method == "brown" else
                "Valid under arbitrary dependence for small combined p." if method == "cauchy" else
                "Valid under positive dependence." if method == "simes" else
                "This method assumes the tests are independent; with correlated tests use Brown, Simes or Cauchy.")},
]

# %% Result
rows = [{"method": r["label"], "statistic": r["statistic"], "reference": r["reference"], "p": r["p"], "chosen": "chosen" if r["method"] == method else ""} for r in res["all"]]
order = np.argsort(p, kind="stable")
cs.publish({
    "method": "meta.combine_p",
    "methodVersion": "1.1.0",
    "title": f"Combined test: {chosen['label']}",
    "engine": cs.engine_info("numpy", "scipy"),
    "n": k,
    "summary": f"{chosen['label']} combination of {k} p-values: statistic {chosen['statistic']:.4g} against {chosen['reference']}, {cs.fmt_p(chosen['p'])}.",
    "apa": f"{chosen['label']} combination of k = {k} tests: {cs.fmt_num(chosen['statistic'])}, {cs.fmt_p(chosen['p'])}",
    "statistics": [
        {"key": "statistic", "label": "Combined statistic", "value": chosen["statistic"]},
        {"key": "p", "label": "p (global null)", "value": chosen["p"], "format": "p"},
        {"key": "k", "label": "Tests combined", "value": k, "format": "integer"},
    ],
    "tables": [
        {"key": "components", "title": "Component tests", "columns": [{"key": "label", "label": "Test", "type": "string"}, {"key": "p", "label": "p", "type": "number"}],
         "rows": [{"label": labels[i], "p": float(p[i])} for i in order]},
        {"key": "methods", "title": "Every method on the same p-values (sensitivity; the chosen one counts)",
         "columns": [{"key": "method", "label": "Method", "type": "string"}, {"key": "statistic", "label": "Statistic", "type": "number"},
                     {"key": "reference", "label": "Reference", "type": "string"}, {"key": "p", "label": "p", "type": "number"},
                     {"key": "chosen", "label": "", "type": "string"}],
         "rows": rows},
    ],
    "assumptions": assumptions,
    "warnings": warnings,
    "notes": ["The method was fixed before the results: the other rows are a sensitivity check, not alternatives to pick from."],
    "charts": [
        cs.chart("pvalue_qq", "pvalue-qq", "Observed p-values against the uniform null",
                 {"p": cs.col("p", [float(v) for v in p]), "label": cs.col("test", labels)}),
        cs.chart("pvalue_hist", "pvalue-histogram", "Distribution of the component p-values",
                 {"p": cs.col("p", [float(v) for v in p])}, controls={"bins": 10}),
        cs.chart("methods", "combine-compare", "Every method on the same p-values (sensitivity)",
                 {"method": cs.col("method", [r["method"] for r in rows]), "p": cs.col("combined p", [float(r["p"]) for r in rows]),
                  "chosen": cs.col("chosen", [r["chosen"] for r in rows])}),
    ],
    "values": {
        "k": k, "statistic": float(chosen["statistic"]), "p": float(chosen["p"]), "df": float(chosen["df"]),
        "method_label": chosen["label"], "min_p": float(p.min()), "n_below_05": int(np.sum(p < 0.05)),
        **{f"p_{m}": float(by[m]["p"]) for m in meta.COMBINE_METHODS},
    },
})

On those five trials:

  • Fisher p = .006, Stouffer p = .003, Edgington p = .004, Mudholkar–George p = .004.
  • Tippett p = .049, Wilkinson (r = 2) p = .015, Simes p = .050, Cauchy p = .036.
  • Higher criticism p = .002. Its null is simulated, so it comes from Monte Carlo draws.

That spread is why you must choose before looking. Picking the smallest is p-hacking.

06

Correlated tests

Read

Fisher and Stouffer assume independent tests. If the p-values come from overlapping samples or related outcomes, they overstate the evidence.

With a correlation of ρ=0.3\rho = 0.3, Brown's method moves Fisher from p = .006 to p = .013, and Stouffer with the same ρ\rho moves to p = .031.

Direction matters as well. Two-sided p-values lose direction: a strong result each way combines into "something" when the effects cancel. Use one-sided p-values with Component tests are set to one-sided if you can.

07

Locked before results

Reflect

In the Meta-analysis studio, the Combine p-values step asks you to choose and lock the method before showing the result, and records the choice in the multiple-testing ledger. Later changes are recorded and reported too.

Why does it matter that a change is shown rather than blocked? Think about what a reader of your report can check.

08

Check your understanding

Checkpoint

Check yourself

Fisher's combined test gives p = 0.001 across eight studies. What can you conclude?

Show the answer

Answer: b

The global null is rejected. That says nothing about how many studies have effects, which ones, or their size.

Check yourself

Fisher's statistic is compared with a χ2\chi^2 on 2k2k degrees of freedom. With five p-values, how many df?

Show the answer

Answer: 10

2×5=102 \times 5 = 10.

Check yourself

You expect a small, similar effect in every study, and no study is individually significant. Which method is the natural choice?

Show the answer

Answer: b

Stouffer accumulates consistent moderate evidence. Tippett and Simes look at the smallest p-values, and higher criticism targets sparse signals.

Check yourself

Your five tests use the same patients on related outcomes. What should you change?

Show the answer

Answer: a

Correlated tests carry less independent information than Fisher's χ2\chi^2 assumes, so its p-value comes out too small.

09

Do it in CodeSplash

In the app

Start from the template Combine p-values in the Meta-analysis studio to get the method lock, or run it in Analyze.

Python
import numpy as np
import pandas as pd
from scipy import stats

p = pd.read_csv("m1_pvalues.csv")["p"].to_numpy()

fisher = stats.chi2.sf(-2 * np.log(p).sum(), 2 * len(p))
stouffer = stats.norm.sf(stats.norm.isf(p).sum() / np.sqrt(len(p)))
print(fisher, stouffer)
R
p <- read.csv("m1_pvalues.csv")$p

fisher <- pchisq(-2 * sum(log(p)), 2 * length(p), lower.tail = FALSE)
stouffer <- pnorm(sum(qnorm(p, lower.tail = FALSE)) / sqrt(length(p)),
                  lower.tail = FALSE)
c(fisher, stouffer)
10

Recap

Recap
  • Every combination method tests the global null, and none says which studies have effects.
  • Fisher, Tippett and Simes respond to a few strong results; Stouffer and Edgington to broad evidence.
  • Choose before you look, handle dependence, and report effect sizes when you have them.

Concepts in this lesson