- Introduced by
- W. J. Dixon & A. M. Mood
- Year
- 1946
- Type
- Nonparametric median test
What does it do?
The sign test is a nonparametric hypothesis test that asks whether the median of paired differences, or of a single sample, differs from a hypothesised value.
It uses only the sign of each difference, so it makes almost no distributional assumptions and applies to any data where individual differences can be classified as positive or negative. Dixon and Mood's 1946 paper presented and illustrated the test using paired observations.
The intuition behind the method
Imagine recording whether each participant improved or worsened after a treatment. If the treatment has no effect, roughly half the differences should be positive and half negative — just like fair coin flips. The sign test counts how often the outcome went in each direction and asks whether that imbalance is larger than chance alone would produce. It deliberately ignores the size of each difference, which makes it extremely robust but somewhat less sensitive than tests that use magnitudes.
History
The sign test is an early nonparametric procedure. The 1946 paper by W. J. Dixon and A. M. Mood in the Journal of the American Statistical Association presented, illustrated and tabulated the test for paired comparisons. The paper drew on previously published work on the sign test and included a table of significance levels. Because its construction depends only on the signs of differences, it is often used as a teaching example of the binomial null distribution.
When to use it
Use the sign test when you have paired observations or a single sample and want to test whether the median difference departs from zero (or another target), especially when the normality assumption of the paired t-test cannot be met. It requires only that the pairs are independent and that the underlying variable is at least ordinal. It is suitable for both continuous and ordinal outcome variables, and is particularly valuable with very small samples, heavy-tailed distributions, or data containing outliers. When the magnitude of differences is available and trustworthy, the Wilcoxon signed-rank test is more powerful and should be preferred.
Limitations and considerations
- Less powerful than the Wilcoxon signed-rank test when differences are measurable, because the test discards information about their magnitude.
- Ignoring the size of differences can mask practically important effects.
- Tied pairs (differences of exactly zero) are discarded, which reduces the effective sample size and the test's power.
- With very small effective sample sizes, the smallest attainable two-sided p-value can exceed the 0.05 threshold, so H0 cannot be rejected at that level whatever the observed signs are.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Requires almost no distributional assumptions, because only the sign of each difference is used; it applies to continuous or ordinal variables.
- Robust to outliers: an extreme difference contributes one sign, the same as a small difference of that sign.
- Computationally simple: the p-value follows directly from the binomial distribution with p = 0.5, with no large-sample approximation.
- Can be applied to very small samples, where rank-based or large-sample procedures may be unreliable.
Applications
- Testing whether a treatment produces more improvements than deteriorations in paired clinical or psychological data.
- Assessing whether sensory panel scores systematically favour one product over another when only directional preference is recorded.
- Checking whether a measuring instrument is biased above or below a target reference value.
- Analysing before-after studies in social or educational research where only the direction of change is reliable.
How it works
How it works
The null hypothesis states that the population median of differences equals the hypothesised value (typically zero), which implies that positive and negative differences are equally likely under the null. The two-sided alternative states the median is different from that value; a one-sided alternative states that it is greater or smaller. The choice of alternative determines how the p-value is computed (see below).
Formula
H_0:\ \theta = \theta_0 \quad H_1:\ \theta \neq \theta_0
For each paired observation the difference is computed and classified as positive, negative, or zero; tied zero differences are discarded, leaving n effective observations. The test statistic S is the count of the less-frequent sign — the smaller of S⁺ (positive differences) and S⁻ (negative differences). Under the null hypothesis, S⁺ follows a Binomial(n, 0.5) distribution.
Formula
S = \min(S^+, S^-), \quad S^+ = \#\{d_i > 0\},\ S^- = \#\{d_i < 0\}The p-value is computed exactly from the binomial distribution with n non-zero differences and p = 0.5. For the two-sided alternative it is twice the tail probability of observing S or fewer successes, capped at 1; a perfectly balanced sample therefore gives p = 1. For a one-sided alternative no doubling is applied: with X ~ Binomial(n, 0.5), the p-value is P(X ≥ S⁺) for H1: θ > θ0 and P(X ≥ S⁻) for H1: θ < θ0. The one-sided direction must be fixed before the data are examined. If p falls below 0.05 the null hypothesis is rejected, indicating the median shifts away from the hypothesised value. Because the test uses only sign information, effect magnitude is not directly quantifiable from the test alone.
Formula
p = \min\left(1,\ 2\sum_{k=0}^{S}\binom{n}{k}\left(\tfrac{1}{2}\right)^{n}\right), \quad \text{reject } H_0 \text{ if } p < 0.05Common pitfalls
- Choosing the sign test when differences are available on a numerical scale — prefer the Wilcoxon signed-rank test for better power.
- Forgetting to discard zero differences and reporting an incorrect n.
- Interpreting a non-significant result as evidence that the median equals the null value, rather than merely insufficient evidence to reject it.
Frequently asked questions
When should I use the sign test rather than the Wilcoxon signed-rank test?
Use the sign test when you can only determine the direction of differences (not their size), when the distribution is highly irregular or the data contain extreme outliers, or when the sample is very small and ranking differences is unreliable. If numerical differences are available and plausible, the Wilcoxon signed-rank test is more powerful.
What happens to tied pairs (zero differences)?
Observations where the difference is exactly zero carry no sign information and are excluded from the analysis. The effective sample size n used in the binomial calculation is the number of non-zero differences. Discarding many ties substantially reduces power.
Can I use the sign test for a one-sample median problem?
Yes. Subtract the hypothesised median from each observation to form differences, then classify each as positive or negative. The procedure is identical to the paired case.
Is the sign test exact or approximate?
The p-value is exact, derived directly from the binomial distribution with p = 0.5. No large-sample approximation is needed, making it valid even for very small samples.
Related methods
Sources
Dixon, W. J. & Mood, A. M. (1946). The statistical sign test. Journal of the American Statistical Association, 41(236), 557–566.
Open DOI reference[Daniel_J._Denis]_SPSS_Data_Analysis_for_Univariat(z-lib.org), p. 198
Horton+Pruim+Kaplan_MOSAIC-StudentGuide, p. 89–90