Mann-Whitney U Test

The Mann-Whitney U test, also called the Wilcoxon rank-sum test, compares a numeric or ordinal response between exactly two independent groups. It is the non-parametric alternative to the independent-samples t-test. Because it works on ranks instead of raw values, it does not assume normality and is less affected by outliers.

Steps

Load the dataset -> Go to ToxCore -> Mann-Whitney U Test -> Move the numeric response to Response Variable -> Move the two-level group variable to Grouping Variable -> Choose the test and output options -> Execute the dialog.

Mann-Whitney U Test

Video walkthrough

Video walkthrough coming soon.

Data requirements

  • One row per observation (long format), with a numeric response column and a group column.

  • The grouping variable must have exactly 2 levels in the data. To compare one control with one treatment from a larger study, first make a subset with Subset by Logic.

  • Rows with a missing response or missing group are left out.

Dialog options

Enter Result Name

A name for this analysis (default MannWhitney1).

Response Variable (numeric)

The measured outcome.

Grouping Variable (2 levels)

The variable that identifies the two groups.

Alternative Hypothesis
two.sided (default), less or greater. The direction compares the first group with the second, where groups are ordered alphabetically (or numerically). For example, with groups Control and Treated, less tests whether Control values tend to be lower than Treated values.
Confidence Level

90, 95 (default) or 99%. Used for the Hodges-Lehmann confidence interval.

Use Exact p-value

Calculates the exact p-value, which is recommended for small samples. If the data contain tied values, BioStat Prime uses a tie-corrected exact test from the coin package. If coin is not installed, it uses the normal approximation and says so in the output. When unchecked, R decides automatically: exact for small samples without ties, normal approximation otherwise.

Apply Continuity Correction

Applies a continuity correction when the normal approximation is used. On by default.

Compute Confidence Interval (Hodges-Lehmann)

Reports the Hodges-Lehmann estimate of the location shift between the groups, with its confidence interval. On by default.

Show Descriptive Statistics by Group

Shows N, median, mean and standard deviation for each group. On by default.

Output

Descriptive Statistics by Group

Group, N, Median, Mean and SD.

Statistic / Value

The test statistic. This is W, except when the tie-corrected exact test is used, which reports a standardised statistic.

p_value

p-value of the test. A small value (for example below 0.05) means the two groups differ.

Alternative

The hypothesis that was tested.

Hodges_Lehmann_Estimate

Estimated shift in location between the first and the second group (median of all pairwise differences).

CI_Lower / CI_Upper / CI_Level

Confidence interval for the shift. If it does not include 0, the groups differ.

Groups compared / Note

The two groups in the order used, and which p-value method was applied (exact, tie-corrected exact, or normal approximation).

R functions used: stats::wilcox.test(), and coin::wilcox_test() for the tie-corrected exact test. R packages required: none (base R); coin is optional and only needed for exact p-values with tied data.

Last modified: 25 November 2026