Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide

Understanding the Mann-Whitney U Test

The Mann-Whitney U Test (often referred to as the Wilcoxon rank-sum test) stands as a vital tool in statistical analysis, particularly when standard assumptions for parametric methods are violated. It is fundamentally employed to assess whether two independent samples originate from the same distribution. This test is the primary nonparametric alternative to the Independent Samples t-test, designed specifically for situations where the data distributions are not assumed to follow a specific shape, such as the normal distribution.

The Mann-Whitney U test operates by converting the raw data scores from both groups into ranks, and then comparing the sum of the ranks for each group. This approach is highly robust against outliers and is suitable for ordinal data or continuous data where the assumption of normality is demonstrably false, or when the sample sizes are small (typically N < 30 per group). By focusing on ranks rather than the actual raw score values, the test manages to compare the central tendencies (often the median) of the two populations without requiring strict adherence to parametric assumptions regarding variance or distribution shape.

Choosing this test is often mandatory in fields like psychology, medicine, and social sciences where collected data frequently fails preliminary tests for normality, or where the measurement scale is inherently ordinal. The decision to use the Mann-Whitney U test confirms a commitment to rigorous statistical practice, ensuring that the chosen analytical method aligns correctly with the underlying properties of the sample data. This tutorial provides a comprehensive walkthrough of executing and interpreting this powerful test using IBM SPSS Statistics.

The Statistical Context and Hypotheses

Before running any statistical analysis, it is essential to clearly define the formal hypotheses being tested. Because the Mann-Whitney U test is nonparametric, its hypotheses focus on the distributions of the populations rather than strict population means, although in practice, it often addresses differences in medians. The core question is whether the values in one population tend to be larger than the values in the other population.

For the purpose of the test, we establish the following formal hypotheses:

  1. The Null Hypothesis (H₀): There is no difference in the distributions of the two populations. Specifically, the probability that a randomly selected observation from the first population is greater than a randomly selected observation from the second population is equal to the probability that the reverse is true (i.e., P(X₁ > X₂) = P(X₂ > X₁)).
  2. The Alternative Hypothesis (Hₐ): The distributions of the two populations are significantly different. That is, the values in one population tend to be larger than the values in the other (P(X₁ > X₂) ≠ P(X₂ > X₁)).

The objective of the SPSS procedure is to generate a test statistic (Z) and a corresponding p-value. This p-value quantifies the probability of observing the data (or data more extreme) assuming the null hypothesis is true. If the calculated p-value is less than the predetermined significance level (alpha, typically set at 0.05), we reject the null hypothesis, concluding that a statistically significant difference exists between the distributions of the two groups.

Setting Up the Data and Research Scenario in SPSS

To illustrate the application of the Mann-Whitney U test, consider a common research scenario involving vehicle performance. Researchers are investigating whether a newly developed fuel treatment has a measurable impact on the average miles per gallon (MPG) achieved by a car. They designed a controlled experiment involving 24 cars, randomly assigning 12 cars to the treatment group (receiving the fuel additive) and 12 cars to the control group (receiving no additive).

The data must be structured correctly in SPSS, requiring two essential variables: the dependent variable (MPG) and the independent grouping variable (Group). The MPG variable contains the continuous measurement of fuel efficiency for each car. The Group variable is categorical, coded numerically to distinguish between the control and treatment conditions. In this example, the coding is established as: 0 = No Fuel Treatment (Control Group), and 1 = Fuel Treatment (Experimental Group).

The screen capture below displays the precise format required for the data in the SPSS Data View. Note that because the sample size is small (n=12 per group) and the researchers anticipate potential skewness or non-normality in the MPG performance data, the nonparametric Mann-Whitney U test is chosen as the appropriate statistical approach to determine if the fuel treatment yields a statistically significant difference in MPG.

Step-by-Step Procedure for the Test in SPSS

Executing the Mann-Whitney U test in SPSS involves navigating through the menu system to access the appropriate dialog boxes. Since this test is a foundational statistical procedure, it is located within the “Legacy Dialogs” section, which houses many of the classic nonparametric tests. The procedure ensures that the analysis correctly identifies both the measured variable and the grouping variable.

The following steps detail the necessary navigation within the SPSS interface:

  1. Select the Test Option: Begin by clicking the Analyze tab in the main menu bar. Hover over Nonparametric Tests, then select Legacy Dialogs, and finally click 2 Independent Samples. This path leads directly to the configuration window for two-sample nonparametric comparisons.

  1. Define Variables and Parameters: In the “Two-Independent-Samples Tests” dialog box that appears, you must correctly assign the variables. Drag the continuous dependent variable, mpg, into the box labeled Test Variable List. Next, drag the categorical independent variable, group, into the box labeled Grouping Variable.

Once the grouping variable is assigned, it is mandatory to specify the exact values that define the two groups. Click the Define Groups button. In the subsequent window, input the codes used in your data: define Group 1 as the value 0 (No Treatment) and define Group 2 as the value 1 (Fuel Treatment). Click Continue to return to the main dialog box. Before proceeding, verify that the checkbox next to Mann-Whitney U is selected (it is usually selected by default). After confirming all settings, click OK to execute the analysis and generate the output.

Mann Whitney U test in SPSS

Interpreting the SPSS Output Tables

Upon execution, SPSS generates two primary tables vital for interpreting the results: the Ranks table and the Test Statistics table. The Ranks table provides descriptive information based on the rank transformation, showing the sample size (N), Mean Rank, and Sum of Ranks for each of the two groups. A quick glance at the Mean Ranks can provide an initial indication of which group tends to have higher values; however, the actual statistical significance is determined by the Test Statistics table.

The Test Statistics table contains the core inferential results, specifically the calculated Mann-Whitney U statistic, the related Wilcoxon W statistic, the standardized Z test statistic, and the critical Asymptotic Significance (2-tailed p-value). The Z test statistic is derived from the U statistic and is used to determine the probability of obtaining the observed difference under the null hypothesis.

For our fuel treatment example, the key results from the output table are:

Output of Mann-Whitney U Test in SPSS

  • Z test statistic: -1.279
  • p-value (Asymp. Sig. 2-tailed): 0.201

To make a definitive statistical conclusion, we compare the p-value (0.201) to our established significance level (α = 0.05). Since 0.201 is substantially greater than 0.05, we do not have sufficient evidence to reject the null hypothesis. This finding suggests that there is no statistically significant difference in the distribution of MPG scores between the cars that received the fuel treatment and those that did not. In practical terms, based on this sample, the fuel treatment did not statistically alter the vehicle’s fuel efficiency.

Conclusion and Formal Reporting

The final step in any statistical analysis is to formally report the findings in a clear, concise manner suitable for academic papers or research reports. The reporting must include the type of test used, the sample sizes, the calculated test statistic (Z), and the exact p-value, along with a statement regarding the hypothesis decision.

When reporting nonparametric results, it is often best practice to use medians rather than means to describe the central tendency of the groups, as the Mann-Whitney U test is sensitive to differences in location or distribution shape, not necessarily the mean. However, when reporting the test statistic, adherence to the output generated by SPSS is crucial.

Based on the analysis conducted on the 24 cars, we conclude that the new fuel treatment did not produce a measurable change in MPG performance. The formal statistical write-up should look similar to the example provided below, ensuring all critical statistical details are included to support the conclusion.

A Mann-Whitney U test was conducted to evaluate the impact of a new fuel treatment on vehicle miles per gallon (MPG). The analysis compared the MPG distribution of 12 cars receiving the treatment against 12 control cars.

Results indicated that the distribution of MPG scores was not statistically significantly different between the two groups (U = 59.0, Z = -1.279, p = 0.201). Given that the p-value exceeded the conventional significance level of 0.05, we failed to reject the null hypothesis.

Therefore, based on this experimental data, there is no sufficient statistical evidence to suggest that the new fuel treatment has a significant effect on improving the miles per gallon achieved by cars.

Cite this article

Mohammed looti (2025). Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide. PSYCHOLOGICAL STATISTICS. Retrieved from https://statistics.arabpsychology.com/perform-a-mann-whitney-u-test-in-spss/

Mohammed looti. "Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide." PSYCHOLOGICAL STATISTICS, 8 Nov. 2025, https://statistics.arabpsychology.com/perform-a-mann-whitney-u-test-in-spss/.

Mohammed looti. "Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide." PSYCHOLOGICAL STATISTICS, 2025. https://statistics.arabpsychology.com/perform-a-mann-whitney-u-test-in-spss/.

Mohammed looti (2025) 'Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide', PSYCHOLOGICAL STATISTICS. Available at: https://statistics.arabpsychology.com/perform-a-mann-whitney-u-test-in-spss/.

[1] Mohammed looti, "Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide," PSYCHOLOGICAL STATISTICS, vol. X, no. Y, ص Z-Z, November, 2025.

Mohammed looti. Learn How to Perform a Mann-Whitney U Test in SPSS: A Step-by-Step Guide. PSYCHOLOGICAL STATISTICS. 2025;vol(issue):pages.

Download Post (.PDF)
Scroll to Top