98 次浏览

Mann-Whitney U 检验:两独立组比较的非参数方法

What Is the Mann-Whitney U Test?

The Mann-Whitney U test compares two independent groups when the outcome is at least ordinal and the assumptions for the independent t-test are not convincing. It is often used when data are skewed, contain outliers, or are measured on a ranking scale.

You may also see it called the Wilcoxon rank-sum test. The central idea is simple: instead of comparing raw values directly, the test compares the ranks of the observations across the two groups.

When Should You Use It?

  • You have two independent groups.
  • The outcome is ordinal or continuous.
  • The distribution is strongly skewed or includes influential outliers.
  • You want a robust comparison that does not rely on the normality assumption required by the independent t-test.

What Does the Test Evaluate?

The test assesses whether values from one group tend to be larger or smaller than values from the other group. When the shapes of the two distributions are reasonably similar, the test is often interpreted as a comparison of central tendency.

Step-by-Step Method

  1. Combine all observations from both groups.
  2. Rank the values from smallest to largest.
  3. Assign average ranks to tied values.
  4. Sum the ranks for each group.
  5. Calculate the U statistic from the rank sums.
  6. Obtain the p-value and interpret the result.

An Original Example

Suppose a clinic compares waiting times for two appointment systems. Group A uses a structured booking system, and Group B uses a walk-in system. Waiting times are strongly right-skewed because a few patients waited much longer than the rest.

After ranking the values, suppose the Mann-Whitney U test gives U = 28 and p = 0.03. The median waiting time is 14 minutes in Group A and 21 minutes in Group B.

This result suggests that the structured booking system tends to produce shorter waiting times. The conclusion is based on the ordering of observations rather than on the mean alone, which makes it less sensitive to a few unusually long waits.

How to Report and Interpret the Result

A useful report includes the group medians or another robust summary, the U statistic, the p-value, and a short practical interpretation. If possible, also report an effect size so readers can judge the magnitude of the difference instead of focusing only on statistical significance.

Assumptions to Remember

  • Observations are independent.
  • The two groups are independent of each other.
  • The outcome is ordinal or continuous.
  • If you want to interpret the result as a location shift, the shapes of the two distributions should not be radically different.

Common Mistakes

  • Using the test for paired data instead of independent groups.
  • Describing it as a test of means.
  • Ignoring whether the distribution shapes differ a lot between groups.
  • Reporting only the p-value without medians or spread.

Short Summary

The Mann-Whitney U test is a valuable fallback when the independent t-test is a poor fit for the data. By working with ranks, it offers a practical and interpretable way to compare two independent groups under non-normal conditions.