Mann Whitney U test EN - pdmoerland/wiki-biostatistiek-bilingual GitHub Wiki

Mann-Whitney U test

Deze pagina lezen in het Nederlands.

Author: dr. ir. N. van Geloven
Authorship

This page was translated from the Dutch-language original using AI and has not been fully reviewed. Where the two differ, the Dutch version takes precedence.

Contents

The Mann-Whitney U test (also known as Mann–Whitney–Wilcoxon, Wilcoxon rank-sum test, or Wilcoxon–Mann–Whitney test) is a non-parametric test for comparing a (semi-)continuous variable between two independent (unpaired) groups.

When do I use the Mann-Whitney U test?

If you want to test whether the values of a (semi-)continuous variable differ between two separate groups, you can use the Mann-Whitney U test. For example, if you want to test whether the number of treated lesions differs between two arms of a study.

The Mann-Whitney U test is often used as an alternative to the unpaired t-test, because the Mann-Whitney test does not assume normally distributed data. The Mann-Whitney U test may always be used, for all ordinal data. If the data are in fact normally distributed, the Mann-Whitney will have slightly less power than the unpaired t-test to detect a difference between the two groups.

Example of the use of the Mann-Whitney U test:

Table 2. Procedural characteristics
Variable* Group A Group B p-value**
Number of lesions treated 4 [2;5] 3 [1;4] 0.45
Stent length (cm) 2.2 [1.8;4.0] 2.5 [1.7;3.8] 0.33
*Variables are denoted as median [interquartile range]. **Group differences were tested with the Mann-Whitney U test.

Did I use the right test?

We are conducting a study with percentage regression as the outcome measure (before treatment is 100%, and we look at how much has regressed after treatment). We treated two groups with the same device but with a different method. I would like to know whether there is a significant difference between the two groups in the regression measure. So I used a paired t-test to compare. My questions are: 1. Does the n of both groups need to be equal for the test? SPSS makes it 10 vs 10, while it is actually 13 vs 10. 2. Am I allowed to compare the groups this way? I assumed these are standard continuous variables.

  1. The n certainly does not need to be equal. In your case, the 10 vs 10 arises because you incorrectly performed a paired t-test: after all, you are comparing 2 independent groups of patients.
  2. A comparison of the continuous variable between 2 different groups of patients can be done using an independent t-test, provided the distribution is (approximately) normal and you do not have too small numbers. Then you present your results as means and SD. However, I see in your Excel file 13 vs. 11 patients, so relatively few, and the distribution is not normal: the mean and median values differ. So it is best to present your results as medians and interquartile ranges (25th-75th percentile) and use non-parametric statistics (Mann-Whitney test).

Graphpad gives me a different p-value for the Mann-Whitney U test than SPSS; which should I use?

I have a question about a discrepancy in results between GraphPad Prism on the one hand and SPSS Statistics on the other. For the analysis of the data from my pilot study, I used both of these programs. For instance, I compared the outcome of my primary outcome variable between the groups "Low risk" and "High risk". The result of the Mann Whitney according to GraphPad is a p-value of 0.0252; SPSS comes up with a p-value of 0.021. Although this difference is small, I keep getting 2 (slightly) different results for other variables as well. I wondered if you could help me figure out where that difference comes from and which of the 2 values I should use.

I usually recommend trusting the results of SPSS more than those of GraphPad. See for example this notice about earlier errors in the Mann Whitney implementation of GraphPad. In this case, however, it turns out, after replicating the analysis in R, that GraphPad uses a continuity correction when calculating the p-value, while SPSS gives a somewhat cruder p-value without correction. Neither is right or wrong, but given your relatively small numbers, I would use the GraphPad outcome with continuity correction. This applies to the case where there are ties (equal values) and GraphPad reports the 'asymptotic' – rather than exact – p-value.

What does the "missing analysis" line that appears in the SPSS syntax mean?

I am doing a Mann Whitney U test in SPSS (via Analyze -> Non-parametric tests -> Legacy dialogs -> 2 independent samples). After clicking 'Paste', a line "/MISSING ANALYSIS" appears in the syntax. The analysis does produce regular output. What does this code mean?

When running the Mann-Whitney test, you can choose under 'options' how to handle cases with missing values. SPSS offers two options (from the help file):

  • Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.
  • Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses. The first is the default setting and appears in the syntax as "/MISSING ANALYSIS". It means that if you have multiple outcome variables that you compare between two groups with the Mann-Whitney test, it is determined separately for each outcome variable which cases with missing values cannot be included. The second option "/MISSING LISTWISE" ensures that, for all tests, cases with a missing value in any of the outcome variables are excluded.

Which effect measure can I report when I do a Mann-Whitney U test?

The topic of the study is the completeness of reporting of an operation. I distinguish 5 facets within the reporting. To give an impression per patient, I summarize all facets into one score. Each facet weighs equally, so a patient can have a score from 0 (no facet met) to 5 (all facets reported). Now I want to compare the scores of two independent groups. The values are not normally distributed (based on the histogram and the Shapiro-Wilk test), so I would use the Mann-Whitney U test. However, I have little insight into the effect measure (as I could nicely present this as the difference between two means for a t-test). What effect measure can I present?

In this situation, you could report the 'Hodges-Lehmann estimate of the median difference'.

Where do I find the Mann-Whitney U test in SPSS?

You will find the test in SPSS under Analyze->Non-parametric Tests-> (Legacy Dialogs) -> 2 Independent Samples, or under the wizard under Analyze -> Non-parametric Tests -> independent samples.

References


Finished reading? You can go to the Overview of all topics, or to Choosing a test for help picking a suitable test or analysis. Want to learn more about biostatistics? Then follow the AMC e-learning Practical Biostatistics. Did you find something on these pages that isn't correct? Does a link not work? Or would you like to contribute to the wiki? Then get in touch with us.

This biostatistics wiki is an initiative of the former statistics helpdesk of Amsterdam UMC, location AMC. Amsterdam UMC staff can request statistical support via intranet.

⚠️ **GitHub.com Fallback** ⚠️