0% found this document useful (0 votes)
79 views65 pages

5 Mann-Whitney Test

The Mann-Whitney U test is a nonparametric test used to determine if there are differences between two independent groups on a continuous or ordinal dependent variable. It can be used as an alternative to the independent t-test when the assumptions of the t-test are violated. The Mann-Whitney U test has four main assumptions relating to study design and data distribution. It can be used for three common study designs: comparing two independent groups, comparing interventions with no pre-test, and comparing change scores between groups.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views65 pages

5 Mann-Whitney Test

The Mann-Whitney U test is a nonparametric test used to determine if there are differences between two independent groups on a continuous or ordinal dependent variable. It can be used as an alternative to the independent t-test when the assumptions of the t-test are violated. The Mann-Whitney U test has four main assumptions relating to study design and data distribution. It can be used for three common study designs: comparing two independent groups, comparing interventions with no pre-test, and comparing change scores between groups.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

MANN-WHITNEY U TEST

Introduction

The Mann-Whitney U test (also called the Wilcoxon-Mann-


Whitney test) is a rank-based nonparametric test that can
be used to determine if there are differences between two
groups on a continuous or ordinal dependent variable.

The Mann-Whitney U test is often presented as the


nonparametric alternative to the independent-samples t-test,
which can be used when your data fail the assumptions of
the independent-samples t-test. This could happen if: (a)
you have non-normally distributed data; or (b) you have an
ordinal dependent variable (i.e., the independent-samples t-
test requires a continuous dependent variable).
Basic requirements of the Mann-
Whitney U test
In order to run a Mann-Whitney U test, the following four assumptions must be met. The first
three relate to your choice of study design, whilst the fourth reflects the nature of your data:

◦ 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).

◦ Assumption #4: You must determine whether the distribution of scores


for both groups of your independent variable (e.g., the distribution of scores
for "males" and the distribution of scores for "females" for the independent
variable, "gender") have the same shape or a different shape. This will
determine how you interpret the results of the Mann-Whitney U test. Since this is a
critical assumption of the Mann-Whitney U test, and will affect how to work your
way through this guide, we discuss this further in the next section.
Study Designs

There are three types of study design where a Mann-


Whitney U test is used: (a) determining if there are
differences between two independent groups; (b)
determining if there are differences between
interventions; and (c) determining if there are
differences in change scores.
Study Design #1
Determine if there are differences
between two independent groups
If you have a study design where you are measuring the same
continuous or ordinal dependent variable in two independent (i.e.,
unrelated) groups and want to know if there are differences
between the groups, a Mann-Whitney U test might be appropriate.

In this type of study design, you have separated the participants


into different groups based on some characteristic they share
within each group, but not between the groups. For example,
participants in Group A are all "21 years old or younger", whilst
participants in Group B are all "over 21 years old". Each participant
is classified as being part of one group or the other. It is not
possible for a participant to be a member of both groups (i.e., they
cannot be older and younger than 21 years old at the same time!).
Study Design #2
Determine if there are differences between
conditions (with no pre-test measurement taken)
If you have a study design where two independent groups have
performed different interventions (e.g., a control or treatment/condition)
and the same continuous or ordinal dependent variable is measured at
the end of the study in both groups, a Mann-Whitney test might be
appropriate.

In such cases, participants are randomly assigned to one of the two


groups. Each group receives a different intervention (e.g., Group A
received no intervention, known as a 'control', whilst Group B undergo
an exercise programme, known as a 'treatment' or 'condition'. Under
normal circumstances, the dependent variable is then measured in
each group at the end of each intervention, but it can also be measured
during the intervention. Since the dependent variable is not measured
before the intervention takes place (i.e., giving a pre-test score), this
type of study design is often referred to as a 'post-test only' design.
Study Design #3
Determine if there are differences in
change scores
If you have a study design where two independent groups have
performed different interventions (e.g., control/intervention), the
same continuous or ordinal dependent variable is measured at the
beginning and end of the study in both groups, and a change score
calculated (i.e., post-values minus pre-values), a Mann-Whitney U
test might be appropriate. For example, pre- and post- blood
glucose concentration measurements were taken and change
scores calculated for an exercise intervention group and a control
group. These change scores were then compared between the two
groups using a Mann-Whitney U test. This will determine whether
the change in one group was statistically significantly different from
the change in the other group (e.g., did the exercise training change
blood glucose concentration differently to the control group).
Example used in this guide
An advertising company has designed an advertisement for a new
product that a client wants to promote to both men and women. The
company wants to know whether the advertisement they have
designed is perceived differently by men and women. To ascertain
this, the company shows the advertisement to 20 men and 20 women
and then asks them to fill in a questionnaire that measures their
engagement with the product being advertised. The questionnaire
allows an overall engagement score to be calculated and the company
wants to determine whether there are differences in this score
between men and women. This way they can know whether there are
gender differences in how the advertisement is perceived. The overall
engagement score is the dependent variable, , and "males" and
engagement

"females" are the groups of the independent variable, . In variable


gender

terms, the company wishes to know if there are differences in engagement

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:

(a) you are using SPSS version 18 or higher;

(b) your dependent variable is continuous or ordinal.

(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:

(a) you are using SPSS Statistics version 17 or older;

(b) your dependent variable is continuous or ordinal. If your dependent variable is


ordinal, you will have to carry out a few additional steps in SPSS Statistics when using
the legacy procedure, but you will not have to go back and make any changes to
the way you have set up your data in the Variable View, unlike when using the new
procedure.

(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)

To understand whether the distributions of engagement scores for males and


females have a similar shape, and therefore, whether you can compare medians,
SPSS Statistics provides you with a population pyramid chart to visually inspect
these distributions. This chart is contained within the Model Viewer window, which
you have to activate via the Hypothesis Test Summary table, as shown below:
For the moment, you can ignore the results of the table. Instead, double-click on the table
to launch the Model Viewer window. This will expose extra information about the Mann-
Whitney U test, as shown below:
The population pyramid is the chart located in the top of the right-hand pane of the
above Model Viewer window. You can use this chart to determine whether the
distributions are similar, as discussed below.

In order to use the Mann-Whitney U test to determine if there is a statistically


significant difference in the medians of the two groups of the independent variable,
you need the shape of the distributions in each group to be similar to each other.

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)

THIS IS TO BE USED WHEN SHAPE OF THE DISTRIBUTIONS ARE SIMILAR

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

Comparison of medians (when you have used the legacy


procedure)
THIS IS TO BE USED WHEN SHAPE OF THE DISTRIBUTIONS ARE SIMILAR

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

Comparison of medians (when you have used the legacy


procedure)
THIS IS TO BE USED WHEN SHAPE OF THE DISTRIBUTIONS ARE DISSIMILAR
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
between distributions. You could report this as follows (statistics made up to fit the
statement):
Reporting
How you report your results will depend on whether your
data met or violated the critical distributional assumption
of the Mann-Whitney U test. Therefore, in the sections that
follow, we show you how to report your results based on
medians (i.e., where the assumption was met) and
distributions (i.e., where the assumption was violated).
Reporting using medians
(assumption was met)

You could report the results of a non-statistically significant Mann-Whitney U test


using an asymptotic p-value as follows:

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 non-statistically significant Mann-Whitney U test


using an asymptotic p-value as follows:

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:

You might also like