Sign Test Calculator

Run one-sample or paired sign tests instantly here. Compare exact and normal results together quickly. Download CSV or PDF, then share findings with teams.

Calculator

Choose one-sample (compare to m0) or paired (compare differences to m0).
Two-sided tests any shift; one-sided tests a direction.
For paired tests, m0 is the hypothesized median difference.
Typical values: 0.10, 0.05, 0.01.
Useful for larger n; continuity correction improves tail accuracy.
Exact is recommended for small to moderate n.
Values equal to m0 are ties and are excluded from n.
Choose how differences are formed before comparing to m0.
Extra values are ignored if lists differ in length.
Pairs with difference equal to m0 are ties.
Reset
After submitting, results appear above this form.

Example data table

One-sample example (m0 = 13): values and signs of (x − m0)
#Valuex − 13Sign
112-1
2152+
3141+
4174+
511-2
61300
7163+
810-3
9185+
10141+
Paired example (diff = B − A, m0 = 0): differences and signs
#ABB − ASign
11001033+
2102101-1
398991+
41011032+
5991012+
61051072+
797981+
81031041+
91001011+
101041062+
Tip
Paste your own values in the form above. Use commas, spaces, or new lines. For paired tests, keep lists aligned by row.

Formula used

The sign test is a nonparametric test for a population median (one-sample) or a median paired difference (paired). It only uses the sign of each shift relative to a hypothesized median m0.

  • S = number of positive signs (values above m0).
  • n = number of non-ties (values not equal to m0).
  • Under H₀, S ~ Binomial(n, 0.5).
Exact p-value (binomial)
Two-sided (common doubling):
p = 2 × min{ P(S ≤ s), P(S ≥ s) }

One-sided:
p = P(S ≥ s) for “greater”, or p = P(S ≤ s) for “less”.
Normal approximation
For larger n, use
Z = (S − n/2) / sqrt(n/4)
with an optional continuity correction of ±0.5 for improved tail accuracy.
Median confidence bounds are based on order statistics using the same binomial model, producing a distribution-free interval for the median.

How to use this calculator

  1. Select one-sample or paired under “Test type”.
  2. Choose an alternative (two-sided, greater, or less) and set m0.
  3. Paste your values. For paired tests, enter lists A and B aligned by row.
  4. Pick alpha, then enable exact and/or normal methods.
  5. Press Submit. Review the decision, p-values, and the calculation table.
  6. Use Download CSV or Download PDF to export the latest result.
Interpretation note
The sign test is robust and distribution-free, but it ignores magnitudes. If you need a test that uses ranks and magnitudes, consider a signed-rank approach instead.

When the sign test is appropriate

Use the sign test when you want to test a median without assuming normality. It fits skewed, heavy‑tailed, or ordinal-like measurements where only direction matters. In paired studies, it evaluates whether the typical change differs from m0, such as a before–after shift in response time.

Data preparation and handling ties

Compute each shift: for one-sample use (x − m0); for paired use (B − A − m0) or (A − B − m0). Record the sign of each shift. Values exactly equal to m0 are ties and are removed from n. A high tie rate reduces power, so consider measurement resolution or a nearby practical m0.

Exact binomial calculation and interpretation

Let S be the number of positive signs among n non-ties. Under H0, S follows a Binomial(n, 0.5) distribution. The exact p-value sums probabilities in the relevant tail. For two-sided testing, the calculator doubles the smaller tail probability to control type‑I error conservatively for discrete outcomes.

Normal approximation and continuity correction

For larger n, S can be standardized with Z = (S − n/2) / sqrt(n/4). The normal method is fast and often accurate when n is moderate and ties are few. Continuity correction shifts S by 0.5 toward the center, improving tail accuracy when n is not very large.

Confidence bounds for the median

A distribution‑free confidence interval for the median can be built from order statistics. The method selects indices based on binomial quantiles and then reports the corresponding sorted values (or differences). With small n, the interval can be wide or even infinite on one side, which correctly reflects limited information.

Reporting results and practical guidance

Report n, S, the chosen alternative, and the primary p-value. Add the observed median and the confidence bounds to communicate magnitude, not just significance. If p is close to alpha, sensitivity checks with the exact and normal methods help. For stronger inference, increase n, reduce ties, and predefine m0 based on domain goals. For example, with n=20 and S=15, the exact two-sided p-value is 0.041, implying rejection at alpha=0.05. With n=8, p-values are coarse in steps of 1/256, so decisions may hinge on a single observation. in practice.

FAQs

1. What does the sign test measure?

It tests whether the population median (or median paired difference) equals a hypothesized value m0 using only the direction of deviations, not their size.

2. Why are ties excluded from n?

Shifts equal to m0 carry no direction, so they provide no evidence for either side. Excluding ties yields the standard binomial model with p=0.5 under H0.

3. When should I prefer the exact method?

Use the exact binomial p-value for small or moderate n, or whenever you need a fully discrete, assumption-free result. It is the default choice for careful reporting.

4. How do I choose one-sided versus two-sided?

Use two-sided when any change matters. Use one-sided only when a direction is scientifically justified before seeing data, such as expecting an increase after a process improvement.

5. What does S/n represent here?

S/n is the proportion of non-tied observations above m0. Values far from 0.5 indicate a directional shift, while values near 0.5 suggest symmetry around the hypothesized median.

6. Can I apply this to ranked or ordinal outcomes?

Yes, if you can define “above”, “below”, and “equal” relative to m0 or a paired difference. The method only needs sign information, so it works well with coarse scales.

Related Calculators

F-Test Statistic CalculatorMultiple Regression Summary Calculatorgoodness of fit calculatorempirical rule calculatorroot mean square calculatorpoisson distribution calculatorcritical value calculatorspearman rank calculatorz table calculatorconfidence level calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.