5 Mann-Whitney Test
5 Mann-Whitney Test
Introduction
◦ Assumption #1: You have one dependent variable that is measured at the
continuous or ordinal level. Examples of continuous variables include revision time
(measured in hours), intelligence (measured using IQ score), exam performance (measured
from 0 to 100), weight (measured in kg), and so forth. Examples of ordinal variables include
Likert items (e.g., a 7-point scale from "strongly agree" through to "strongly disagree"),
amongst other ways of ranking categories (e.g., a 5-point scale explaining how much a
customer liked a product, ranging from "Not very much" to "Yes, a lot").
◦ Assumption #2: You have one independent variable that consists of two
categorical, independent groups (i.e., a dichotomous variable). Example independent
variables that meet this criterion include gender (two groups: "males" or "females"),
employment status (two groups: "employed" or "unemployed"), transport type (two groups:
"bus" or "car"), smoker (two groups: "yes" or "no"), trial (two groups: "intervention" or "control"),
and so forth.
Basic requirements of the Mann-
Whitney U test
◦ Assumption #3: You should have independence of observations, which
means that there is no relationship between the observations in each group of the
independent variable or between the groups themselves. For example, there
must be different participants in each group with no participant being in more
than one group. This is more of a study design issue than something you can test
for, but it is an important assumption of the Mann-Whitney U test. If your study
fails this assumption, you will need to use another statistical test instead of the
Mann-Whitney U test (e.g., a Wilcoxon signed-rank test).
between levels of .
gender
Setting up your data
Variable View and Data View for a CONTINUOUS
dependent variable
Setting up your data
Setting up your data when you have an ordinal
dependent variable
Procedures
There are two different procedures in SPSS Statistics that you can use to run a Mann-Whitney U
test: a legacy procedure and a 'new' procedure (N.B., we just call it 'new' for ease). We show
you both procedures. However, in order to choose between the two, we suggest the following:
NEW PROCEDURE: The new procedure involves fewer steps in SPSS Statistics than the
legacy procedure, as well as testing for the assumption of the Mann-Whitney U test in one go.
Therefore, after you have run the Mann-Whitney U test using the new procedure, you will only
have to work through three pages of the Assumptions section rather than four (i.e., you will have
one less procedure to run in SPSS Statistics). However, you can only use the new procedure if:
(c) your independent variable has only two groups (e.g., "gender", which consists of
"males" and "females"; or "employment status", consisting of "employed people" and
"unemployed people"). This may sound strange because the Mann-Whitney U test can only be
used when you have an independent variable with two groups. However, the legacy procedure
also allows you to specify two groups to compare (e.g., "bus" vs "plane") when you have an
independent variable with three or more groups (e.g., "transport type", consisting of three
groups such as "bus", "car" and "plane"). Unfortunately, when you use the new procedure, this
is not possible.
Procedures
LEGACY PROCEDURE: The legacy procedure is very flexible, which helps if you
have collected certain types of data, but it does require more steps in SPSS, and you
will also have to test for the assumption of the Mann-Whitney U test separately from
the main procedure (although we show you how to do this in the Assumptions section
of this guide). The legacy procedure should be used if:
(c) your independent variable has three or more groups. Whereas your variable has
to be dichotomous when using the new procedure (i.e., it can only have two groups),
it can also be nominal when using the legacy procedure; that is, it can have three or
more groups (e.g., an independent variable such as ethnicity [3 groups: African
American, Caucasian, Hispanic] or educational level [4 groups: high school,
undergraduate, master's, doctorate]). This is because the legacy procedure allows
you to choose which two groups you want to analyse.
New procedure for the Mann-Whitney U test
You will be presented with the Nonparametric Tests: Two or More Independent Samples dialogue box, as shown
below:
Keep Automatically compare distributions across groups selected in the –What is your
objective?– area.
Similarly shaped distributions (when using the new procedure)
If you cannot declare that the two distributions are similar, you can still use the
Mann-Whitney U test, but the inferences you can make will be different (N.B., we
discuss this in detail later, especially in the Interpreting Results section).
You can use different types of graph to visualize whether two distributions are
similarly shaped, but we will use a type of histogram called a population pyramid
because it is the default chart produced by SPSS Statistics' new nonparametric
test procedure. This graph is displayed in the right-hand pane of the Model
Viewer window (as seen above), which we have extracted and displayed in the
next slide:
Looking at the population pyramid above, you need to make a judgement about
whether the distributions of engagement scores (engagement) are similar for
males and females (both levels of gender). By visually inspecting the shapes of
these distributions, you can see that they look fairly similar, although you should
not expect them to be perfect (N.B., the smaller the number of participants in your
groups, the harder you will find it to determine if the distributions are similar).
Remember, you are only interested in the shapes of the distributions and not if
one of the distributions appears to have higher or lower scores than the other.
If your distributions are similarly shaped, you can use the Mann-
Whitney U test to make inferences about the difference in medians
between your two groups (i.e., whether there is a gender difference in
median engagement score). In this example, the distributions look
similar so we can make judgements about differences in medians.
However, if they look dissimilar, you will have to make judgements
based on either differences in distributions, lower/higher scores and/
or mean ranks. Your options are laid out below:
Legacy procedure to generate a population pyramid
You will be presented you with the Chart Builder dialogue box, as shown below:
Similarly shaped distributions (when using the legacy procedure)
Looking at the population pyramid above, you need to make a judgement about whether the distributions of
engagement score (engagement) are similar for males and females (both levels of gender). By visually
inspecting the shapes of these distributions, you can see that they do not look too dissimilar, although you
should not expect them to be perfect (N.B., the smaller the number of participants in your groups, the harder
you will find it to determine if the distributions are similar). Remember, you are only interested in the shapes
of the distributions and not if one of the distributions appears to have higher or lower scores than the other.
If your distributions are similarly shaped, you can use the Mann-Whitney U test to
make inferences about differences in medians between your two groups (e.g.,
whether there is a gender difference in median engagement score). In this example,
the distributions look similar so we can make judgements about differences in
medians. However, if they look dissimilar, you will have to make judgements based
on either differences in distributions, lower/higher scores and/or mean ranks. Your
options are laid out below:
Legacy procedure for the Mann-Whitney U test
The procedure to run a Mann-Whitney U test using the legacy procedure in SPSS
Statistics is shown in the nine steps below.
You will be presented with the Two-Independent-Samples Tests dialogue
box, as shown below:
Comparison of medians (when you have used the legacy
procedure)
Now that you have established that the distributions of engagement scores are
similar between males and females, you need to consult the Test Statistics table
that shows the results of the Mann-Whitney U test, as shown below:
Generating medians
(for all versions)
Now that you have generated medians, what you should do next
depends on whether you have used the new or legacy procedure in
SPSS Statistics to carry out the Mann-Whitney U test. However, in
both cases, this will involve assessing your data for the critical
assumption of the Mann-Whitney U test (i.e., that you have similarly
shaped distributions).Whether your data passes or fails this
assumption will determine how you can interpret and report your
results.
Interpreting Results
Similar distributions after running the new or legacy procedures: If you have met the
assumption of similarly shaped distributions, you are in the fortunate position to
determine whether the median score for your two groups (e.g., "males" and females"
for our independent variable, "gender") are different in terms of the dependent variable
(e.g., "engagement", in our example). We say that you are 'fortunate' because if you
had failed this assumption, you would not be able to determine how large any
differences between your two groups were.
Dissimilar distributions after running the new or legacy procedures: If you have run the
new procedure in SPSS Statistics and have failed the assumption of similarly shaped
distributions, you can only determine whether the values in one group are lower or
higher than the values in the other group (e.g., females higher than males), by
comparing the mean ranks of each distribution of scores (e.g., males and females
engagement scores). Therefore, you lose some of the descriptive power that you get
when comparing medians, which you can do when the assumption of similarly shaped
distributions is met. Nonetheless, you can still obtain valuable information about your
two groups in terms of the dependent variable (i.e., did one group have higher or lower
values than the other).
Interpreting Results
Comparison of medians (when you have used the new procedure)
THIS IS TO BE USED WHEN SHAPE OF THE DISTRIBUTIONS ARE SIMILAR
Before we evaluate the p-value and the decision reached, let us look at the breakdown of
this result using the table presented in the right-hand pane of the Model Viewer window
and how it relates to the Hypothesis Test Summary table just evaluated (shown below):
The diagram above shows how the tables are linked together by the result for the statistical significance of
the test; specifically, the exact statistical significance level (highlighted in red). The exact statistical
significance level is not always calculated by SPSS Statistics (to Dineen & Blakesley's (1973) algorithm), but
when it is, it is the exact p-value that is used in the Hypothesis Test Summary table
Now that you know how to report the result of the Mann-Whitney U test, you can add
in the group median values by consulting the Report table, as shown below:
Putting it altogether
Interpreting Results
Comparison of distributions (when you have used the new
procedure)
THIS IS TO BE USED WHEN SHAPE OF THE DISTRIBUTIONS ARE DISSIMILAR
Now that you have established that the distributions of engagement scores are different for males and for
females, you need to revisit the Hypothesis Test Summary table, which is found in the left-hand pane of
the Model Viewer window, and shown below:
Before we evaluate the p-value and the decision reached, let us look at the breakdown of this result using the
table presented in the right-hand pane of the Model Viewer window and how it relates to the Hypothesis Test
Summary table just evaluated (shown below):
Now that you know how to report the the result of the Mann-Whitney U test, you can
add in the mean rank values that are found in the population pyramid chart, as
highlighted below:
The above graph shows that the mean rank for males was 23.25, which was higher
than females who had a mean rank of 17.75. However, as we have already
discovered, these mean ranks are not statistically significantly different.
Putting it altogether
Note that the p-value has changed in the above statements. This is important because we are now
reporting the value in the "Asymptotic Sig. (2-tailed test)" row. Let's now consider an example where
there was a statistically significant difference between distributions. You could report this as follows
(statistics made up to fit the statement):
Putting it altogether
Now that you have established that the distributions of engagement scores are
similar between males and females, you need to consult the Test Statistics table
that shows the results of the Mann-Whitney U test, as shown below:
Comparison of medians (when you have used the legacy
procedure)
Note that the p-value has changed in the above statements. This is
important because we are now reporting the value in the "Asymp. Sig.
(2-tailed)" row. Let's now consider an example where there was a
statistically significant difference in medians. You could report this as
follows (statistics made up to fit the statement):
Putting it altogether
You could report the results of a statistically significant Mann-Whitney U test using
an asymptotic p-value as follows (statistics made up to fit the statement):
Reporting using distributions
(assumption was not met)
You could report the results of a statistically significant Mann-Whitney U test using
an asymptotic p-value as follows (statistics made up to fit the statement):
Source: