Two large data sets of patients (set A: n = 100,000; set B: n = 700,000) are being compared with respect to their hospital length-of-stay (LOS). The variable LOS is reported as an integer in the data warehouse, typically between 2 and 7, so tens of thousands of patients in each group will have the same value for LOS. Does group A have a different LOS from group B? The variances of the LOS of the two groups are very different from one another; both have a skewed distribution.
In the medical literature one typically sees a Wilcoxon-Mann-Whitney test being used in comparing the LOS of the two groups and reports it as a test of the difference between medians. Usually due to unequal variance and sample size, such an approach does not conform to the so-called "pure shift model."
I want to avoid using this popular but flawed approach, but have two questions:
If I am using the W-M-W test as originally intended (testing the null hypothesis Prob(x < Y) = 0.5), will the unequal samples sizes (100,000 vs. 700,000) or the unequal variances invalidate the test result?
Is there a good test for comparing the median LOS of the two groups? It turns out that group A has a median LOS of 4 days while group B has a median LOS of 5 days, so a priori, given the large sample sizes, one might expect the two groups to significantly differ in their median LOS.