Non-parametric tests
Introduzido| English | Significado |
|---|---|
| non-parametric/nɒn ˌpærəˈmetrɪk/ | não paramétrico |
| rank/ræŋk/ | posição |
| sign test/saɪn test/ | teste dos sinais |
| median/ˈmiːdiːən/ | mediana |
| binomial/baɪˈnəʊmɪəl/ | binomial |
| outlier/ˈaʊtlaɪə/ | valor atípico |
| Wilcoxon signed-rank test/ˈwɪlkɒksn saɪnd ræŋk test/ | teste de postos assinalados de Wilcoxon |
| rank-sum test/ræŋk sʌm test/ | teste da soma dos postos |
When the data isn't normal
- Most tests assume the data follows a normal distribution. But reaction times, rankings, and skewed data often don't.
- Non-parametric 非参数 tests make no assumption about the underlying distribution — they work from order and rank 秩 instead of exact values.
Selecionador de testes não paramétricos
Choose the rank-based test that matches the data situation.
The key advantage of a non-parametric test is that it makes no assumption that the data is:
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Non-parametric tests work without assuming an underlying normal distribution.
The sign test 符号检验
- To test a proposed median 中位数, count how many values fall above versus below it.
- Under the null hypothesis the counts follow a binomial 二项 model with $p = \tfrac12$ — so a lopsided split is evidence against the median.
Worked example. A firm claims the median waiting time is 10 minutes. In a sample of 10, 8 waits are above 10 and 2 are below. Test at the 5% level whether the median is greater than 10.
- $H_0$: median $=10$; $H_1$: median $>10$. Under $H_0$, $X\sim B(10,\,0.5)$, where $X$ is the number above 10.
- Using $\binom{10}{8}=45$, $\binom{10}{9}=10$, $\binom{10}{10}=1$:
- $0.0547>0.05$, so do not reject $H_0$: there is not enough evidence that the median is above 10.
Values equal to the claimed median are left out, and $n$ is reduced. A single outlier 离群值 cannot distort the test, because only the sign is used.

The sign test counts how many values lie above (+) or below (−) the median
Under the null hypothesis, the sign test uses which distribution for the counts above/below the median?
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Each value is equally likely above or below the median, so the count is binomial with p = ½.
Because it uses only direction, the sign test is barely affected by an ______ (an extreme value).
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
Using only above/below makes the sign test robust to outliers.
Ten values are compared with a proposed median, and 8 lie above it. What does the sign test use, and why is the rank-sum test the wrong choice here?
The sign test keeps only the direction from the median. The rank-sum test needs two separate groups.
In a sign test with n = 8, 7 values are above the claimed median. Find P(X ≥ 7) under H₀, to 4 decimal places.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
X ~ B(8, 0.5): P(X ≥ 7) = (8 + 1)/256 = 0.0352.
The Wilcoxon signed-rank test 威尔科克森符号秩检验
- The sign test throws away how far each value is from the median. The Wilcoxon signed-rank test keeps that information.
- Find each difference from the claimed median, and drop any zeros.
- Rank the sizes $|d|$ from 1 (smallest). Equal sizes share the average rank.
- Add the ranks of the positive differences ($P$) and of the negative ones ($N$). Check: $P+N=\tfrac12n(n+1)$.
- The test statistic is $T$, the smaller of $P$ and $N$ (for a one-tailed test, the sum that $H_1$ predicts will be small). Reject $H_0$ if $T\le$ the critical value from the tables.
The Wilcoxon signed-rank test uses the sizes of the differences, not just their signs.
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
It ranks the magnitudes of the differences, keeping information the sign test discards.
In a signed-rank test with n = 10 non-zero differences, P = 41. Find N.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
P + N = ½ × 10 × 11 = 55, so N = 55 − 41 = 14.
The Wilcoxon rank-sum test 秩和检验
- To compare two independent samples, pool and rank all the values together, then sum the ranks of one sample.
- If the two groups really differ, one will collect noticeably higher ranks.
Match the test to the design. Sign and signed-rank tests are for one sample (or paired data); the rank-sum test is for two independent samples. Using the wrong one invalidates the result.
- Paired data (for example before and after): take the differences within each pair, then use the signed-rank test on them. This is the Wilcoxon matched-pairs signed-rank test.
Match each test to its design.
Dificuldade 2/5 · Moedas 140 + pequeno bônus na primeira conclusão hoje
Sign and signed-rank are one-sample (or paired); rank-sum compares two independent samples.
Worked exam question: a signed-rank test
Question (6 marks). A gym claims the median time to complete a fitness circuit is 20 minutes. Eight members take 23, 26, 18, 31, 24, 29, 21 and 27 minutes. Use a Wilcoxon signed-rank test at the 5% level to test whether the median is greater than 20.
- $H_0$: median $=20$; $H_1$: median $>20$ (B1).
- Differences $x-20$ (M1): $+3$, $+6$, $-2$, $+11$, $+4$, $+9$, $+1$, $+7$.
- Rank the sizes (M1): in order they are 1, 2, 3, 4, 6, 7, 9, 11, so they get ranks 1 to 8. The size 2 (from $-2$) has rank 2.
- Only $-2$ is negative, so $N=2$ and $P=36-2=34$. Under $H_1$ the negative ranks should be small, so $T=N=2$ (A1).
- One-tailed 5% critical value for $n=8$ is 5. Since $2\le5$, reject $H_0$ (M1): there is evidence at the 5% level that the median time is greater than 20 minutes (A1).
Why answers lose marks: ranking the signed differences instead of their sizes; or rejecting when $T$ is larger than the critical value. For Wilcoxon tests, a small $T$ is the extreme result.
In a Wilcoxon signed-rank test, T = 7 and the critical value is 8. What is the decision?
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
For Wilcoxon tests a small T is extreme: reject when T ≤ the critical value.
You've got it
- non-parametric tests need no normality assumption — they use order and rank
- sign test: count above/below the median; use $B(n,\,0.5)$
- Wilcoxon signed-rank (one sample or paired data): rank the sizes, $T$ = smaller sum, reject if $T\le$ critical value
- rank-sum: two independent samples
How many of the 10 values lie above the proposed median?
Dificuldade 1/5 · Moedas 100 + pequeno bônus na primeira conclusão hoje
The case states that 8 of the 10 values lie above the median. Other options — 2 (the number below the median); 10 (the whole sample).