I have to compare a couple of groups. I have the median, mean, 1st quartile, 3rd quartile and size of both samples, nothing less, nothing more, and no further info about the two groups. Is there a way to know whether the medians of the two groups are different? Do you know of any supporting references?
Asked
Active
Viewed 616 times
4

gung - Reinstate Monica
- 132,789
- 81
- 357
- 650

STAM
- 41
- 1
-
Check out the Mann-Whitney test. – corey979 Apr 09 '20 at 18:07
-
@corey979 what about the Mann-Whitney test makes it suitable for this situation? – Dave Apr 09 '20 at 18:16
-
That it compares medians. – corey979 Apr 09 '20 at 18:47
-
1it compares ranks, not medians.. You can have situations where you test data from two different distributions (with the same median), and Mann-Whitney gives you a low pvalue – StupidWolf Apr 09 '20 at 20:19
-
1@STAM, do you mean you don't have the actual data and only the summary statistics? – StupidWolf Apr 09 '20 at 20:20
-
2You want to make some inference based only on summary statistics. This has be asked before, see answers to https://stats.stackexchange.com/questions/448990/find-q1-and-q3-from-median-and-iqr/449783#449783 – kjetil b halvorsen Apr 09 '20 at 22:27
-
3In this case it should be possible to set up a simple rejection rule and then figure out what type I error rate that results in under an assumption like identical continuous distributions (e.g. a rejection rule like "*reject if each sample's median is outside the (Q1,Q3) interval of the other sample*" or "*reject if the two interquartile intervals don't overlap*"; those would be nonparametric); but the resulting significance level might not be especially suitable (in large samples it may be extremely tiny but in very small samples may be quite large). – Glen_b Apr 10 '20 at 04:34
-
As @Glen-b suggests, I think it's easier to make sense of this if the two samples are from the same distribution. Trying simulations with uniform, normal, exponential and using the rejection rule that the median of one is outside $(Q_1,Q_3)$ of the other, it seems possible to have tests at the 5% level if $n_1 = n_2 \ge 25.$ // The Tukey-Duckworth 2-sample test looks at numbers of overlapping values. Methods of evaluating error types for that test may be similar to this. – BruceET Apr 10 '20 at 07:41
-
Please register &/or merge your accounts (you can find information on how to do this in the **My Account** section of our [help]), then you will be able to edit & comment on your own question. – gung - Reinstate Monica Apr 10 '20 at 14:38
-
I found the following papers, that helped me: (1) https://www.nature.com/articles/nmeth.2813.pdf?origin=ppub; (2) https://www.jstor.org/stable/2683468?seq=1 – STAM Apr 10 '20 at 09:39
1 Answers
1
Comment continued:
Exploratory experiments in R, trying to see what may be worthwhile trying to prove analytically.
p.rej = replicate(10^5, quantile(runif(20),.75) <
quantile(runif(20),.5))
mean(p.rej)
# [1] 0.0563
p.rej = replicate(10^5, quantile(rnorm(25),.75) <
quantile(rnorm(25),.5))
mean(p.rej)
# [1] 0.04099
p.rej = replicate(10^5, quantile(rexp(22),.75) <
quantile(rexp(22),.5))
mean(p.rej)
# [1] 0.04777
p.rej = replicate(10^5, quantile(rexp(22),.25) >
quantile(rexp(22),.5))
mean(p.rej)
# [1] 0.04761
This is perhaps about as powerful as notches in boxplots for $n=25:$ $\mathsf{Norm(0,1})$ vs. $\mathsf{Norm(0.7,1})$.

gung - Reinstate Monica
- 132,789
- 81
- 357
- 650

BruceET
- 47,896
- 2
- 28
- 76