Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to calculate p-values for medians using summary data

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-09-2019 09:32 AM
(7076 views)

Is there a way to calculate p-values comparing medians for two independent populations using summary data? I am trying to see if median length of stay for two different groups are significantly different from each other and I do not have the raw data, all I have are the medians for the two groups and the sample size used to calculate the medians. If anyone out there knows how to approach this situation please help.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Jep,

Imagine the histograms of the two empirical distributions (combined in one plot). Then modify the distributions by increasing the variances to very large values (i.e. broad, largely overlapping, almost identical histograms) or shrinking them to zero (i.e. isolated peaks at the two median values) -- *leaving the medians and sample sizes fixed*. Obviously, doing so must have an impact on the results (e.g. the p-value) of any reasonable statistical test comparing the medians. So, the test you envisioned cannot exist.

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

If all you have is the median, and the N for each sample, then I don't think you can calculate a confidence interval or p-value.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Tests for median are usually non parametric and require the full data set or more information to be useful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Jep,

Imagine the histograms of the two empirical distributions (combined in one plot). Then modify the distributions by increasing the variances to very large values (i.e. broad, largely overlapping, almost identical histograms) or shrinking them to zero (i.e. isolated peaks at the two median values) -- *leaving the medians and sample sizes fixed*. Obviously, doing so must have an impact on the results (e.g. the p-value) of any reasonable statistical test comparing the medians. So, the test you envisioned cannot exist.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

For any given sample size N and a median value M there are an infinite number of samples that will meet that condition. Consider N= 3 and M= 5:

1 5 10

1 5 11

2 5 10

3 5 10

3 5 11

1 5 9999999999999999999999999

<continue until completely mind numbed>

each of these samples is of size N=3 and median of 5.

So without complete data or at least some information about dispersion of values I think you are going to be stuck..

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I'll add one more observation. You might not need all observations, but you need some relevant quantiles (percentiles).

If N=100, a 95% CI for the median is often estimated by using the 40th and 60th percentiles.

In general, if you know N, you can estimate a CI by using the percentiles

N/2 +/- 1.96*sqrt(N)/2

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.