One-sample Median Test using SAS

 

I will still use the same variable hwy from mpg data file, as we did in the one sample t-test example. I will test whether the median highway mpg (hwy) significantly differs from 25.  The proc univariate will provide two different non-parametric tests for the location. And adding loccount option will produces the table of the number of observations greater than, not equal to, and less than 25. Note all my codes have been test under SAS version 9.3.

proc univariate data = mpg loccount mu0 = 25;
  var hwy;
run;

SAS result one sample median test

Either the sign test or the signed rank test can be used.  The difference between these two tests is that the signed rank requires that the variable be from a symmetric distribution.  If we choose to believe the signed rank test, the results indicate that the median of the variable hwy for this group is statistically significantly different from 25.

 

 

See Also:

Do the same test in R

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *