What is the Mann-Whitney U test?
The Mann-Whitney U test is a non-parametric statistical technique used when we have one independent categorical variable with two groups and one dependent quantitative, continuous variable. In other words, the Mann-Whitney U test examines differences between two independent groups on a continuous scale. Instead of comparing the means of two groups, the Mann-Whitney U test compares their medians. The Mann-Whitney U test is a non-parametric alternative to the parametric independent samples t-test.
When Should a Mann-Whitney U test be Used?
The Mann-Whitney is used when you have two separate groups of individuals or cases in a between-participants design.
An Example Of the Mann-Whitney U test
For example, a researcher wants to examine whether there are differences in statistics test scores between students who have prior knowledge of statistics and students who do not. Thus, we have one dependent variable – statistics test scores and one categorical variable with two groups (previous knowledge of statistics or not).
What are the use of null and alternative hypothesis for the Mann-Whitney U test?
Therefore, we test the following hypotheses:
Null hypothesis: There is no difference in statistic exam scores between students who have previous knowledge of statistics and students who do not.
Alternative hypothesis: There is a difference in statistic exam scores between students who have previous knowledge of statistics and students who do not.
R function to Compute Mann-Whitney U Test
The code to run a Mann-Whitney U Test using R is as follows:
wilcox.test(DV~ IV, data = dataframe, exact = FALSE)
DV: dependent variable
IV: Independent variable