{"uid":"cap_SUZGI64ZUbrugYSubfJF8","slug":"mann-whitney-u-test-9ec98810","name":"Mann-Whitney U Test","description":"Mann-Whitney U test for two independent samples: U, exact p for small samples without ties or normal approximation, effect size.","url":"https://stats-tests.x402tookit.com/mann-whitney?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","description":"Sample A values"},"b":{"type":"string","description":"Sample B values"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"nA":{"type":["null","number"]},"nB":{"type":["null","number"]},"uA":{"type":["null","number"]},"uB":{"type":["null","number"]},"asOf":{"type":["null","string"]},"ties":{"type":["boolean","null"]},"method":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"rankSumA":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"uStatistic":{"type":["null","number"]},"rankBiserial":{"type":["null","number"]},"pValueTwoSided":{"type":["null","number"]},"significantAt5pct":{"type":["boolean","null"]},"probabilityAExceedsB":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_G24kad3b9ehDgqMSqFC1d","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs the Mann-Whitney U test on two independent samples, returning U statistics, exact or approximate p-values, and rank-biserial effect size.","exampleAgentPrompt":"Run a Mann-Whitney U test comparing these two groups — sample A: 3,7,5,12,9 and sample B: 1,4,2,8,6 — and tell me if there's a statistically significant difference and how large the effect is.","exampleUseCases":[{"title":"Clinical trial treatment comparison","prompt":"I have pain scores from a control group and a treatment group from my study — control: 6,8,7,9,5,8 and treatment: 3,4,5,2,4,3. Can you run a Mann-Whitney U test and tell me whether the treatment significantly reduced pain scores and what the effect size is?"},{"title":"A/B test for non-normal user metrics","prompt":"Compare these session durations in seconds for two versions of my app — version A: 45,120,30,200,85,60 and version B: 90,150,110,180,130,95 — using a Mann-Whitney U test and tell me if version B is significantly higher."},{"title":"Educational intervention assessment","prompt":"I'm comparing pre-test scores for students who got tutoring vs those who didn't — tutored: 72,85,90,78,88 and untutored: 55,60,70,58,65 — can you do a Mann-Whitney U test and give me the p-value and effect size?"}],"resultDescription":"Returns U statistics for both samples (uA, uB), rank sums, sample sizes, two-sided p-value, whether exact or normal approximation was used, rank-biserial correlation as effect size, probability that a random observation from A exceeds one from B, a significance verdict at the 5% level, a plain-language summary, and flags for ties or degraded results.","failureModes":["Missing or unparseable sample values in 'a' or 'b' parameters","Samples with fewer than 2 observations may produce unreliable results","Ties present in data trigger normal approximation instead of exact p-value (flagged in response)","Extremely large samples may fall back to normal approximation regardless","Non-numeric values in sample strings cause parsing errors","Empty sample strings return validation errors"],"whenToPreferThis":"Use this endpoint when you need a non-parametric test for two independent samples — especially when data is ordinal, skewed, or cannot be assumed to follow a normal distribution. Prefer it over a t-test when normality is questionable or sample sizes are small. It is the right choice when you need both a significance test and a rank-based effect size (rank-biserial correlation) in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:19:30.657Z","isFirstParty":false,"canonicalSlug":"mann-whitney-u-test-9ec98810"}