Atlas
statminds
Nonparametric (Rank-Sum Model)The underlying model family class (e.g. GLM, linear model, categorical matrix, log-linear).Parametric ReferenceStatistical methods that assume a specific probability distribution family (typically normal).12-stage workflow

Mann-Whitney U Test

The engine for Robust Comparative Discovery. This model audits the stochastic dominance between two independent groups, revealing if one group typically scores higher than the other without assuming normality.

Model familyNonparametric (Rank-Sum Model)
Hypothesistwo-tailed
AliasesWilcoxon Rank Sum Test · Mann-Whitney-Wilcoxon (MWW) · Two-Sample Rank Test
G1
Stochastic Dominance Audit
Determine the probability that a randomly selected participant from Group A will score higher than one from Group B.
G2
Ordinal Integrity Shield
Protect discovery when data is ranked or when extreme outliers make the mean an unreliable indicator.
G3
Distribution-Free Strike
Isolate group differences without the restrictive mandates of the bell curve.
Visual Overview Dashboard
1

What is it?

Mann-Whitney U Test (Wilcoxon Rank-Sum) compares ranked scores of two independent groups. Nonparametric alternative to Independent samples T-Test.

2

When to use it

  • Two Groups: Independent treatments or categories.
  • Non-Normal Data: Continuous outcomes violating normality or ordinal metrics.
3

Core Idea

Combines and ranks all measurements. If a significant separation exists, one group will cluster at the lower ranks and the other at the higher ranks:

Low RanksHigh Ranks
4

Hypotheses

H0: Distributions are stochastically equal (prob. G1 > G2 is 0.5)
Ha: One group stochastically dominates the other
5

How it works

  1. Combine all scores and sort them to assign overall ranks.
  2. Sum the ranks for Group 1 (R1) and Group 2 (R2).
  3. Compute U stats. Set U = min(U1, U2).
  4. Assess significance (normal approximation used for N > 10).
6

Assumptions

📊 Ordinal/Continuous: Outcome must be rankable.
👤 Independence: Unrelated subjects in groups.
7

Effect Size

Rank-Biserial correlation: **r = 1 - (2U / (N1 * N2))**. Yields value from -1.0 to +1.0 indicating degree of stochastic separation.

8

Quick Example

GroupRank SumU Stat
G1 (N=10)75U = 20 (p = 0.012)
G2 (N=10)135
Interactive Sandbox

Mann-Whitney Ranks Live Laboratory

Adjust the Group 2 shift to see how overall ranks sort and change rank sum indicators.

Presets
Group 2 shift6.0
Size G1 (N1)12
Size G2 (N2)12
Sorted Combined Data Ranks (Amber: G1, Green: G2)Values mapped left to right (low to high ranks)
123456789101112131415161718192021222324
Calculations Output
MetricGroup 1Group 2
Sample Size1212
Rank Sum133167
U statistic55
p-value0.3314
Statistical Verdict
❌ Stochastic Equality
Rank assignments are mixed randomly (U = 55, p = 0.331). Fail to reject H0.
The 12-Stage Precision Workflow
01Stochastic Equality
Hypotheses
We test the null of 'Probabilistic Parity' against the discovery that one group consistently outranks the other.
02Independence Mandate
Assumptions
The only strict requirement: observations must be unrelated between and within groups—the bedrock of rank-sum authority.
03Shape Symmetry
Diagnostics
Checking if group distributions share the same shape; if so, we can claim a 'Median Shift'. If not, we claim 'Stochastic Dominance'.
04focus
Comparing recovery ranks of FlowMotion vs. Usual Care in a skewed clinical sample where most patients reported extreme outcomes.
05Welch / T-Test Pivot
Alternatives
Knowing when to switch to Welch's T-test if the data is actually normal or if you specifically need to model the Mean rather than the Rank.
06Exact vs Asymptotic
Significance
Utilizing Exact p-values for small samples (N < 20) to ensure the rank-based strike is mathematically perfect.
07Probability of Superiority
Effect Size
Converting 'U' into the 'Common Language Effect Size' (CLES)—the actual percentage chance of one group beating the other.
08Efficiency Ratio
Sample Size
Accounting for the 'Asymptotic Relative Efficiency' (95.5%)—Mann-Whitney is nearly as powerful as the T-test even on normal data.
09The Median Narrative
Reporting
Reporting Medians and Interquartile Ranges (IQR) alongside the U-statistic: 'U = X.XX, p = .XXX, Median_A vs Median_B'.
10Wilcox.test Logic
Software
Executing 'wilcox.test(paired = FALSE)'—ensuring the algorithm performs the independent rank-sum calculation.
11focus
The fatal error of reporting means and SDs for a Mann-Whitney test, which ignores the very reason you chose a rank-based model.
12focus
Tracing the model back to Mann, Whitney, and Wilcoxon and the mid-century revolution in distribution-free forensics.
01Hypothesis test logic

Hypotheses

Pragmatic null and alternative hypotheses defined in mathematical notation.

A hypothesis is a question sharpened to a point. Ambiguity is the enemy of inference.
Logic Core
Null · H₀

H₀: The two distributions are identical (P(X > Y) = 0.5)

Alternative · Hₐ

Hₐ: One distribution is stochastically larger than the other (P(X > Y) ≠ 0.5)

Why it matters two-tailed

Tests stochastic dominance via rank sums. IMPORTANT: Only interpretable as a test of medians when distributions have similar shapes (same variance and skewness). Otherwise, it tests whether one distribution tends to have larger values than the other (stochastic dominance), not specifically medians.

02Model diagnostics

Assumptions

The core mathematical criteria needed to ensure that statistical testing remains unbiased and valid.

Build your analysis on rock, not sand. Verify the mathematical foundation before building the model.
Integrity Shield
5
Assumptions
3
Critical / High Severity
How to check
Quick
Inspect variable type; verify data has meaningful ordering (e.g., pain scale 1-10, education level). If continuous with severe skewness/outliers, Mann-Whitney is appropriate alternative to t-test
Rigorous
For continuous data: create Q-Q plots and run Shapiro-Wilk test to verify non-normality justifies nonparametric approach. For ordinal data: verify scale has ordered categories with consistent interpretation
If violated
If nominal/categorical with no ordering (e.g., eye color, treatment type) → use chi-square test of independence or Fisher's exact test. If truly continuous and normal → use independent-samples t-test (more powerful). If interval scale with only 2-3 categories → consider exact tests
independent t test
How to check
Quick
Confirm study design; verify grouping variable has exactly 2 unique values; check each subject belongs to one and only one group. Between-subjects design required
Rigorous
Verify randomization scheme if experimental; check no subject ID appears in both groups; confirm mutual exclusivity of group assignment. Check for clustering (e.g., multiple observations per subject, family, site)
If violated
If >2 groups → use Kruskal-Wallis H test (nonparametric ANOVA) + Dunn's post-hoc with Holm correction. If paired/matched samples (same subjects measured twice, or matched pairs) → use Wilcoxon signed-rank test. If clustered/nested data → use linear mixed models with appropriate random effects or rank-based alternatives with cluster adjustment
kruskal walliswilcoxon signed ranklinear mixed model
How to check
Quick
Design review; check if any subject IDs appear multiple times; look for clustering indicators (family ID, site, school); verify no repeated measures or matched pairs design
Rigorous
Check for temporal autocorrelation if data collected sequentially; verify sampling design ensures independence; calculate intraclass correlation (ICC) to detect clustering; confirm no carryover effects or contamination between subjects
If violated
If paired/matched data (pre-post, twins, matched controls) → use Wilcoxon signed-rank test instead. If clustered data (students in schools, patients in clinics) → use linear mixed models with random intercepts or GEE with appropriate correlation structure. If time series with autocorrelation → use time series methods or rank-based regression with robust SEs. Never ignore dependence structure
wilcoxon signed ranklinear mixed modelgee
How to check
Quick
Visual inspection: Create side-by-side boxplots and overlaid density plots/histograms for each group. Compare interquartile ranges (IQR ratio should be roughly 0.5-2.0). Check if distributions have similar skewness (both right-skewed, both symmetric, etc.)
Rigorous
Compare variances (SD ratio <2.0 suggests similar spread); compare skewness and kurtosis statistics between groups; use Levene's test or Brown-Forsythe test for homogeneity of variance (though less critical than for t-test); visual CDF comparison should show parallel curves
If violated
If shapes differ notably: Mann-Whitney still valid but interprets as stochastic dominance (P(X>Y) ≠ 0.5), NOT as median test. Report as 'distributions differ' not 'medians differ'. For specific median test when shapes differ → use Mood's median test (uses contingency table of above/below combined median) or quantile regression at 50th percentile. For mean comparison with non-normal data → use permutation t-test or Welch's t-test with bootstrap CI
quantile regression
How to check
Quick
Count number of unique values relative to sample size. For continuous data, ties should be rare (<5% of observations). For ordinal data with limited categories, ties are expected but shouldn't be extreme (>50% tied at single value)
Rigorous
Calculate proportion of tied ranks; most software automatically applies tie correction to test statistic. Check if outcome variable has been artificially coarsened (e.g., continuous measure rounded to integers). Examine frequency distribution
If violated
Moderate ties: Mann-Whitney automatically applies tie correction (won't affect validity, only precision). Excessive ties (>50% of data at few values): (1) If ordinal with few categories → use exact test version or permutation test; (2) If artificial coarsening → obtain more precise measurements; (3) Consider ordinal logistic regression for explicit modeling of ordered categories; (4) If binary outcome → use chi-square test. Don't dichotomize continuous variables to avoid ties (loses power)
03Residual Forensics

Diagnostics

Checking residual plots and indices to examine model deviations and ensure standard error integrity.

Trust, but verify. The outliers often hold more truth than the averages.
System Health
Essential checks
  1. Side-by-side boxplots for each group to compare distributions
  2. Overlaid density plots or histograms to assess shape similarity
  3. Descriptive statistics per group (median, IQR, range, n)
  4. Check proportion of ties in rankings
Recommended checks
  1. Q-Q plots per group (to verify non-normality justifies nonparametric approach)
  2. Cumulative distribution function (CDF) plots for both groups
  3. Shapiro-Wilk test per group (if considering parametric alternative)
  4. Variance ratio and IQR ratio between groups
  5. Scatterplot of ranks to visualize stochastic dominance
04Live Instances

Applied Minds

Review concrete study examples, data layout guidelines, and copy executable syntax scripts.

Theory is the map. Practice is the terrain. Simulation bridges the gap.
Applied Wisdom
Example 01

Pain Reduction Comparison (Classic Mann-Whitney with Ordinal Data)

Research question: Does a new mindfulness-based intervention reduce chronic pain more than standard treatment? Design: RCT with 2 groups (Mindfulness n=40, Standard Treatment n=40). Outcome: Pain reduction on 11-point Numerical Rating Scale (NRS) from baseline to 8 weeks (ordinal, 0-10, higher = more reduction). Data are ordinal and right-skewed. Parametric t-test assumptions violated (Shapiro-Wilk p=.003).

DesignBetween-subjects RCT
GroupsMindfulness · Standard Treatment
Total n80
Outcome ScalePain reduction on 11-point NRS (ordinal, 0-10)
# Mann-Whitney U Test: Mindfulness vs. Standard Treatment for Pain Reduction
# Based on realistic effect sizes from mindfulness-pain meta-analyses

library(tidyverse)
library(effectsize)    # For rank biserial correlation
library(coin)          # For exact and asymptotic tests
library(rstatix)       # For comprehensive nonparametric output

# Simulate realistic ordinal data with right skew (or load: data <- read.csv("pain.csv"))
set.seed(2025)
data <- data.frame(
  group = rep(c("Mindfulness", "Standard"), each=40),
  pain_reduction = c(
    # Mindfulness: median=4, right-skewed ordinal (0-10)
    sample(0:10, 40, replace=TRUE, prob=c(0.02, 0.03, 0.04, 0.06, 0.12, 0.15, 0.18, 0.16, 0.12, 0.08, 0.04)),
    # Standard: median=2, right-skewed ordinal
    sample(0:10, 40, replace=TRUE, prob=c(0.05, 0.10, 0.15, 0.20, 0.18, 0.12, 0.08, 0.06, 0.03, 0.02, 0.01))
  )
)

# === STEP 1: Check if Parametric Test is Appropriate ===

# Test normality (if violated, justifies nonparametric approach)
print("=== Normality Tests(to justify Mann-Whitney) ===")
by(data$pain_reduction, data$group, shapiro.test)
# Result: Both groups p < .05 → non-normal, Mann-Whitney appropriate

# Q-Q plots show departure from normality
par(mfrow=c(1,2))
for (grp in c("Mindfulness", "Standard")) {
  qqnorm(data$pain_reduction[data$group == grp], main=paste(grp, "Q-Q Plot"))
  qqline(data$pain_reduction[data$group == grp])
}

# === STEP 2: Check Mann-Whitney Assumptions ===

# 1. Independence: Confirmed by study design (between-subjects RCT, no repeated measures)
cat("\n=== Assumption Checks ===")
cat("\nIndependence: Confirmed(between-subjects design, no pairing)")

# 2. Similar distribution shapes (for median interpretation)
cat("\n\nShape Similarity:")
# Visual check: boxplots
ggplot(data, aes(x=group, y=pain_reduction, fill=group)) +
  geom_boxplot(alpha=0.6) +
  geom_jitter(width=0.1, alpha=0.3) +
  labs(title="Pain Reduction: Mindfulness vs. Standard Treatment",
       subtitle="Ordinal data(NRS 0-10), both right-skewed",
       y="Pain Reduction(NRS points)", x="Group") +
  scale_fill_brewer(palette="Set2") +
  theme_classic() +
  theme(legend.position="none")

# Density plots overlaid
ggplot(data, aes(x=pain_reduction, fill=group)) +
  geom_density(alpha=0.5) +
  labs(title="Distribution Shape Comparison",
       subtitle="Similar right-skewed shapes → median interpretation valid",
       x="Pain Reduction(NRS)", y="Density") +
  scale_fill_brewer(palette="Set2") +
  theme_classic()

# Compare IQRs (should be similar for median interpretation)
mindfulness_data <- data$pain_reduction[data$group == "Mindfulness"]
standard_data <- data$pain_reduction[data$group == "Standard"]

iqr_mindfulness <- IQR(mindfulness_data)
iqr_standard <- IQR(standard_data)
iqr_ratio <- iqr_mindfulness / iqr_standard
cat(sprintf("\nMindfulness IQR: %.2f, Standard IQR: %.2f, Ratio: %.2f", 
            iqr_mindfulness, iqr_standard, iqr_ratio))
if (iqr_ratio >= 0.5 & iqr_ratio <= 2.0) {
  cat(" ✓ Similar spreads(ratio 0.5-2.0)")
} else {
  cat(" ⚠ Different spreads - interpret as stochastic dominance, not median test")
}

# === STEP 3: Descriptive Statistics ===
cat("\n\n=== Descriptive Statistics ===")
data %>%
  group_by(group) %>%
  summarise(
    n = n(),
    Median = median(pain_reduction),
    IQR = IQR(pain_reduction),
    Mean = mean(pain_reduction),
    SD = sd(pain_reduction),
    Min = min(pain_reduction),
    Max = max(pain_reduction)
  ) %>%
  print()

# === STEP 4: Run Mann-Whitney U Test ===

cat("\n=== Mann-Whitney U Test Results ===")

# Method 1: Base R (Wilcoxon rank sum)
wilcox_result <- wilcox.test(pain_reduction ~ group, data=data, 
                              exact=FALSE,  # Use normal approximation (n>20)
                              correct=TRUE)  # Continuity correction
print(wilcox_result)

# Method 2: Using rstatix (comprehensive output)
mw_test <- data %>% wilcox_test(pain_reduction ~ group)
print(mw_test)

# Method 3: Using coin package (exact test if needed)
# For exact test (small samples or many ties):
# exact_test <- wilcox_exact(pain_reduction ~ factor(group), data=data)

# === STEP 5: Effect Size ===

cat("\n=== Effect Size: Rank Biserial Correlation ===")
# Rank biserial correlation (r_rb): standardized U statistic
# Interpretation: small=0.1, medium=0.3, large=0.5 (similar to Cohen's d thresholds)
rbc <- rank_biserial(pain_reduction ~ group, data=data)
print(rbc)
cat(sprintf("\nr_rb = %.3f [95%% CI: %.3f, %.3f]", 
            rbc$r_rank_biserial, rbc$CI_low, rbc$CI_high))

# Common Language Effect Size: P(Mindfulness > Standard)
cles_value <- cles(pain_reduction ~ group, data=data)
print(cles_value)
cat(sprintf("\nCommon Language Effect Size(CLES): %.1f%%", cles_value$CLES * 100))
cat("\n(Probability that random Mindfulness patient has more pain reduction than random Standard patient)")

# === STEP 6: Visualization with Statistical Annotation ===

# Boxplot with statistical test
ggplot(data, aes(x=group, y=pain_reduction, fill=group)) +
  geom_boxplot(alpha=0.6, outlier.shape=NA) +
  geom_jitter(width=0.15, alpha=0.3, size=2) +
  stat_summary(fun=median, geom="point", size=4, color="red", shape=18) +
  labs(title="Pain Reduction: Mindfulness vs. Standard Treatment",
       subtitle=paste0("Mann-Whitney U: p=", format.pval(wilcox_result$p.value, digits=3),
                       ", r_rb=", round(rbc$r_rank_biserial, 2)),
       y="Pain Reduction(NRS 0-10)", x="Treatment Group") +
  scale_fill_brewer(palette="Set2") +
  theme_classic() +
  theme(legend.position="none") +
  annotate("text", x=1.5, y=10, 
           label=paste0("Median Mindfulness: ", median(mindfulness_data),
                        "\nMedian Standard: ", median(standard_data)),
           size=3.5)

# Cumulative distribution functions
ggplot(data, aes(x=pain_reduction, color=group)) +
  stat_ecdf(geom="step", size=1.2) +
  labs(title="Cumulative Distribution Functions",
       subtitle="Mindfulness curve shifted right → stochastic dominance",
       x="Pain Reduction(NRS)", y="Cumulative Probability",
       color="Group") +
  scale_color_brewer(palette="Set1") +
  theme_classic()

# === STEP 7: APA-Style Reporting ===

cat("\n\n=== APA-Style Report ===")
cat(sprintf("
A Mann-Whitney U test was conducted to compare pain reduction between mindfulness-based
intervention and standard treatment in adults with chronic pain. The Mann-Whitney test was
chosen because data were ordinal(11-point NRS) and violated normality assumptions 
(Shapiro-Wilk p < .05 in both groups). Distribution shapes were similar(both right-skewed),
allowing interpretation as a median test.

The mindfulness group(Mdn = %.0f, IQR = %.0f) showed significantly greater pain reduction
than the standard treatment group(Mdn = %.0f, IQR = %.0f), U = %.0f, p = %s, 
r_rb = %.2f (medium effect). The common language effect size indicated that %.0f%% of the 
time, a randomly selected participant from the mindfulness group would have greater pain 
reduction than a randomly selected participant from the standard treatment group.

These findings support mindfulness-based interventions as more effective than standard 
treatment for chronic pain reduction, consistent with meta-analytic evidence(Bawa et al., 2015).",
  median(mindfulness_data), IQR(mindfulness_data),
  median(standard_data), IQR(standard_data),
  as.numeric(wilcox_result$statistic),
  format.pval(wilcox_result$p.value, digits=3, eps=0.001),
  rbc$r_rank_biserial,
  round(cles_value$CLES * 100, 0)))

# === Optional: Compare to Parametric T-test (if it were appropriate) ===
cat("\n\n=== Comparison: What if we(incorrectly) used t-test? ===")
t_result <- t.test(pain_reduction ~ group, data=data)
cat(sprintf("\nIndependent t-test(INAPPROPRIATE): t=%.2f, p=%s",
            t_result$statistic, format.pval(t_result$p.value, digits=3)))
cat(sprintf("\nMann-Whitney U test(APPROPRIATE): U=%.0f, p=%s",
            as.numeric(wilcox_result$statistic), format.pval(wilcox_result$p.value, digits=3)))
cat("\nConclusion: Results similar, but Mann-Whitney is the correct choice given ordinal data.")
Interpretation Blueprint

U = 1105, p = .002, r_rb = 0.38 (medium effect). Mindfulness group (Mdn=4, IQR=3) showed significantly greater pain reduction than standard treatment (Mdn=2, IQR=2). Common language effect size: 69% probability that a random mindfulness participant has more pain reduction than a random standard treatment participant. Distribution shapes were similar (both right-skewed), validating median interpretation. Findings support mindfulness interventions for chronic pain, consistent with Bawa et al. (2015) meta-analysis (d=0.32).

05Tactical Pivots

Alternatives

Structured fallback pathways for choosing alternative tests when normality or slopes requirements fail.

When the path is blocked, pivot. Rigor is not rigidity; it is the intelligent adaptation to reality.
Adaptive Strategy
Measurement Precision Ladder Ideal · Ordinal / Ranked
Ratio
Consider Independent T-Test if the distribution is normal. Ranks discard raw-score magnitude.
Precision Loss
Interval
Maintain Mann-Whitney. Ideal for Skewed Scales where the mean is unrepresentative.
Standard Robustness
Ordinal
Maintain logic. The definitive engine for auditing stochastic dominance between groups.
Peak Signal
Nominal
Abandon ranks. Use Chi-Square or Phi to model unordered categorical associations.
Information Suicide
Temporal Trajectory Audit Static Comparative Snapshot
Static
Single point audit.
Stay with Mann-Whitney U. Isolate the probabilistic gap between independent samples.
Matched
Trajectory flips.
Pivot to Wilcoxon Signed-Rank Test to model the internal shift within the same subjects.
Adaptive Technical Safeguards · adaptive safeguards
distributions are normal
  • Independent T-Test — Reclaim 5% statistical power by returning to the mean-based strike.
extreme ties detected
  • Chi-Square Independence — If most data points are identical, treat the scale as purely nominal.
  • Exact Mann-Whitney Strike — Use permutation-based p-values to bypass the tie-correction approximation.
different distribution shapes
  • Brunner-Munzel Test — The robust alternative for stochastic equality when group variances/shapes differ wildly.
06Adjusted Comparisons

Post-hoc

Group mean comparisons and correction controls (e.g. Tukey HSD, Bonferroni) to protect against Family-Wise Error Rates.

The omnibus test opens the door; post-hoc analysis explores the room.
Forensic Detail
Adjusted Comparisons

Post-hoc pairwise tests defined for this model.

Interpretation Guidelines

A nonparametric p-value is a starting point. CLES is the elite metric that translates ranks into a language of probability that clinical practitioners can act upon.

07Standardized scale impact

Effect Size

Understanding effect sizes (e.g., Cohen's d, Partial Eta-Squared) and clinical impact benchmarks.

Significance is noise. Magnitude is the signal. Measure the impact, not just the probability.
Impact Magnitude

Standardized U statistic. Range: -1 to +1. Small: |0.1|, Medium: |0.3|, Large: |0.5| (Cohen's guidelines). Formula: r_rb = 1 - (2U)/(n₁×n₂). Equivalent to difference in proportion of concordant vs. discordant pairs.

Probability that random observation from group 1 exceeds random observation from group 2. Range: 0 to 1. CLES = U/(n₁×n₂). CLES=0.5 means no difference; CLES=0.7 means 70% probability of superiority. Highly interpretable for non-statisticians.

Same as CLES. P(X > Y) where X is from group 1, Y is from group 2. Direct interpretation in applied contexts (e.g., 'Patient on Drug A has 65% probability of better outcome than patient on Drug B').

Recommended Metric: rank_biserial_correlation (standardized) and common_language_effect_size (intuitive interpretation)
Small
0.2
Medium
0.5
Large
0.8
0.50
rank_biserial_correlation (standardized) and common_language_effect_size (intuitive interpretation)
Recommended Measure
3
Available Metrics
ReportUse rank_biserial_correlation (standardized) and common_language_effect_size (intuitive interpretation) to represent clinical impact magnitude.
08Statistical Power

Sample Size

Guidelines for minimum sample requirements and power analysis parameters.

An underpowered study is an ethical failure. Respect the data by collecting enough of it.
Power Protocol
Floor Requirements

The 'Rank-Stability' Mandate: A minimum of 20 participants per group is required to ensure that the stochastic dominance audit doesn't collapse due to excessive tied ranks.

Effect SizeParametersRequired n
Small Effectd=0.20 (Small)n ≈ 860 total
Medium Effectd=0.50 (Medium)n ≈ 140 total
Large Effectd=0.80 (Large)n ≈ 60 total
Key considerations

The 'Tie Penalty': If your data is highly discrete (e.g., 1-5 Likert scale), the frequency of identical ranks (Ties) will explode, effectively 'Blunting' the U-statistic. Increase sample size by 15% to compensate for rank-precision loss.

G*Power StrategyBenchmark: T-tests → Means: WMW test (non-parametric). Parameters: Cohen's d (equivalent), α = .05, Power = .80. Note: Mann-Whitney requires roughly 5-10% more N than a t-test to achieve the same power on normal data.
09APA narrative blueprint

Reporting

How to compile statistical results into publication prose matching APA and journal style guides.

Data does not speak for itself. It requires a translator. Be clear, be precise, be honest.
Narrative Arc
Worked APA paragraph example
A Mann-Whitney U test was conducted to compare pain reduction between mindfulness-based intervention and standard treatment in adults with chronic pain. The Mann-Whitney test was chosen because data were ordinal (11-point NRS) and violated normality assumptions (Shapiro-Wilk p < .05 in both groups). Distribution shapes were similar (both right-skewed; IQR ratio = 1.5), allowing interpretation as a median test. The mindfulness group (Mdn = 4, IQR = 3) showed significantly greater pain reduction than the standard treatment group (Mdn = 2, IQR = 2), U = 1105, p = .002, r_rb = 0.38 (medium effect). The common language effect size indicated that 69% of the time, a randomly selected participant from the mindfulness group would have greater pain reduction than a randomly selected participant from the standard treatment group. These findings support mindfulness-based interventions as more effective than standard treatment for chronic pain reduction, consistent with meta-analytic evidence (Bawa et al., 2015).
Reusable template

A Mann-Whitney U test was conducted to compare DV between group 1 and group 2. State reason for choosing Mann-Whitney: 'Data were ordinal' or 'Data were continuous but violated normality assumptions (Shapiro-Wilk p < .05)' or 'Data showed severe skewness and outliers'. If shapes similar: Distribution shapes were similar between groups (IQR ratio = X.XX), permitting interpretation as a median test. If shapes differ: Distribution shapes differed between groups (IQR ratio = X.XX; group 1 more skewed/variable), so results reflect stochastic dominance rather than pure median difference. Results: Group 1 (Mdn = X.XX, IQR = X.XX) showed significantly higher/lower/did not differ significantly from Group 2 (Mdn = X.XX, IQR = X.XX), U = XXX, p = .XXX, r_rb = .XX interpret: small/medium/large effect. If significant: The common language effect size indicated that XX% of the time, a randomly selected observation from group 1 would be higher/lower than a randomly selected observation from group 2. Conclude with interpretation in research context.

Essential statistics to report
  • U-statistic
  • p-value
  • effect size (rank biserial correlation)
  • descriptive statistics per group (median, IQR, n)
  • statement about distribution shape similarity
  • statement justifying nonparametric approach
  • common language effect size (optional but recommended)
10Exhibit Builder

Manuscript Lab

Copy standard summary tables and forensic reporting grids to outline analysis details.

Table 1: Mann-Whitney U Test for Non-Normal Outcome Comparison
GroupMedianMean RankSum of RanksUzpr (Effect Size)
Active45.048.21928452.5-3.12.002.35
Control32.032.81312
Note. N = 80. Used due to significant skewness in outcome distribution. Reporting Ranks.
Median (45 vs 32)Identifies the 'Shift'. Since data is skewed, the Median is a more honest representation of the 'Typical' participant than the Mean.
p = .002Confirms Stochastic Superiority. The probability that a random person from the Active group ranks higher than the Control is significantly greater than 50%.
Header glossary

The Rank Overlap. Quantifies how many times a score from the Active group ranks higher than a score from Control.

Rank-Biserial Correlation. .35 is a 'Medium' effect size. Indicates a 35% shift in rank probability between groups.

11Algorithmic Logic

Command Center

Syntax libraries and function parameters for executing calculations in stats packages.

Code is the modern laboratory. Clean execution ensures reproducible discovery.
Execution Engine
# 1. Execute Mann-Whitney U Test
wilcox.test(score ~ group, data = df, exact = FALSE)

# 2. Extract Effect Size (r)
rstatix::wilcox_effsize(score ~ group, data = df)
Library stack
R
statscoinrstatix
Python
scipy.statspingouin
Elite Forensic Strike

Mann-Whitney does not test medians unless distributions have the same shape. It actually tests 'Stochastic Dominance'—the probability that Group A ranks higher than Group B.

# Execute Exact Test (Best for small samples or many ties)
coin::wilcox_test(score ~ factor(group), data = df, distribution = 'exact')
12The Over-adjustment Trap

Common Mistakes

Analytical caveats and corrections to maintain modeling integrity.

Wisdom is learning from the failures of others. Anticipate the error before it occurs.
Defensive Logic
Why it's wrong
Mann-Whitney tests stochastic dominance (P(X>Y) ≠ 0.5), which only equals a test of medians when groups have similar distribution shapes (same variance and skewness). If one group is more variable or skewed, significant Mann-Whitney does NOT mean medians differ. This is the MOST COMMON mistake in applied research.
The correction
Before interpreting results: (1) Visually compare distribution shapes with density plots and boxplots; (2) Compare IQR ratio (should be 0.5-2.0 for similar shapes) and skewness; (3) If shapes similar → interpret as median test; (4) If shapes differ → report as 'distributions differ' or 'stochastic dominance', NOT 'medians differ'. For pure median test when shapes differ → use Mood's median test or quantile regression at 50th percentile.
Why it's wrong
Mann-Whitney assumes independence between groups. For paired data (pre-post, matched pairs, repeated measures), observations are NOT independent. Using Mann-Whitney ignores within-pair correlation, losing power and potentially inflating Type I error.
The correction
For paired data, use Wilcoxon signed-rank test (nonparametric paired test) or sign test. Check study design carefully: if same subjects measured twice, or matched pairs (twins, siblings, matched controls) → paired design → Wilcoxon signed-rank.
Why it's wrong
If data meet parametric assumptions (normality, equal variances), independent t-test is more powerful (detects smaller effects with same sample size). Mann-Whitney has ~95% efficiency when data are normal, meaning 5% power loss. While small, this loss is unnecessary if assumptions met.
The correction
Always check assumptions FIRST: (1) Q-Q plots and Shapiro-Wilk test for normality; (2) Levene's test for equal variances. If assumptions met → use t-test (more powerful). If normality violated OR severe outliers OR ordinal data → use Mann-Whitney. Don't default to nonparametric 'just to be safe' - you lose power.
Why it's wrong
p-value indicates statistical significance but not magnitude or practical importance. With large samples, tiny trivial differences can be 'significant'. Effect size answers: 'How big is the difference?' and 'Is it practically meaningful?'. Essential for meta-analysis and replication.
The correction
Always report rank biserial correlation (r_rb) or common language effect size (CLES). Interpret magnitude: |r_rb| small=0.1, medium=0.3, large=0.5. CLES is highly interpretable: 'Patients on Drug A have 65% probability of better outcomes than patients on Drug B'.
Why it's wrong
Ties reduce the precision of Mann-Whitney test. Asymptotic approximation (normal distribution) may be inaccurate with many ties. Most software applies tie correction automatically, but exact test is preferred for small samples or >25% tied ranks.
The correction
Check proportion of tied ranks. If >25% tied or small samples (n<20) → use exact test (wilcox.test(exact=TRUE) in R, or permutation version). For ordinal data with few categories → ties are expected and handled by tie correction. If ties result from artificial coarsening (e.g., rounding) → obtain more precise measurements.
Why it's wrong
Multiple pairwise comparisons inflate familywise Type I error. With 3 groups (3 pairwise tests) and α=.05 per test, familywise error ≈ .14 (14%, not 5%). With 4 groups (6 tests), error rate reaches 26%.
The correction
For ≥3 groups: (1) Run omnibus Kruskal-Wallis H test first; (2) Only if K-W p < .05, proceed to pairwise comparisons with Dunn's test + Bonferroni or Holm correction; (3) OR use pairwise Mann-Whitney with adjusted alpha (Bonferroni: α_adj = α/k where k = number of comparisons).
Why it's wrong
Dichotomizing continuous data (e.g., splitting at median into 'high' vs 'low') loses information and statistical power. Can reduce effect sizes by 30-60%. Creates artificial categories where none exist. Known as 'median split' problem in psychology.
The correction
Keep continuous/ordinal variables continuous. Use Mann-Whitney on original scale. Dichotomization is ONLY appropriate when there's a clinically/theoretically meaningful cutoff (e.g., disease diagnosis threshold, regulatory standard). Never split at sample median just for analysis convenience.
Why it's wrong
Mann-Whitney is rank-based and appropriate for skewed/non-normal data. Means and SDs are sensitive to outliers and skewness, misrepresenting central tendency and spread. Medians and IQRs are robust measures appropriate for nonparametric context.
The correction
For nonparametric tests, report medians (Mdn) and interquartile ranges (IQR), not means (M) and standard deviations (SD). Can report both for completeness, but emphasize medians. Format: 'Group A (Mdn = 4, IQR = 3) vs. Group B (Mdn = 2, IQR = 2)'. Visualize with boxplots, not bar charts with error bars.
13Academic Lineage

References

Scholarly lineage and citation keys grounding the statistical framework.

We stand on the shoulders of giants. Honor the source of the method.
Academic Lineage
[1]
Mann, H. B., & Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. Annals of Mathematical Statistics, 18(1), 50-60.
Original paper introducing the Mann-Whitney U test. Defines test as comparing two distributions via rank sums.
doi: 10.1214/aoms/1177730491
[2]
Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6), 80-83.
Original Wilcoxon rank sum test paper. Equivalent to Mann-Whitney U test but uses rank sum statistic.
doi: 10.2307/3001968
[3]
Divine, G. W., Norton, H. J., Barón, A. E., & Juarez-Colunga, E. (2018). The Wilcoxon–Mann–Whitney procedure fails as a test of medians. The American Statistician, 72(3), 278-286.
CRITICAL REFERENCE: Demonstrates that Mann-Whitney does NOT test medians unless distributions have similar shapes. Documents widespread misinterpretation in applied research.
doi: 10.1080/00031305.2017.1305291
[4]
Kerby, D. S. (2014). The simple difference formula: An approach to teaching nonparametric correlation. Comprehensive Psychology, 3, 11.IT.3.1.
Explains rank biserial correlation as effect size for Mann-Whitney. Provides intuitive interpretation and calculation.
doi: 10.2466/11.IT.3.1
[5]
McGraw, K. O., & Wong, S. P. (1992). A common language effect size statistic. Psychological Bulletin, 111(2), 361-365.
Introduces common language effect size (CLES) as intuitive, non-technical effect size measure. Probability that random observation from one group exceeds random observation from other.
doi: 10.1037/0033-2909.111.2.361
[6]
Bawa, F. L., Mercer, S. W., Atherton, R. J., Clague, F., Keen, A., Scott, N. W., & Bond, C. M. (2015). Does mindfulness improve outcomes in patients with chronic pain? Systematic review and meta-analysis. British Journal of General Practice, 65(635), e387-e400.
Meta-analysis of mindfulness for chronic pain (d=0.32). Basis for Example 1.
doi: 10.3399/bjgp15X685297
[7]
Zeidan, F., Adler-Neal, A. L., Wells, R. E., Stagnaro, E., May, L. M., Eisenach, J. C., ... & Coghill, R. C. (2016). Mindfulness-meditation-based pain relief is not mediated by endogenous opioids. Journal of Neuroscience, 36(11), 3391-3397.
Experimental evidence for mindfulness reducing pain perception. Supports Example 1 rationale.
doi: 10.1523/JNEUROSCI.4328-15.2016
[8]
Field, A. (2024). Discovering Statistics Using R (6th ed.). Sage Publications.
Chapter 7: Nonparametric tests. Comprehensive coverage of Mann-Whitney, assumptions, effect sizes, and interpretation.
When the mean is a lie, the rank is the truth. Do not fear the loss of the bell curve; embrace the robustness of the order.
The Interpretive Rigor Directive
statminds · Mann-WhitneyMind reference · v2.2 · updated 2026-01-1715 of 15 sections