The Wilcoxon rank-sum or Mann Whitney U, test is a nonparametric test that uses ranks of sample data from two independent populations. Alternative to t-test for independent samples
Compares medians To test null hypothesis that the two independent samples come from populations with equal medians. • H0: The two samples come from populations with equal medians. • H1: The two samples come from populations with different medians.
đ?‘ˆđ?‘˜ = đ?‘›đ?‘˜ đ?‘›đ?‘˜+1 đ?‘›đ?‘˜ đ?‘› đ?‘˜ + 1 + 2 − đ?‘…đ?‘˜
đ?‘ˆ1 = đ?‘›1 đ?‘›2 +
−
đ?‘›1 đ?‘›1 + 1 2
đ?‘…1
• �1 = size of sample 1 • �2 = size of sample 2 • �1 = sum of sample 1 ranked • �2 = sum of sample 2 ranked
đ?‘ˆ2 = đ?‘›1 đ?‘›2 +
−
đ?‘›2 đ?‘›2 + 1 2
đ?‘…2
• �1 = size of sample 1 • �2 = size of sample 2 • �1 = sum of sample 1 ranked • �2 = sum of sample 2 ranked
often provided
or can be often found using the z test statistic
For n critical U values ≤ 30 (Table A-5)
For n critical z values > 30 (Table A-2.)
STEP 1: State the hypotheses • Based on the hypothesised value
STEP 2: Rank all data across groups • Sum the ranks for each group
STEP 3: Find test statistic • Compute test statistic, U1 and U2 • Compare U1 and U2 • Choose the smallest test statistic, Ut
STEP 4: Formulate the decision rule • Critical value method • Find critical value, Uc in the Table A-5
STEP 5: Make the statistical decision • Reject or do not reject the null hypothesis
The null and alternative hypotheses for each type of test are as follows.
• Left-tailed test: • H0: median 1= median 2 • H1: median < median 2 • Right-tailed test: • H0: median 1 = median 2 • H1: median > median 2 • Two-tailed test: • H0: median 1 = median 2 • H1: median ≠ median 2
â&#x20AC;˘ Two groups of students were randomly tested with a quiz about the nonparametric tests. However, their scores are not normally distributed. Therefore, the data were analysed using Mann Whitney U to compare the results between the two groups.
Group 1
Group 2
78
87
69
96
88
83
99
90
100
88
H0: The median of the differences is equal to 0 (H0: There is no difference between Group 1 and 2 scores)
H1: The median of the differences is not equal to 0 (H1: There is a difference between Group 1 and 2 scores)
Tied ranks: •
Find all values that are tied.
•
Identify all ranks that would be assigned to those values.
•
Average those ranks.
•
Assign that average to all tied values.
Group 1 78 69 88 99 100
Rank
2 1 5.5 9 10
Group 2 87 96 83 90 88
Rank
4 8 3 7 5.5
Group 1 87 69 88 99 100 Sum
Rank 1 4 1 5.5 9 10 n1 = 5 R1 = 29.5
Group 2 78 96 83 90 88 Sum
Rank 2 2 8 3 7 5.5 n2 = 5 R2 = 25.5
𝑛1 𝑛1 + 1 𝑈1 = 𝑛1 𝑛2 + − 2
𝑅1
𝑛2 𝑛2 + 1 𝑈2 = 𝑛1 𝑛2 + − 2
𝑅2
𝑛1 𝑛1 + 1 𝑈1 = 𝑛1 𝑛2 + − 2
𝑅1
5 5+1 30 = 5 5 + − 29.5 = 25 + − 29.5 = 10.5 2 2 ∴ 𝑼𝟏 = 𝟏𝟎. 𝟓 𝑛2 𝑛2 + 1 𝑈2 = 𝑛1 𝑛2 + − 2
𝑅2
5 5+1 30 = 5 5 + − 25.5 = 25 + − 25.5 = 14.5 2 2 ∴ 𝑼𝟐 = 𝟏𝟒. 𝟓
Choose the smallest test statistic, Ut
đ?&#x2018;&#x2C6;1 < đ?&#x2018;&#x2C6;2 = 10.5 < 14.5 đ?&#x2018;&#x2C6;đ?&#x2018;Ą = 10.5
Find critical value, UcRefer Table A-5 đ??şđ?&#x2018;&#x2013;đ?&#x2018;Łđ?&#x2018;&#x2019;đ?&#x2018;&#x203A;; đ?&#x2018;&#x203A;1 = đ?&#x2018;&#x203A;2 = 5
Since đ?&#x2018;&#x2C6;đ?&#x2018;Ą = 10.5 > đ?&#x2018;&#x2C6;đ?&#x2018;? =2 , we fail to reject the null hypothesis.
â&#x20AC;˘ There is no difference between Group 1 and 2 in terms of their scores.