Sign Test Calculator

Paired or one-sample sign test for a median: count positive and negative differences (zeros dropped), exact binomial p-value, and optional median confidence interval.

Hypotheses

H0: median of differences = 0 (or stated median)

Two-sided p uses both binomial tails, capped at 1

Worked example (Load example)

Paired before/after with one zero difference: 2 plus, 2 minus among n = 4, exact two-sided p = 1.0.

Related tests

Wilcoxon signed-rank uses ranks; Mann-Whitney U handles independent samples.

Related guides and calculators

The sign test is a binomial test with p = 0.5 on the number of positive differences, so the binomial distribution calculator reproduces its p-value. It uses less information than the Wilcoxon signed-rank test, which also uses the size of the differences, and the paired t-test uses the values themselves. Read parametric vs nonparametric tests.

Frequently Asked Questions

How is the two-sided exact p-value defined?

p = min(1, 2 × min(P(X ≥ k), P(X ≤ k))) for X ~ Binomial(n, 0.5) with k = number of + signs.

What happens to zero differences?

Zeros are removed before counting; the number dropped is shown in the output.

Why is power lower than Wilcoxon?

The sign test ignores magnitudes, so it detects only consistent direction, not how far values shift.

When is the median CI shown?

An exact 95% order-statistic interval is shown when n ≥ 6 after zero removal; smaller n omits the CI.

Normal approximation line?

The normal approximation p-value is listed for comparison only; inference uses the exact binomial p-value.

Python equivalent?

scipy.stats.binomtest(k, n, 0.5, alternative=...) on ± counts after dropping zeros.

Embed This Calculator

Add this free calculator to your course page or LMS.

Adjust the height value to fit your page.