Calculator Inputs
Example Data Table
This example shows two independent samples that can be pasted directly into the calculator.
| Observation | Sample A | Sample B |
|---|---|---|
| 1 | 78 | 70 |
| 2 | 85 | 72 |
| 3 | 88 | 74 |
| 4 | 90 | 79 |
| 5 | 92 | 80 |
| 6 | 95 | 84 |
Formula Used
1) Combine both samples and rank all observations together. Tied values receive the average rank. 2) Compute rank sums: R1 = sum of ranks for sample 1 R2 = sum of ranks for sample 2 3) Compute U statistics: U1 = R1 - n1(n1 + 1)/2 U2 = R2 - n2(n2 + 1)/2 4) Test statistic: U = min(U1, U2) for the usual two-sided comparison 5) Mean of U under H0: mean(U) = n1n2 / 2 6) Standard deviation with tie correction: SD(U) = sqrt[(n1n2 / 12) * ((N + 1) - Σ(t^3 - t) / (N(N - 1)))] 7) Normal approximation with continuity correction: z = (U - mean(U) ± 0.5) / SD(U) 8) Effect size: r = |z| / sqrt(N) Where: n1 and n2 are sample sizes, N = n1 + n2, t is the size of each tie group.
How to Use This Calculator
- Enter a label for each independent sample.
- Paste numeric values into both sample boxes.
- Use commas, spaces, semicolons, or new lines as separators.
- Select alpha and the hypothesis direction you want to test.
- Click the calculate button to generate the result above the form.
- Review U, z, p-value, effect size, ranked table, and summary statistics.
- Use the CSV or PDF buttons to export the output.
- Inspect the Plotly box plot for a visual comparison.
Frequently Asked Questions
1) What does the Mann Whitney U test measure?
It tests whether two independent samples come from similar distributions. It is often used to compare central tendency when normality is uncertain or when ordinal data is analyzed.
2) When should I use this instead of a t-test?
Use it when your samples are independent, your data may be skewed, outliers are influential, measurements are ordinal, or normal distribution assumptions for a t-test are not comfortable.
3) Can the calculator handle tied values?
Yes. Tied observations receive average ranks, and the normal approximation includes a tie correction in the estimated standard deviation for the U statistic.
4) What is the difference between U1 and U2?
Each sample has its own U value based on its rank sum. For the common two-tailed test, the smaller of the two is usually reported as the main U statistic.
5) Why does the calculator sometimes use an exact p-value?
When sample sizes are modest and ties are absent, an exact distribution can be computed. Otherwise, the calculator switches to a normal approximation with continuity correction.
6) Does a significant result prove one mean is larger?
Not exactly. The test compares rank patterns and distribution ordering. A significant result suggests a difference in distributions, often interpreted as a shift in location.
7) What does effect size r tell me?
It summarizes the practical magnitude of the difference. Larger values indicate stronger separation between samples, even when sample sizes vary.
8) Can I use decimals, negative values, or uneven sample sizes?
Yes. The calculator accepts decimal numbers, negative values, and different sample lengths, as long as each group contains at least two numeric observations.