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.
What runs in CodeSplash
- STAT268Fisher combined probability test Runs in CodeSplash
- STAT269Stouffer Z test Runs in CodeSplash
- STAT270Tippett minimum p test Runs in CodeSplash
- STAT271Edgington sum of p test Runs in CodeSplash
- STAT272Lancaster combination test Runs in CodeSplash
- STAT273Wilkinson ordered p test Runs in CodeSplash
- STAT274Simes global test Runs in CodeSplash
- STAT275Brown combined probability test Runs in CodeSplash
- STAT276Cauchy combination test Runs in CodeSplash
- STAT277Higher criticism test Runs in CodeSplash
- STAT278Mudholkar–George logit combination test Runs in CodeSplash
- Combine p-values (global test across studies) Verified in Python and R
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
When all you have is p-values
ReadSometimes 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.
Build Fisher's statistic
ExploreFisher's statistic adds logs, so one tiny p can dominate:
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?
Your data
Drag a point or use ↑/↓ to change itIf H₀ were true
- The reference: how χ² 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 = .118).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- 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 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?
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₀.
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, , so opposite effects cancel; the combined 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.
One signal or many?
PredictPredict 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?
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.
A family of questions
Read| Method | Most sensitive to |
|---|---|
| Fisher | One or a few very small p-values |
| Lancaster | Fisher with weights |
| Stouffer | Consistent evidence across studies |
| Edgington | All p-values being smallish |
| Mudholkar–George | Between Fisher and Stouffer |
| Tippett | The single smallest p |
| Wilkinson | The r-th smallest p |
| Simes | A few small p-values; valid under many dependence patterns |
| Higher criticism | Sparse, weak signals |
| Brown | Fisher for correlated tests |
| Cauchy (ACAT) | A few strong signals; robust to dependence |
The same p-values, every method
ReadFisher (−2 Σ log p) combination of k = 5 tests: 24.86, p = .006
- Combined statistic
- 24.858
- p (global null)
- .006
- Tests combined
- 5
Plots
View data
| test | p |
|---|---|
| Trial A | 0.0100 |
| Trial B | 0.0400 |
| Trial C | 0.2000 |
| Trial D | 0.5000 |
| Trial E | 0.1000 |
View data
| p |
|---|
| 0.0100 |
| 0.0400 |
| 0.2000 |
| 0.5000 |
| 0.1000 |
View data
| chosen | method | combined p |
|---|---|---|
| chosen | Fisher (−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 | |
| Simes | 0.0500 | |
| Brown (dependent Fisher) | 0.0056 | |
| Cauchy combination (ACAT) | 0.0359 | |
| Higher criticism | 0.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
| Test | p |
|---|---|
| Trial A | 0.0100 |
| Trial B | 0.0400 |
| Trial E | 0.1000 |
| Trial C | 0.2000 |
| Trial D | 0.5000 |
Every method on the same p-values (sensitivity; the chosen one counts)
| Method | Statistic | Reference | p | |
|---|---|---|---|---|
| Fisher (−2 Σ log p) | 24.858 | χ²(10) | 0.0056 | chosen |
| Stouffer Z (weighted) | 2.773 | N(0, 1) | 0.0028 | |
| Tippett (minimum p) | 0.0100 | Beta(1, 5) | 0.0490 | |
| Edgington (sum of p) | 0.8500 | Irwin–Hall(5) | 0.0037 | |
| Lancaster (weighted χ²) | 15.656 | χ²(5) | 0.0079 | |
| Wilkinson (r-th smallest p) | 0.0100 | Beta(1, 5) | 0.0490 | |
| Simes | 0.0500 | Simes | 0.0500 | |
| Brown (dependent Fisher) | 24.858 | 1·χ²(10) | 0.0056 | |
| Cauchy combination (ACAT) | 8.838 | standard Cauchy | 0.0359 | |
| Higher criticism | 3.354 | Monte Carlo, 10000 null draws | 0.0017 | |
| Mudholkar–George (logit) | 2.902 | t(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
))
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
| Test | p |
|---|---|
| Trial A | 0.0100 |
| Trial B | 0.0400 |
| Trial E | 0.1000 |
| Trial C | 0.2000 |
| Trial D | 0.5000 |
Every method on the same p-values (sensitivity; the chosen one counts)
| Method | Statistic | Reference | p | |
|---|---|---|---|---|
| Fisher (−2 Σ log p) | 24.858 | χ²(10) | 0.0056 | chosen |
| Stouffer Z (weighted) | 2.773 | N(0, 1) | 0.0028 | |
| Tippett (minimum p) | 0.0100 | Beta(1, 5) | 0.0490 | |
| Edgington (sum of p) | 0.8500 | Irwin–Hall(5) | 0.0037 | |
| Lancaster (weighted χ²) | 15.656 | χ²(5) | 0.0079 | |
| Wilkinson (r-th smallest p) | 0.0100 | Beta(1, 5) | 0.0490 | |
| Simes | 0.0500 | Simes | 0.0500 | |
| Brown (dependent Fisher) | 24.858 | 1·χ²(10) | 0.0056 | |
| Cauchy combination (ACAT) | 8.838 | standard Cauchy | 0.0359 | |
| Higher criticism | 3.354 | Monte Carlo, 10000 null draws | 0.0017 | |
| Mudholkar–George (logit) | 2.902 | t(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.
Locked before results
ReflectIn 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.
Check your understanding
CheckpointCheck 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 on degrees of freedom. With five p-values, how many df?
Show the answer
Answer: 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 assumes, so its p-value comes out too small.
Do it in CodeSplash
In the appStart from the template Combine p-values in the Meta-analysis studio to get the method lock, or run it in Analyze.
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)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)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