Free to use, no account

Kalkulator for Mann–Whitney U-test

Lim inn to uavhengige numeriske utvalg for å sammenligne rangeringene. Verktøyet rapporterer begge U-statistikkene, en tosidig p-verdi, håndtering av like verdier, metode og signert rang-biserial effekt.

Oppgi 2–500 endelige tall per utvalg (opptil ±1,000,000,000,000). Skill dem med komma, semikolon, mellomrom eller linjeskift; bruk punktum som desimalskilletegn. Utvalgene må være uavhengige.

Denne siden utfører bare en tosidig test. Den bruker en eksakt permutasjonsfordeling for utvalg uten like observasjoner med maksimalt 40 observasjoner totalt; ellers brukes en normaltilnærming korrigert for like observasjoner og kontinuitet. Hvis alle samlede verdier er like, blir p=1.

Hva sammenligner Mann–Whitney U-testen?

Den sammenligner rangfordelingene i to uavhengige utvalg. Den tester ikke automatisk medianer med mindre ytterligere forutsetninger om fordelingsform er oppfylt.

Veiledning

Slik bruker du mann-whitney-u-test-calculator

The Mann-Whitney U Test Calculator compares two independent groups of numbers by their ranks instead of their raw values. Paste both samples and it shows the rank sum, both U values, a two-sided p-value and a rank-biserial effect size. It does not run one-sided or paired tests.

Slik gjør du

  1. Paste the first group into Sample 1 and the second group into Sample 2. Separate numbers with commas, semicolons, spaces or new lines, and write decimals with a dot.
  2. Press Calculate test. Each sample needs between 2 and 500 numbers, and no number may be larger than one trillion in size, positive or negative.
  3. Read the U values, the p-value and the method line, which says whether the p-value is exact or an approximation. Press Copy results to keep the text.

Eksempler

Two groups that do not overlap at all

Du skriver inn
utvalg 1
1, 2, 3
utvalg 2
4, 5, 6
Du får
Rank sum1
6
u1
0
u2
9
p-verdi
0.1
Rank biserial
-1
metode
Exact two-sided permutation distribution (no tied observations)

Every value in Sample 2 is bigger, so U for Sample 1 is 0. Only 2 of the 20 ways to deal six ranks into two groups of three look this extreme, so the exact two-sided p-value is 2 divided by 20, which is 0.1. With three against three, no result can get below 0.1.

Kjørt med verktøyets egen kode.

Six values against seven, with a small overlap

Du skriver inn
utvalg 1
12 15 11 18 20 14
utvalg 2
22 25 19 24 30 28 21
Du får
Rank sum1
22
u1
1
u2
41
p-verdi
0.002331
Rank biserial
-0.9524
metode
Exact two-sided permutation distribution (no tied observations)

Only one pair is in the wrong order: 20 in Sample 1 is above 19 in Sample 2. That gives U1 = 1 and U2 = 42 - 1 = 41. The effect size of -0.9524 says Sample 2 is higher in almost every pairing.

Kjørt med verktøyets egen kode.

Samples that contain tied values

Du skriver inn
utvalg 1
1 2 2 3 4
utvalg 2
2 3 3 5 6 7
Du får
Rank sum1
21
u1
6
u2
24
p-verdi
0.11390315
Rank biserial
-0.6
Tied observations
6
Tie groups
2
metode
Two-sided normal approximation with tie correction and continuity correction

Equal values share the average of their ranks, so the three 2s each get rank 3 and the three 3s each get rank 6. Because ties exist, the tool switches from the exact method to a normal approximation, and a p-value of about 0.114 is not small.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Compare test scores from two classes when the scores are skewed and do not look bell-shaped.
  • Check whether page load times from an old and a new design differ, using small samples.
  • Compare satisfaction ratings from two customer groups when the ratings are ordered but not evenly spaced.

Begrensninger

  • It is a two-sided test for two independent samples only. There is no one-sided choice, no paired mode (matched pairs need a signed-rank test) and no way to compare three or more groups.
  • The p-value is exact only when there are no tied values and both samples together hold at most 40 numbers. In every other case it is a normal approximation with tie and continuity corrections, which is rougher for tiny samples that contain ties.
  • The test compares rank distributions. It is not automatically a test of medians, a small p-value does not mean the difference is large, and the tool cannot check that your two samples are really independent.

Tips

  • Look at the method line before you quote a p-value, because exact and approximate results should not be mixed up in a report.
  • Quote the effect size next to the p-value. A rank-biserial value runs from -1 to 1, and its sign shows which sample tends to be higher.
  • Never type a comma as a decimal mark. A value like 3,5 is read as two numbers, 3 and 5, because commas separate values.

Vanlige spørsmål

What does the Mann-Whitney U test tell me?

It asks whether values in one group tend to be higher than values in the other, using ranks. A small p-value suggests the two rank patterns differ more than chance would usually allow, but it says nothing about how big or useful the gap is.

When is the p-value exact?

Only when no value appears twice and the two samples together contain 40 numbers or fewer. Then the tool counts every possible rank arrangement. In all other cases it uses a normal approximation with corrections.

How does the calculator treat tied values?

Equal values get the average of the ranks they would have shared. The variance in the approximation is then adjusted for ties. If every value in both samples is the same, the p-value is shown as 1.

Is this the same as the Wilcoxon signed-rank test?

No. Mann-Whitney, also called the rank-sum test, compares two separate groups. The signed-rank test is meant for paired or matched observations, such as before and after readings on the same people.

What does the rank-biserial effect size mean?

It is 2 times U1 divided by the number of pairs, minus 1. A value of 1 means every Sample 1 value beats every Sample 2 value, -1 means the reverse, and 0 means the ranks are evenly mixed.

Are my numbers sent anywhere?

No. The ranking and the test run in your browser, and the page says the values are not sent to a server or saved by the tool. Copy the results yourself if you want to keep them.

Kilder

Ofte stilte spørsmål

Hva sammenligner Mann–Whitney U-testen?

Den sammenligner rangfordelingene i to uavhengige utvalg. Den tester ikke automatisk medianer med mindre ytterligere forutsetninger om fordelingsform er oppfylt.

Lastes utvalgsverdiene mine opp?

Nei. Rangeringen og testen beregnes i denne nettleseren. Utvalgsverdiene sendes ikke til en server eller lagres av dette verktøyet.

Er Mann–Whitney det samme som Wilcoxons fortegnede rangtest?

Nei. Mann–Whitney (Wilcoxons rangsumtest) sammenligner to uavhengige grupper. Den fortegnede rangtesten brukes for parede eller matchede observasjoner.

Tester Mann–Whitney alltid om medianene er ulike?

Nei. Den tester rangfordelinger. En tolkning som medianforskjell krever ytterligere forutsetninger, blant annet fordelinger med lignende form.

Hvordan håndterer kalkulatoren like observasjoner?

Den gir like verdier gjennomsnittlige ranger og bruker en normaltilnærming korrigert for like observasjoner. Den eksakte permutasjonsmetoden brukes bare når de samlede observasjonene ikke har like verdier og utvalgsstørrelsen totalt er maksimalt 40.