1
$\begingroup$

With two samples A and B having nA and nB as size, muA and muB as means and sigmaA and sigmaB as standard deviations I can calculate the 95% confidence interval of each mean, but also the confidence interval of the difference between the means.

Could I do the same when the estimator is the median? That is, summary data Med A and Med B for the respective medians, and Q1A and Q1B for first quartiles and Q3A and Q3B for the third quartiles and I also have the sizes of the samples nA and nB. Is there a formula (from these summary) allowing me to calculate the confidence intervals of the two medians but also that of their difference? Or could I estimate it by bootstrap (with R preferably)?

$\endgroup$
2
  • $\begingroup$ Can we make any distribution assumptions such as normal distributions? Then yes. Otherwise no. Then again, why would people publish a median they had a normality assumption. $\endgroup$
    – Bernhard
    Sep 7, 2022 at 16:46
  • $\begingroup$ The answers are no, no, and no. See stats.stackexchange.com/questions/45124 for analysis and insight. $\endgroup$
    – whuber
    Sep 7, 2022 at 20:37

1 Answer 1

0
$\begingroup$

Anscombe’s quartet is useful here, to show that you can’t calculate anything substantial about medians from that data. These four datasets’ differences of medians, and the medians themselves, are all different even though they all have the same means and standard deviations and correlation. R gives the medians readily with apply(anscombe, 2, median):

  x1   x2   x3   x4   y1   y2   y3   y4 
9.00 9.00 9.00 8.00 7.58 8.14 7.11 7.04 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.