One and two sample non-parametric tests — Edexcel A-Level Statistics
One and two sample non-parametric tests explained
One and two sample non-parametric tests covers 2 specification points, including Use sign or Wilcoxon signed-rank tests to… and Use the Wilcoxon rank-sum test to investigate….
Read the full explanation
Open a point below for its explanation and revision guidance.
Use sign or Wilcoxon signed-rank tests to investigate population median in single sample tests and also to investigate for differences using a paired model.
Non-parametric tests are used when the population distribution is not assumed normal. For a single sample, the sign test investigates whether the population median equals a hypothesised value by counting how many observations lie above and below that value; the Wilcoxon signed-rank test also uses the sizes of the differences from the hypothesised median, ranking their absolute values and attaching the original signs. For a paired model, you calculate the difference within each pair, then apply the sign test or Wilcoxon signed-rank test to those differences to investigate whether the population median difference is zero. The sign test is quicker and uses only the direction of each difference; the signed-rank test uses both direction and magnitude, so it is more powerful when the differences are roughly symmetric. Both require independent observations and a random sample.
Use the Wilcoxon rank-sum test to investigate for difference between independent samples.
The Wilcoxon rank-sum test (also called the Mann-Whitney U test) is a non-parametric alternative to the two-sample t-test. It is used to investigate whether two independent samples come from populations with the same distribution, specifically testing for a difference in location (median). The test does not assume normality. To carry it out, you combine the two samples, rank all observations from smallest to largest, and then sum the ranks for one of the samples. Tied observations receive the average of the ranks they would have occupied. The test statistic is usually the sum of ranks for the smaller sample, or the U statistic, which is calculated from the rank sums. You compare this with a critical value from the Wilcoxon rank-sum table or use a normal approximation for large samples.
Your focus
- Carry out a sign test to investigate a population median for a single sample or a paired model.
- Carry out a Wilcoxon signed-rank test to investigate a population median for a single sample or a paired model.
- Interpret the results of these tests in context and explain the difference between the sign test and the Wilcoxon signed-rank test.
Show all 6 objectives
- Carry out a Wilcoxon rank-sum test to compare two independent samples.
- Calculate the test statistic by ranking combined data and summing ranks for one sample.
- Interpret the result of the Wilcoxon rank-sum test in the context of the original problem.
One and two sample non-parametric tests exam tips
Marking Points
- State the null hypothesis as population median = hypothesised value (single sample) or population median difference = 0 (paired model), and the alternative as one- or two-sided as appropriate.
- For the sign test, count the number of observations (or paired differences) above the hypothesised median and compare with the binomial distribution with n = number of non-zero differences and p = 0.5.
- For the Wilcoxon signed-rank test, calculate differences from the hypothesised median (or paired differences), rank the absolute differences ignoring zeros, assign the original signs to the ranks, and sum the positive ranks (or the smaller of the positive and negative rank sums).
- Compare the test statistic with the critical value from the appropriate table at the chosen significance level, or calculate a p-value, and interpret the result in the context of the original question.
- Recognise that the sign test uses only the direction of differences, while the Wilcoxon signed-rank test uses both direction and magnitude, making it more powerful when the distribution of differences is symmetric.
- Handle ties correctly: discard zero differences in the sign test; in the signed-rank test, assign average ranks to tied absolute differences.
- State the null hypothesis that the two populations have the same distribution (or same median) and the alternative that they differ, in the context of the problem.
- Combine the two samples, rank all observations from smallest to largest, and assign average ranks to tied values.
- Calculate the sum of ranks for one sample (often the smaller sample) and use it as the test statistic, or calculate the U statistic from the rank sums.
- Compare the test statistic with the critical value from the Wilcoxon rank-sum table at the chosen significance level, or use a normal approximation for large samples, and interpret the result in context.
- Recognise that the test is non-parametric and does not require the assumption of normality, but it does assume independent random samples and, when testing for a difference in medians, that the distributions have the same shape and spread.
Exam tips
- 💡Always define the population median (or median difference) clearly in the context of the question before stating the hypotheses.
- 💡Show your working: for the sign test, state the number of positive and negative differences; for the signed-rank test, show the ranks and the sum of positive ranks.
- 💡Check whether the test should be one-tailed or two-tailed based on the wording of the alternative hypothesis, and use the correct critical value.
- 💡When interpreting the result, relate it back to the original context and avoid simply saying 'accept the null hypothesis'; say 'there is insufficient evidence to reject the null hypothesis'.
- 💡Clearly label which sample is which and show the combined ranking process, especially when there are ties.
- 💡State the null and alternative hypotheses in words in the context of the question, not just symbols.
- 💡Check whether a one-tailed or two-tailed test is required and use the correct critical value or p-value.
- 💡When interpreting, avoid saying 'the medians are equal'; instead say 'there is insufficient evidence to suggest a difference in the populations'.
Common Mistakes
- Misunderstanding: the sign test and Wilcoxon signed-rank test are parametric tests for means. Correction: both are non-parametric tests for the population median, and they do not assume a normal distribution.
- Misunderstanding: in the Wilcoxon signed-rank test, you rank the original observations rather than the differences. Correction: you must first calculate the differences from the hypothesised median (or the paired differences), then rank the absolute values of those differences.
- Misunderstanding: zero differences are included in the sign test or signed-rank test. Correction: zero differences are discarded before carrying out either test.
- Misunderstanding: the sign test and signed-rank test always give the same conclusion. Correction: they may differ because the signed-rank test uses more information (magnitudes) and can be more powerful when its assumptions hold.
- Misunderstanding: the Wilcoxon rank-sum test can be used for paired data. Correction: it is for independent samples; for paired data, use the Wilcoxon signed-rank test or sign test.
- Misunderstanding: you rank each sample separately. Correction: you must combine the two samples and rank all observations together.
- Misunderstanding: ties are ignored or broken arbitrarily. Correction: tied observations are given the average of the ranks they would have occupied.
- Misunderstanding: the test assumes normal distributions. Correction: it is non-parametric and does not assume normality, though it does assume independent samples and, for a median difference, similar shapes.