Length of hospital stay is the most commonly used outcome variable in hospital efficiency research — and it is almost never normally distributed. In virtually every inpatient dataset, a minority of patients with complications, readmissions, or chronic disease stay for weeks or months, producing a severe right skew that makes the mean a misleading summary and invalidates the t-test. Yet a survey of 100 randomly selected clinical papers comparing hospital stay between two treatment groups found that 71% used an independent t-test without reporting any normality check. The consequence is inflated Type I error, confidence intervals that include physically impossible values (negative days), and effect size estimates that are driven by a handful of extreme outliers. The Mann-Whitney U test — the non-parametric alternative — is trivially easy to run and far more appropriate. Understanding when to use each test, and how to defend your choice in a viva or peer review, is one of the most practically valuable statistical skills in clinical research.
The Independent Samples t-Test
The independent samples t-test (also called Student’s two-sample t-test) tests whether the means of two independent groups differ significantly. It is a parametric test — its validity depends on a set of distributional assumptions that must be checked before use. When those assumptions hold, the t-test is one of the most powerful tests available for comparing two groups. When they fail, the t-test can produce misleading p-values and incorrect confidence intervals.
The t-Test Assumptions
- Independence: Observations within and between groups must be independent. Each patient appears once; groups do not overlap. (Violated in paired/repeated measures data — use paired t-test instead.)
- Continuous data: The outcome variable must be measured on a continuous (interval or ratio) scale. Ordinal data (pain grades, Likert scores, severity classifications) are not appropriate for the t-test.
- Approximate normality within each group: The outcome variable should be approximately normally distributed in each group separately — not in the combined sample. Assessed by Shapiro-Wilk test and visual inspection (histogram, Q-Q plot).
- Homoscedasticity (equal variances): The standard pooled-variance t-test assumes the population variances are equal across the two groups. Tested with Levene’s test. When violated, use Welch’s t-test instead.
Welch’s t-Test: The Safer Default
Welch’s t-test is a modification that relaxes the equal-variance assumption by computing a corrected (reduced) degrees of freedom when group variances differ. Most statisticians now recommend using Welch’s t-test as the default for all independent-groups comparisons, because:
- When variances are equal, Welch’s t-test performs nearly identically to the pooled t-test
- When variances are unequal, Welch’s t-test maintains correct Type I error while the pooled t-test does not
- Using Welch’s by default removes the need to pre-test variance equality (which itself has low power in small samples)
In SPSS, Welch’s result appears in the “Equal variances not assumed” row of the t-test output. In R, t.test() uses Welch’s by default; add var.equal = TRUE for the pooled version.
The Mann-Whitney U Test
The Mann-Whitney U test — also called the Wilcoxon rank-sum test (they are mathematically equivalent) — is the non-parametric alternative to the independent t-test. Instead of comparing means, it tests whether observations from one group tend to be systematically larger or smaller than observations from the other group. It does this by ranking all observations combined, then assessing whether one group’s ranks are concentrated at the high or low end of the distribution.
The U statistic counts the number of times an observation from group 1 exceeds an observation from group 2 across all possible pairs. If group 1 tends to have larger values, U will be close to n₁ × n₂ (the maximum possible); if the groups are equivalent, U ≈ n₁ × n₂/2.
What the Mann-Whitney U Test Actually Tests
A common misconception deserves direct correction: the Mann-Whitney U test does not strictly test the equality of medians. It tests stochastic dominance: whether a randomly selected observation from group 1 is more likely to be larger than a randomly selected observation from group 2. This is equivalent to testing median equality only when the two distributions have identical shapes (same spread and skewness). When distributions differ in shape, the U test can detect a difference even when medians are equal.
In practice, when Mann-Whitney U is the correct test, researchers report medians and IQRs as descriptive statistics — not means and SDs (which are misleading for non-normal data). The test result is then presented as evidence that the distributions systematically differ in the direction suggested by the median comparison.
Head-to-Head Comparison
| Feature |
Independent t-Test |
Mann-Whitney U Test |
| Type | Parametric | Non-parametric |
| Compares | Means (x̄₁ vs x̄₂) | Rank sums / stochastic dominance |
| Data scale | Continuous only | Continuous or ordinal |
| Normality required | Yes — each group separately | No |
| Equal variances | Standard: yes; Welch’s: no | Not required |
| Outlier sensitivity | High — outliers distort mean | Low — ranks absorb outliers |
| Skewed data | Robust only for large n | Appropriate at any n |
| Descriptive statistics | Mean ± SD | Median (IQR) |
| Effect size | Cohen’s d | Rank-biserial r |
| 95% CI | For mean difference | For Hodges-Lehmann estimator or bootstrap |
| Statistical power (normal data) | Higher (~5% advantage) | ARE ≈ 95.5% vs t-test under normality |
| Likert / ordinal outcomes | Not appropriate | Appropriate |
| Minimum sample size | ≥ 20 per group recommended | ≥ 5 per group; exact p for very small n |
Assumption Checking Protocol
The correct decision sequence runs normality testing first, then variance testing, then test selection. Many published papers collapse these steps or skip them entirely. The following protocol ensures the correct test is chosen and documented:
| Check | Tool | Result if OK | Result if failed |
| 1. Normality (each group) | Shapiro-Wilk + histogram + Q-Q | Proceed to step 2 | Use Mann-Whitney U — stop here |
| 2. Outliers | Box plot, z-scores (>3.3) | Proceed to step 3 | Clinically real outliers → Mann-Whitney U |
| 3. Equal variances | Levene’s test | p > 0.05 → pooled t-test | p < 0.05 → Welch’s t-test |
| 4. Data scale | Measurement review | Continuous → can use t-test | Ordinal → Mann-Whitney U |
| 5. Independence | Study design review | Independent groups → OK | Paired/matched → use paired tests |
Decision Flowchart
1
What is the measurement scale of the outcome variable?
Is the outcome measured on a continuous (interval/ratio) scale, or is it ordinal (Likert, ranked grade, severity class)?
Ordinal → Mann-Whitney U
Continuous → proceed to Step 2
2
Are there extreme outliers that are clinically real?
Inspect box plots and compute z-scores. Are any |z| > 3.3? Can they be clinically explained (e.g., extreme stays due to complications)?
Clinically real outliers → Mann-Whitney U
No extreme outliers → proceed to Step 3
3
Test normality in each group separately
Shapiro-Wilk (primary for n < 200) + histogram + Q-Q plot. Both groups must pass for t-test to be valid.
Either group non-normal → Mann-Whitney U
Both approximately normal → proceed to Step 4
4
Test equality of variances (Levene’s test)
Both groups are normally distributed. Now test whether the variances are similar enough for the pooled t-test.
Levene p < 0.05 → Welch’s t-test (unequal variances)
Levene p > 0.05 → Standard pooled t-test
Effect Size: Cohen’s d vs Rank-Biserial r
P-values tell you whether a difference is statistically detectable; effect sizes tell you how large it is. Reporting effect size is now required by APA guidelines and most major clinical journals. The two tests use different effect size metrics that must not be interchanged:
Cohen’s d (for the t-test)
Cohen’s d expresses the mean difference in units of the pooled standard deviation. It is interpretable as “the groups differ by d standard deviations.”
d = (x̄₁ − x̄₂) / Sᴝ | Small: d=0.20 · Medium: d=0.50 · Large: d=0.80
Rank-Biserial Correlation r (for Mann-Whitney U)
The rank-biserial correlation expresses the degree of separation between the two groups on a −1 to +1 scale. It equals the probability that a randomly selected observation from group 1 exceeds a randomly selected observation from group 2, re-scaled to the ±1 range.
r = 1 − (2U) / (n₁ × n₂) or r = z / √N | Small: r=0.10 · Medium: r=0.30 · Large: r=0.50
Effect Size Thresholds: Cohen’s d (t-test) and Rank-Biserial r (Mann-Whitney)
Large (d=0.80 / r=0.50)
d≥0.80
Medium (d=0.50 / r=0.30)
d≥0.50
Small (d=0.20 / r=0.10)
d≥0.20
Never report Cohen’s d for Mann-Whitney U results. Cohen’s d is defined in terms of means and standard deviations — quantities that are meaningless for non-normal data or ordinal outcomes. Reporting d alongside a Mann-Whitney result is internally inconsistent and methodologically incorrect. Use rank-biserial r (easy to compute: r = z/√N from most software’s z-approximation output) or the probability of superiority (PS = U/(n₁×n₂)).
Clinical Examples
1
Antihypertensive Treatment vs Control: Systolic Blood Pressure
A parallel-group RCT randomises 93 patients with stage 1 hypertension to either a new combination antihypertensive regimen (n = 45) or standard monotherapy control (n = 48). After 12 weeks, resting systolic blood pressure (SBP, mmHg) is the primary outcome. The research team checks assumptions to determine whether the independent t-test is valid.
138.4
Treatment mean SBP (SD 12.8)
148.7
Control mean SBP (SD 14.2)
Step 1 — Normality Testing (each group separately)
Treatment group (n=45): Shapiro-Wilk W = 0.978, p = 0.542 → normal ✓
Control group (n=48): Shapiro-Wilk W = 0.971, p = 0.297 → normal ✓
Histograms: both approximately bell-shaped; Q-Q plots: tight to diagonal ✓
Box plots: no extreme outliers in either group ✓
Step 2 — Levene's Test for Equal Variances
Levene's F(1, 91) = 1.04, p = 0.312 → variances not significantly different
→ Use standard pooled-variance t-test (not Welch's)
Step 3 — Independent Samples t-Test
Pooled SD (S_p): √[((44×12.8²) + (47×14.2²)) / 91] = 13.58
SE_diff = 13.58 × √(1/45 + 1/48) = 2.751
t(91) = (138.4 − 148.7) / 2.751 = −3.744
p < 0.001 (two-tailed)
Step 4 — Mean Difference and 95% CI
Mean difference: −10.3 mmHg (treatment lower)
95% CI: −10.3 ± 1.987 × 2.751 = [−15.8, −4.8] mmHg
Step 5 — Effect Size (Cohen's d)
d = 10.3 / 13.58 = 0.759 → approaching large effect (threshold: 0.80)
t(91) = −3.74, p < 0.001, mean difference = −10.3 mmHg (95% CI: −15.8 to −4.8), Cohen’s d = 0.76. The combination regimen produced a clinically and statistically significant SBP reduction compared to monotherapy.
Why t-test is valid here: Both groups passed Shapiro-Wilk normality testing (p = 0.542 and p = 0.297), histograms confirmed bell-shaped distributions, and no extreme outliers were present. Levene’s test confirmed comparable variances (p = 0.312), supporting the pooled t-test. The 95% CI is the most clinically informative result: the true mean SBP reduction from combination therapy lies between 4.8 and 15.8 mmHg with 95% confidence. Cohen’s d = 0.76 indicates a near-large effect — clinically meaningful given that a 10 mmHg SBP reduction is associated with approximately 20% lower stroke risk and 10% lower coronary artery disease risk in epidemiological data.
2
ICU Intervention vs Standard Care: Length of Hospital Stay
A retrospective cohort study compares length of hospital stay (days) between patients who received an early ICU mobilisation intervention (n = 52) and those who received standard ICU care (n = 55). Length of stay is heavily right-skewed in both groups due to a subset of patients with prolonged complications requiring stays of 30–60 days.
4
Intervention median stay (IQR 2–8 days)
6
Control median stay (IQR 3–12 days)
Step 1 — Normality Testing
Intervention (n=52): Shapiro-Wilk W = 0.762, p < 0.001 → severely non-normal ✗
Control (n=55): Shapiro-Wilk W = 0.749, p < 0.001 → severely non-normal ✗
Histograms: pronounced right skew in both groups; Q-Q plots: major deviation
5 patients in intervention group: stay > 30 days (real clinical outliers, not errors)
Decision: t-test INVALID → Mann-Whitney U required
Step 2 — What Happens with t-Test (Incorrect — for illustration)
Intervention mean = 7.2 days (SD 8.4); Control mean = 9.8 days (SD 11.2)
t(105) = −1.42, p = 0.159 → "not significant"
[The mean is inflated by outliers; SD is enormous; t-test has poor power here]
Step 3 — Mann-Whitney U Test (Correct)
Rank all 107 observations combined (1 = shortest stay, 107 = longest)
Sum of ranks, intervention group (R₁) = 2,332
U₁ = 52×55 + 52×53/2 − 2,332 = 2,860 + 1,378 − 2,332 = 1,906
U₂ = 52×55 − 1,906 = 2,860 − 1,906 = 954
U = min(1,906, 954) = 954
Step 4 — Significance and Effect Size
z = (954 − 2860/2) / √(52×55×108/12) = (954−1430) / 169.1 = −2.815
p = 0.005 (two-tailed)
Rank-biserial r = 1 − (2×954)/(52×55) = 1 − 1908/2860 = 0.336 → medium effect
Probability of Superiority: PS = 954/2860 = 0.334
→ A randomly selected control patient stays longer than a randomly selected intervention
patient 66.6% of the time
Mann-Whitney U = 954, n₁ = 52, n₂ = 55, z = −2.82, p = 0.005, rank-biserial r = 0.34. The early mobilisation intervention significantly reduced length of hospital stay. Intervention median: 4 days (IQR 2–8); control median: 6 days (IQR 3–12).
Why Mann-Whitney U changed the conclusion: The incorrect t-test would have returned p = 0.159, suggesting no significant difference — a false negative. Mann-Whitney U correctly identified a significant difference (p = 0.005) because it is not distorted by the extreme long-stay outliers. This difference arose because outliers inflated both groups’ means and SDs, reducing the t-test’s signal-to-noise ratio while leaving the rank-based test unaffected. The probability of superiority (PS = 0.334) provides an intuitive clinical interpretation: in only 33.4% of patient pairs does the control patient have a shorter stay than the intervention patient — in 66.6% of pairs, the control patient stays longer. Report medians and IQRs as descriptive statistics for length-of-stay data, never means and SDs.
3
PHQ-9 Depression Scores: Cardiac vs Orthopaedic Surgery Patients
A cross-sectional study compares pre-operative depression severity (PHQ-9 questionnaire, range 0–27) between patients awaiting cardiac surgery (n = 38) and those awaiting orthopaedic surgery (n = 42). PHQ-9 is an ordinal composite questionnaire score with a right-skewed distribution in most clinical populations.
7
Cardiac median PHQ-9 (IQR 4–11)
4
Orthopaedic median PHQ-9 (IQR 2–8)
MWU
Correct test (ordinal + skewed)
Dual Justification for Mann-Whitney U
Reason 1 — Ordinal scale: PHQ-9 is a sum of 9 ordinal items (0–3 each).
Although summed to 0–27, the instrument is ordinal by construction.
→ Ordinal data alone justifies Spearman / Mann-Whitney over parametric tests
Reason 2 — Non-normality: Shapiro-Wilk both groups p < 0.001.
Histograms: right-skewed with floor effect (many scores 0–3) in both groups.
→ t-test doubly inappropriate (both ordinal AND non-normal)
Mann-Whitney U Test Result
U = 582, n₁ = 38, n₂ = 42
z = −2.516, p = 0.012 (two-tailed)
Rank-biserial r = 1 − (2×582)/(38×42) = 1 − 1164/1596 = 0.271 → small-medium effect
Descriptive Statistics (appropriate for non-normal ordinal data)
Cardiac: Median PHQ-9 = 7 (IQR 4–11, range 0–24)
Orthopaedic: Median PHQ-9 = 4 (IQR 2–8, range 0–19)
Sensitivity Check: Correct vs Incorrect Analysis
Incorrect t-test: t(78) = −2.01, p = 0.048, Cohen's d = 0.45
Mann-Whitney U: z = −2.52, p = 0.012, r = 0.27
Both significant, but r = 0.27 (small-medium) is more appropriate than d = 0.45 (medium)
for ordinal data — the t-test inflated the apparent effect size.
Mann-Whitney U = 582, z = −2.52, p = 0.012, rank-biserial r = 0.27. Cardiac surgery patients showed significantly higher pre-operative depression severity (median PHQ-9 = 7) compared to orthopaedic patients (median PHQ-9 = 4), with a small-to-medium effect.
Two reasons to use Mann-Whitney U, either of which is sufficient: First, PHQ-9 is an ordinal questionnaire score, not a continuous measure — parametric tests are not scale-appropriate. Second, the distribution in both groups is right-skewed with a floor effect. The incorrect t-test produced a larger apparent effect (d = 0.45) than the correct Mann-Whitney r = 0.27, because the t-test is distorted by the skewed distribution, overestimating the separation between groups. The clinical message remains consistent: cardiac surgery patients carry a meaningfully higher depression burden pre-operatively. The statistical difference has implications for screening and psychological support service allocation — cardiac patients may benefit from routine PHQ-9 screening before elective procedures.
Thesis Writing Recommendations
The assumption-checking workflow is as important as the test result itself. Examiners expect to see documented evidence that you chose your test for principled reasons, not by habit or software default.
In the Statistical Analysis Section
State: (1) the specific test used (independent t-test with pooled or Welch’s variance, or Mann-Whitney U); (2) how normality was assessed (Shapiro-Wilk test for each group, visual inspection); (3) results of Levene’s test if the t-test was used; (4) the effect size metric reported (Cohen’s d for t-test, rank-biserial r for Mann-Whitney); (5) whether confidence intervals are reported for mean differences (t-test) or Hodges-Lehmann estimator (Mann-Whitney); (6) the descriptive statistics appropriate for each test (mean ± SD for t-test; median and IQR for Mann-Whitney).
Model Reporting — Independent t-Test
“Systolic blood pressure was compared between treatment groups using an independent samples t-test. Normality was confirmed in both groups by the Shapiro-Wilk test (treatment: p = 0.542; control: p = 0.297) and visual inspection of histograms and Q-Q plots. Levene’s test confirmed homogeneity of variances (F(1,91) = 1.04, p = 0.312), supporting the pooled-variance t-test. Results are presented as mean ± SD with 95% confidence intervals for the mean difference. Effect size is reported as Cohen’s d.”
Model Results Paragraph — t-Test
“After 12 weeks, mean systolic blood pressure was significantly lower in the combination therapy group (138.4 ± 12.8 mmHg) than in the monotherapy control group (148.7 ± 14.2 mmHg), t(91) = −3.74, p < 0.001, mean difference −10.3 mmHg (95% CI: −15.8 to −4.8), Cohen’s d = 0.76.”
Model Reporting — Mann-Whitney U Test
“Length of hospital stay was compared using the Mann-Whitney U test, which was selected because the distribution of hospital stay was significantly right-skewed in both groups (Shapiro-Wilk p < 0.001 for both), with several patients requiring prolonged stays due to post-operative complications. Data are presented as median (IQR). Effect size is reported as rank-biserial correlation (r).”
Model Results Paragraph — Mann-Whitney U
“Median length of hospital stay was significantly shorter in the early mobilisation group (4 days, IQR 2–8) than in the standard care group (6 days, IQR 3–12), U = 954, n₁ = 52, n₂ = 55, z = −2.82, p = 0.005, rank-biserial r = 0.34.”
Common Mistakes Researchers Make
Mistake 1: Using t-Test on Skewed Data Without Checking Normality
The most frequent error in clinical research. Length of stay, waiting times, laboratory values with outliers (e.g., CRP, troponin), and cost data are almost universally right-skewed, yet researchers routinely apply t-tests to them by default. The consequence is inflated Type I error (false positives), confidence intervals with impossible lower bounds (e.g., negative length of stay), and effect size estimates driven by outliers rather than the central tendency in the bulk of the data.
Fix: Run Shapiro-Wilk on each group and inspect histograms before choosing any test for two-group comparison. For classic right-skewed outcomes (length of stay, costs, enzyme levels) assume non-normality and use Mann-Whitney U unless normality is positively confirmed. Report which test was used and why in your Methods section.
Mistake 2: Reporting Means and SDs for Mann-Whitney U Results
Mann-Whitney U compares rank distributions — it is not a test of means. Reporting mean ± SD as the descriptive statistic when Mann-Whitney U was used for non-normal or ordinal data is internally inconsistent: the descriptive statistics describe a central tendency (mean) that the test did not compare and that is not representative of the data distribution. Worse, for right-skewed data, the mean is higher than the bulk of values and SD is inflated by extreme observations, giving readers a misleading picture of typical values.
Fix: For Mann-Whitney U results, always report median and IQR (interquartile range, i.e., 25th–75th percentile). Never report mean ± SD alongside a Mann-Whitney result. This is explicit in APA guidelines and ICMJE reporting recommendations for non-parametric tests.
Mistake 3: Reporting Cohen’s d as the Effect Size for Mann-Whitney
Cohen’s d is derived from means and standard deviations — quantities that are inappropriate for non-normal or ordinal data. Reporting d alongside a Mann-Whitney U test is methodologically inconsistent: the test makes no assumption about means or SDs, yet the effect size implies that means and SDs meaningfully summarise the data. Some software packages compute d automatically alongside Mann-Whitney output, creating this error inadvertently.
Fix: Report rank-biserial correlation r (computed as r = z/√N from the z-approximation output, or r = 1 − 2U/(n₁n₂) directly) or the probability of superiority (PS = U/(n₁n₂)). The rstatix package in R, and SPSS ≥ v27, compute rank-biserial r directly. For older SPSS, calculate manually from the z statistic and N.
Mistake 4: Stating Mann-Whitney U Compares Medians
The Mann-Whitney U test tests stochastic dominance — not median equality. The statement “Mann-Whitney U test was used to compare the medians” (extremely common in published papers) is technically incorrect. The test can reject the null hypothesis even when medians are equal if the distributions have different shapes. Conversely, it can fail to detect a difference in medians if other distributional properties differ in compensating ways.
Fix: State correctly in your Methods: “Mann-Whitney U test was used to compare the distribution of [outcome] between groups.” When reporting results, note the medians and IQRs as descriptive summaries, but do not frame the test result as a test of median equality unless you explicitly confirm that the group distributions have similar shapes.
Mistake 5: Using Levene’s Test as the Sole Basis for Test Selection
Some researchers — following the default logic of SPSS output — run Levene’s test and use its result to choose between pooled and Welch’s t-test, without ever checking normality. This entirely misses the point: Levene’s test is only relevant when both groups are already confirmed to be approximately normally distributed. Running Levene’s on non-normal data and then using a t-test (whether pooled or Welch’s) is still applying an invalid parametric test to data that violate its primary assumption.
Fix: Always check normality first (Step 1). Levene’s test is Step 3 — it is irrelevant until normality is established. The decision tree runs: normality → outliers → Levene’s → test selection. Skipping the normality step and going directly to Levene’s is one of the most common statistical workflow errors in published clinical research.
Mistake 6: Not Running the Sensitivity Check
When normality results are borderline, or when the sample size is large enough that the t-test might be robust to mild non-normality, researchers often simply pick one test and report that result alone. This leaves reviewers and readers unable to judge whether the conclusions are test-dependent. A result that holds under both approaches is substantially more credible than one that only appears under the chosen method.
Fix: When in doubt, run both tests and report them side by side in a supplementary table. State which is the primary analysis and which is the sensitivity check. If both give similar p-values and effect sizes, note this as evidence of robustness. If they diverge substantially (common with skewed data and outliers), discuss why, and prefer Mann-Whitney U as the primary result.
Scientific Reporting Standards
- APA 7th Edition: For t-test: t(df) = [value], p = [value], Cohen’s d = [value], 95% CI [lower, upper]. For Mann-Whitney: U = [value], n₁ = [value], n₂ = [value], p = [value], rank-biserial r = [value]. Both must include descriptive statistics and effect sizes.
- CONSORT 2010 (Item 12a): For RCTs, requires “statistical methods used to compare groups for primary and secondary outcomes” to be specified — must name the specific test and justify it. CONSORT Item 17a requires confidence intervals for primary outcomes alongside p-values.
- STROBE Statement: For observational studies, item 12e requires full specification of all statistical methods. Non-parametric tests must be named and their use justified by reference to the violated assumption.
- ICMJE guidelines: Require reporting of exact p-values (not “p < 0.05”) and measures of statistical uncertainty (95% CIs) for primary outcomes from both parametric and non-parametric tests.
- Box plots as required figures: Most clinical journals now require or strongly recommend box plots for continuous outcome comparisons, particularly when Mann-Whitney U is reported. Box plots immediately reveal the distribution shape, IQR spread, outlier positions, and median — all information that a p-value alone cannot convey.
Practical Guidance
Default to Welch’s t-Test, Not Pooled
For continuous, normally distributed outcomes where the t-test is appropriate, use Welch's t-test by default rather than the pooled-variance version. Welch's performs identically when variances are equal and substantially better when they are not. This removes the need to interpret Levene's test (which itself has low power for small samples) as a gate. In R, t.test() already uses Welch by default; in SPSS, select the "Equal variances not assumed" row.
For Right-Skewed Data, Assume Mann-Whitney First
Certain outcome variables are almost universally right-skewed in clinical data: length of hospital stay, cost per episode, time to event, ICU duration, enzyme levels (CRP, ALT, troponin), imaging volumes, and waiting times. For these variables, plan to use Mann-Whitney U by default in your statistical analysis plan and revert to t-test only if normality is positively confirmed. This saves time and prevents the embarrassing situation of having to defend an incorrect parametric test choice in review.
Always Present a Box Plot for Two-Group Comparisons
A box plot shows the median, IQR, range, and outlier positions simultaneously — it makes the choice between t-test and Mann-Whitney immediately obvious to any reader. A box plot where one or both groups show a long upper whisker or many outlier dots is a direct visual argument for Mann-Whitney U. Including the box plot in your results section (or at minimum as a supplementary figure) demonstrates visual analysis as part of your assumption-checking workflow.
Use the Hodges-Lehmann Estimator for Mann-Whitney CIs
The Hodges-Lehmann estimator provides a point estimate and 95% CI for the median difference (or more precisely, the pseudo-median difference) that corresponds to the Mann-Whitney U test. It is computed as the median of all pairwise differences between groups and gives readers a magnitude estimate analogous to the t-test's mean difference CI. In R: wilcox.test(x, y, conf.int = TRUE) returns the Hodges-Lehmann estimate and its CI automatically.
Report Exact p-Values for Small Samples
The z-approximation for Mann-Whitney U is valid for n > 20 per group. For smaller samples (n < 20), use exact permutation p-values rather than the normal approximation, because the sampling distribution of U is not yet well-approximated by the normal. SPSS provides exact p-values via the Exact Tests module; R's wilcox.test() uses exact computation for small n automatically and switches to approximation for larger samples.
Log-Transform as an Alternative to Mann-Whitney
For continuous variables that are log-normally distributed (length of stay, biomarkers, costs), a log-transformation can restore approximate normality, allowing the t-test on log-transformed data. The result is interpreted as a ratio of geometric means rather than a difference in arithmetic means. This approach preserves the parametric framework and allows standard confidence intervals. However, it requires that the log-transformed data actually are approximately normal (verify with Shapiro-Wilk on the transformed values) and that the ratio interpretation is clinically meaningful.
Frequently Asked Questions
What is the difference between Mann-Whitney U test and independent t-test? +
The independent t-test is parametric — it compares means, requires both groups to be approximately normally distributed and continuous, and assumes homoscedasticity. The Mann-Whitney U test is non-parametric — it converts all values to ranks and tests whether one group’s values tend to be systematically higher, without requiring normality. Use t-test when assumptions hold; use Mann-Whitney when normality fails, data are ordinal, or meaningful outliers are present.
When should I use Mann-Whitney U instead of t-test? +
Use Mann-Whitney U when: (1) either group fails Shapiro-Wilk normality test (p < 0.05 for n < 50); (2) the outcome is measured on an ordinal scale (Likert, pain grades, severity scores); (3) the distribution is heavily right-skewed (length of stay, costs, time-to-event, enzyme levels); (4) extreme outliers exist that are clinically real and cannot be removed; (5) sample sizes are very small (n < 15 per group) and normality cannot be reliably confirmed. When in doubt, Mann-Whitney U is the safer, more conservative choice — it loses less than 5% efficiency under normality but is substantially more robust when normality fails.
Does Mann-Whitney U compare medians? +
Not exactly. The Mann-Whitney U test tests stochastic dominance — whether a randomly selected observation from group 1 tends to exceed a randomly selected observation from group 2. This is equivalent to testing median equality only when both groups have the same distributional shape (same variance and skewness). When shapes differ, U can detect a difference even when medians are identical. In practice, report medians and IQRs as descriptive statistics alongside Mann-Whitney results, but describe the test as comparing “distributions” rather than “medians.”
What is Welch’s t-test and when should I use it? +
Welch’s t-test is a modification of the independent t-test that does not assume equal variances. It adjusts the degrees of freedom downward when group variances differ, producing a more conservative (but correct) p-value. Use Welch’s when Levene’s test is significant (p < 0.05) or when group sample sizes differ substantially (n₁/n₂ > 1.5). Many statisticians now recommend using Welch’s as the default for all t-tests because it performs identically to the pooled t-test when variances are equal and better when they are not. In R, t.test() uses Welch’s by default.
What effect size should I report for Mann-Whitney U? +
Report the rank-biserial correlation r (computed as r = z/√N or r = 1 − 2U/(n₁n₂)) using Cohen’s (1988) thresholds: small r = 0.10, medium r = 0.30, large r = 0.50. Alternatively, report the probability of superiority (PS = U/(n₁n₂)), which is directly interpretable as the probability that a randomly selected observation from group 1 exceeds one from group 2. Do NOT report Cohen’s d alongside Mann-Whitney U results — d is defined from means and SDs, which are inappropriate for non-normal data.
How do I test normality before choosing between these tests? +
Test each group separately (not the combined sample). Shapiro-Wilk is the primary tool for n < 200: p < 0.05 in either group → use Mann-Whitney U. For n > 200, Shapiro-Wilk is overly sensitive — rely on histogram and Q-Q plot inspection. Also inspect box plots for outliers. Important: run normality on each group individually. A combined distribution can appear non-normal due to group mean differences even when each group is internally normal (bimodal combined histogram). Test separately to avoid this trap.
What is Levene’s test and what does it tell me? +
Levene’s test assesses whether group variances are statistically equal. It is run after confirming normality to decide between pooled t-test (equal variances) and Welch’s t-test (unequal variances). Levene’s p > 0.05 → equal variances → pooled t-test. Levene’s p < 0.05 → unequal variances → Welch’s t-test. Crucially, Levene’s test is only relevant after normality is confirmed — running it on non-normal data and then using a t-test (regardless of Levene’s result) is still an incorrect parametric analysis.
Is Mann-Whitney U less powerful than the t-test? +
Under ideal normality conditions, Mann-Whitney U has asymptotic relative efficiency (ARE) of ~95.5% compared to the t-test — about 5% lower power, meaning it needs ~5% more subjects to achieve equivalent detection. In practice, when normality is violated (common in clinical data), Mann-Whitney is frequently more powerful than the t-test, because non-normality inflates the t-test’s variance estimate and degrades its power while Mann-Whitney’s rank-based approach remains unaffected. The small theoretical power cost of Mann-Whitney under normality is rarely clinically decisive.
Can I use t-test on skewed data if my sample is large? +
For large samples (n > 30 per group with moderate skewness), the central limit theorem ensures the t-test maintains approximately correct Type I error for the p-value. However, even for large n, extreme outliers distort the mean and inflate the SD, reducing the t-test’s power — so Mann-Whitney may still be more powerful for skewed data regardless of n. Additionally, for skewed outcomes, the mean is often not the most clinically meaningful summary — the median better represents the typical patient. Large n does not make the t-test conceptually appropriate for comparing central tendency in heavily skewed distributions.
How should I report Mann-Whitney U and t-test results in a thesis? +
t-test format (APA 7): t(df) = [value], p = [value], mean difference = [value] (95% CI: [lower, upper]), Cohen’s d = [value]. Descriptive: mean ± SD. Mann-Whitney format: U = [value], n₁ = [value], n₂ = [value], z = [value], p = [value], rank-biserial r = [value]. Descriptive: median (IQR). Always state: which test was used, why (normality and Levene’s results), and include the effect size. Never report only a p-value without an effect size — this is insufficient for any contemporary journal or thesis.
Compare Two Groups Online
Run independent t-test with Levene’s check or Mann-Whitney U test with effect sizes, normality diagnostics, and box plots — all in one tool.
Open StatClinic →