turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Test the difference for median ?

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-04-2015 10:41 AM

Hi guys,

I have a very basic question, but could not find the convincing answer from Interest.

I have two groups with different number of observations. I have already got the mean and median of the two group and the figure shows group A is larger than group B. But I do not know whether these are significant or not. So I want to do the univariate test to look at whether they have the same mean and same median. According to papers, the basic steps is to do t-test for mean and Wilcoxon test for median. But I have several questions regarding this:

1. Shall I use the one-sided t-test or two-sided t-test? What I did is using the coed below:

Proc ttest data=;

class ;

var ;

run;

Will this give me the one-sided t-test or two-sided t-test? And what is the common practice in the paper when they show whether the two group has different mean? one-sided or two-sided?

2. About the Wilcoxon test to test whether they have same median, shall I use Wilcoxon rank-sum test or Wilcoxon signed-rank test? I did see both but I do not know which to use.

And also when I read the result from SAS, shall I use the one-sided result or two-sided? I used the following code:

proc npar1way data = wilcoxon;

class;

var ;

run;

I really do not know which is the right way. I really appreciate your help. Cheers.

Accepted Solutions

Solution

02-06-2015
09:03 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-06-2015 09:03 AM

The Wilcoxon rank-sum test (also known as the Mann-Whitney test) is the test for basic comparison of two groups for difference in the median. It assumes that the data are measured in the interval or ratio scale.

The Wilcoxon signed-rank test is a one sample test that the median is a constant (typically 0, as it is often used for difference scores).

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-04-2015 10:48 AM

Re One sided/Two Sided P-Value

If your hypothesis is that

H0: X1=X2

H1: X1>X2 or (X1<X2)

then you use a one sided p-value.

If your hypothesis is:

H0: X1=X2

H1: X1 ne X2

then you use a two sided p-value.

I can't say which test you should use, but I highly recommend graphing your data, via box plot or violin plot to examine the distributions as well as testing.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-05-2015 05:16 AM

Bivariable Normal Distribution for TTEST, otherwise for Wilcoxon .

Solution

02-06-2015
09:03 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-06-2015 09:03 AM

The Wilcoxon rank-sum test (also known as the Mann-Whitney test) is the test for basic comparison of two groups for difference in the median. It assumes that the data are measured in the interval or ratio scale.

The Wilcoxon signed-rank test is a one sample test that the median is a constant (typically 0, as it is often used for difference scores).