Means instead of medians for non-parametric statistical tests?

16 views (last 30 days)
MATLAB's Wilcoxon signed-rank test and rank sum test both test for medians of data. However, I'm only interested in the mean values of my data and want to perform a non-parametric test for these means. Is there a way to work around this?
I know the good old t-test tests for means, but my data doesn't follow a normal distribution.

Accepted Answer

Star Strider
Star Strider on 13 Jun 2015
If your data do not follow a parametric distribution, or you don’t know the distribution, use a nonparametric test, and accept the test on the medians.
If you are using a paired design (for instance using the same population to observe the effect before and after a particular intervention), use the signed-rank test. If a non-paired design (intervention on one group of two), use the rank-sum test.
If your data do not meet the assumptions of a particular test, such as requiring in part that they be normally-distributed, you cannot use a t-test.
  4 Comments
Juha
Juha on 17 Jun 2015
I found out the source of my problems. My data has values between -1 ... +1. Matlab's signrank function seems to have problems with negative ranks. I solved the problem by scaling my values to 0...+1. Got the right p-values now.
Star Strider
Star Strider on 17 Jun 2015
Interesting. Linear scaling should not affect the validity of your data or statistics.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!