Wilcoxon 檢驗之 rank-sum 與 signed-rank
覺得有用的話,歡迎一起討論相互學習~
轉載自:
https://blog.csdn.net/chikily_yongfeng/article/details/82255575
前些時候在寫作時碰到了 Wilcoxon 檢驗,仔細一查,發現這里面居然還包含 2 種不同類型的檢測,並且極容易混淆,這 2 種分別方法是 Wilcoxon rank-sum test(我翻譯為秩和檢驗)和 Wilcoxon signed-rank test(我翻譯為符號秩檢驗)。今天我簡單總結一下,對比一下他們的差異。
Frank Wilcoxon (1892—1965) 是美國的統計學家,發表了 70 篇左右論文,但其最大的貢獻就是這 2 個以他名字命名的非參假設檢驗方法:秩和檢驗 和 符號秩檢驗。他在 1945 年發表的論文 1 中將二者分別稱為 非成對檢驗 (unpaired experiment)和 成對檢驗(paired comparison)。 正是因為其巨大影響力使得這兩個檢驗方法都以他的名字命名,並流傳下來。
1. Wilcoxon 秩和檢驗
根據 wikipedia 解釋, Wilcoxon rank-sum test 定義如下,
In statistics, the Mann–Whitney U test (also called the Mann–Whitney–Wilcoxon (MWW), Wilcoxon rank-sum test, or Wilcoxon–Mann–Whitney test) is a nonparametric test.
This test can be used to determine whether two independent samples were selected from populations having the same distribution. 2
基本概念: 在統計學中,Wilcoxon rank-sum test(威爾科克森秩和檢驗)也叫 Mann-Whitney U test(曼-惠特尼 U 檢驗),或者 Wilcoxon-Mann-Whitney test。秩和檢驗是一個非參的假設檢驗方法,一般用來檢測 2 個數據集是否來自於相同分布的總體。
這里的 “秩” 其實就是 “排名” 的意思,“秩和” 當然就是指 “將排名進行求和” 的操作。在秩和檢驗中,我們不要求被檢驗的 2 組數據包含相同個數的元素,換句話說,秩和檢驗更適用於非成對數據之間的差異性檢測。
數據 x1 | 總排名 rank | 數據 x2 | 總排名 rank |
---|---|---|---|
9 | 14 | 7 | 11 |
5 | 5.5 | 4 | 3 |
8 | 13 | 5 | 5.5 |
7 | 11 | 6 | 8 |
10 | 15 | 3 | 1 |
6 | 8 | 6 | 8 |
7 | 11 | 4 | 3 |
4 | 3 |
2. Wilcoxon 符號秩檢驗
根據 wikipedia 解釋, Wilcoxon signed-rank test 定義如下,
A Wilcoxon signed-rank test is a nonparametric test that can be used to determine whether two dependent samples were selected from populations having the same distribution. 3
基本概念: Wilcoxon signed-rank test(威爾科克森符號秩檢驗)也是一種非參的假設檢驗方法,它成對的檢查 2 個數據集中的數據(即 paired difference test)來判斷 2 個數據集是否來自相同分布的總體。
應用實例: 假設我們有 2 組數據 y1 和 y2,如下表所示。我們按照如下3步來計算 wilcoxon signed-rank test 的結果。
ID | 數據 y1 | 數據 y2 | 符號位 sign | 絕對差值 abs | 絕對差值的排名 rank |
---|---|---|---|---|---|
0 | 125 | 110 | +1 | 15 | 7 |
1 | 115 | 122 | -1 | 7 | 3 |
2 | 130 | 125 | +1 | 5 | 1.5 |
3 | 140 | 120 | +1 | 20 | 9 |
4 | 140 | 140 | - | 0 | - |
5 | 115 | 124 | -1 | 9 | 4 |
6 | 140 | 123 | +1 | 17 | 8 |
7 | 125 | 137 | -1 | 12 | 6 |
8 | 140 | 135 | +1 | 5 | 1.5 |
9 | 135 | 145 | -1 | 10 | 5 |
-
Wilcoxon, Frank. “Individual Comparisons by Ranking Methods.” Biometrics Bulletin 1.6(1945):80-83. link ↩︎
-
常見各種分布臨界值表 https://lrita.github.io/images/posts/math/applex3.pdf
Wilcoxon 秩和檢驗 表格
http://plantsys.elte.hu/oktatas/Biometria/tablazatok/Wilcoxon_table_ketmintas_probahoz.pdf