Mathematics
Nonparametric Tests: Sign Test and Rank-Based Methods
Quick fact
The sign test is one of the oldest statistical tests—it was used by John Arbuthnot in 1710 to argue that more boys than girls are born each year, showing a divine providence. It compares counts of positive and negative signs without needing any distributional assumption.
Why this is interesting
What if your data is skewed, full of outliers, or not even numeric? The trusty t-test falls apart—but there's a whole class of tests that don't care about the shape of your data.
Read the full explanation
Understanding Nonparametric Tests: Sign Test and Rank-Based Methods
Most common statistical tests, like the one-sample t-test, assume your data follows a normal distribution. But real data often violate this: they can be skewed, have extreme values, or be ordinal (like rating scales). Nonparametric tests, also called distribution-free tests, step in when these assumptions are not met. Instead of using the actual numeric values, they focus on the signs or ranks of observations. The sign test is the simplest. For a median test, you count how many observations are above the hypothesized median (plus signs) and how many are below (minus signs), then use the binomial distribution to see if the split is too uneven to be due to chance. For paired data, you compare each pair and record the sign of the difference. Rank-based methods, like the Wilcoxon signed-rank test, go a step further: they replace the raw values with their ranks. This preserves the ordering of the data while discarding the exact distances, making the test robust to outliers. The Wilcoxon rank-sum test (also called Mann-Whitney U) does this for two independent samples, comparing whether one group tends to have larger values.
A deeper explanation
Why do these methods work? They exploit the information in the ranks themselves. Under the null hypothesis (e.g., no effect, medians equal), the signs of differences or the ranks of observations have a known distribution that does not depend on the shape of the population. For the sign test, if the true median equals the hypothesized value, you'd expect roughly half positive and half negative signs. The test statistic, simply the number of positive signs, follows a binomial distribution, enabling a p-value calculation. The Wilcoxon signed-rank test uses both the sign and the magnitude of differences, ignoring the distribution shape. It ranks the absolute differences, then sums the ranks for the positive differences. If the null is true, that sum should be about half the total rank sum. This test is more powerful than the sign test because it uses more information. Rank-based methods work by converting data into ordinal ranks, which are then used in standard linear models or permutation tests. Because ranks are insensitive to the exact distances, they are less affected by outliers and do not rely on normality. This makes them reliable for data from skewed populations or when sample sizes are small, where the central limit theorem may not provide a good approximation. These tests are not just fallbacks—they are powerful tools in their own right, often used in fields from medicine to social sciences, especially when data are ordinal (like survey responses) or when the assumptions of parametric tests are clearly violated.