# Mann-Whitney test for a large sample

I'm not a statistician, so pardon me for being naive on this subject.

I'm trying to understand if there's any statistically significant difference in the medians of 2 groups. Here are some of the salient features of my groups:

1. Each of the groups has Millions of observations
2. Each of the groups is not normally distributed
3. The observations are continuous
4. One of the groups has almost 15x the observations in the other group
5. The groups are mostly independent of each other

If the groups were normally distributed, I could have used the T-test to figure this out.

So this leads me to believe that a Mann-Whitney test would be more useful in this case. But because I have Millions of observations in both the groups, I'm not sure if the Mann-Whitney test results will hold true. In one of the Stack Overflow posts, I read that Mann-Whitney test does not work well with so many observations.

Should I just take much smaller random samples from my 2 groups and perform the Mann-Whitney test many times and then look at the results?

Or is there a better approach to doing this? Any help would be much appreciated.

• In what way does the t-test not work with many observations? What's this SO post that said MW fails with a large sample size?
– Dave
Jun 30, 2020 at 19:46
• @Dave Here's the SO post: stats.stackexchange.com/questions/77359/…. Jun 30, 2020 at 19:49
• @Dave Sorry, I was wrong in saying T-test wouldn't work with large sample sizes. I removed it from the post. But my data isn't normally distributed anyway. So a T-test wouldn't work for me. Jun 30, 2020 at 19:54
• If you have millions of observations and you did not do something like randomly allocate the observations to the groups then there will almost certainly be a significantly significant difference between the two medians. But it may be small. So the first thing would be to see what the difference in the sample medians actually is. The second is to think whether that difference is big enough to care even before considering uncertainty. The third might involve developing a confidence interval for that difference. Jun 30, 2020 at 20:08
• @Henry Say the medians are 12 and 15, to me they are significantly different. And yes, both, T-test and MW-test, tell me that the medians are different. I'm not aware of developing a confidence interval approach. I'll have to do more research into it. Jun 30, 2020 at 20:32