Skip to main content

Mann-Whitney test in Excel tutorial

This tutorial will help you run and interpret a Mann-Whitney test on two independent samples in Excel using XLSTAT.

What is a Mann-Whitney test?

The Mann-Whitney test is a non parametric test that allows to compare two independent samples.

Three researchers, Mann, Whitney, and Wilcoxon, separately perfected a very similar non-parametric test which can determine if the samples may be considered identical or not on the basis of their ranks.

This test can only be used to study the relative positions of the samples. For example, if we generate a sample of 500 observations taken from an N(0,1) distribution and a sample from a distribution of 500 observations from an N(0,4) distribution, the Mann-Whitney test will find no difference between the samples.

The results proposed by XLSTAT are based on the U statistic of Mann-Whitney.

Dataset for running a Mann-Whitney test in Excel

The data are from [Fisher M. (1936), The Use of Multiple Measurements in Taxonomic Problems. Annals of Eugenics, 7, 179 -188] and correspond to 100 Iris flowers, described by four variables (sepal length, sepal width, petal length, petal width) and their species. The original dataset contains 150 flowers and 3 species, but we have isolated for this tutorials the observations belonging to the versicolor and virginica species. Our goal is to test if for the four variables, there is a clear difference between the two species.

The goal of this tutorial is to compare the two species with respect to the four variables independently.

Setting up a Mann-Whitney test on two independent samples

Once XLSTAT-Pro is activated, select the XLSTAT / Nonparametric tests / Comparison of two samples (Wilcoxon, Mann-Whitney, ...) command.

XLSTAT Function for the comparison of two samples

Once you've clicked the button, the dialog box appears. You can then select the data on the Excel sheet. Select the one column per variable option because, we have 4 columns of data and one column corresponding to the species identifiers. XLSTAT dialog box for setting up a Mann-Whitney test (general tab)

In the options tab, we suppose that the difference between samples is equal to 0. Note that exact p-value can be computed with XLSTAT. XLSTAT dialog box for setting up a Mann-Whitney test (option tab)

After you have clicked on the OK button, the results are displayed on a new Excel sheet (because the Sheet option has been selected for outputs).

Interpreting the results of a Mann Whitney test on two independent samples

The first results displayed are the statistics for the various samples. For each variable, we obtain a test result.

We can see that for the first variable, the null hypothesis of equality is rejected. We can consider that the sepal length is significantly different from one specie to the other.

Output for a Mann-Whitney test

Results for the other variables are also available in the output.

Not sure you chose the right test? This guide will let you know.

Was this article useful?

  • Yes
  • No