- Thread starter shahriarizadehfatima
- Start date

Most people use the Wilcoxon rank sum test. Given your sample size, the exact version of the test may be used to compare medians.

Given the distribution of your data, transformations can be used at times in order to use parametric tests.

Given the distribution of your data, transformations can be used at times in order to use parametric tests.

The Wilcoxon rank-sum test also called Mann–Whitney U test compared the **entire distributions**.

When the two groups have a similar distribution curve you can say it compares also the medians. If symmetrical median equals mean ...so you can say it also compares the means.

When the two groups have a similar distribution curve you can say it compares also the medians. If symmetrical median equals mean ...so you can say it also compares the means.

Actually I wasn't correct...the mean also treat the entire distribution but in a different way.

If the Wilcoxon rank-sum test says one group is "bigger" than the other it says that the probability to get higher value from this group is higher, while the mean says that in the long run if you will do it, again and again, you will get a higher sum from all the repetitions.

In the attached example:

1. A : B - The median of group A and Group B is the same, but it is very clear that the probability to get higher value from group B is higher.

2. B : C - THe probability to get higher value from group B is higher but on average you will get more in group C

If the Wilcoxon rank-sum test says one group is "bigger" than the other it says that the probability to get higher value from this group is higher, while the mean says that in the long run if you will do it, again and again, you will get a higher sum from all the repetitions.

In the attached example:

1. A : B - The median of group A and Group B is the same, but it is very clear that the probability to get higher value from group B is higher.

2. B : C - THe probability to get higher value from group B is higher but on average you will get more in group C

Last edited:

And, when they are not symmetric, what test is used for means and what test for medians?

T-test is used to compare the means, for not normal data if the sample size is large enough you can still use the t-test (CLT)

It is not sensitive to the violation of the normality assumption.

What is large enough? usually, say 30.

Statistically signifcant result of that test will only be caused by different medians (in the

population) if certain distributional requirements are fulfilled (in the population), which is

rarely the case (I suppose), and difficult to verify.

There is a test called

By the way

So, what non-parametric test is used to compare the "means" of two independent groups?? I've been tough that Wilcoxon is used for means! Not for medians!

Ordinal scales do not have a mean.

With kind regards

Karabiner

The Wilcoxon rank sum test is not a test of medians. You can see that if you look at its formula.

Statistically signifcant result of that test will only be caused by different medians (in the

population) if certain distributional requirements are fulfilled (in the population), which is

rarely the case (I suppose), and difficult to verify.

There is a test called*median test *which is designed for that purpose.

By the way

The Wilcoxon test is a test for ranks (ordinal scaled data), not for interval scaled data.

Ordinal scales do not have a mean.

With kind regards

Karabiner

Statistically signifcant result of that test will only be caused by different medians (in the

population) if certain distributional requirements are fulfilled (in the population), which is

rarely the case (I suppose), and difficult to verify.

There is a test called

By the way

The Wilcoxon test is a test for ranks (ordinal scaled data), not for interval scaled data.

Ordinal scales do not have a mean.

With kind regards

Karabiner

I've used mood.medtest function in the package of RVAideMemoire for comparing the medians of two independent groups in R. The data are interval. But I need a median test for one.sided hypothesis. Do you know any function to meet the test?

More often than not, a one-sided hypothesis seems inappropriate.

Why do you think it is necessary here?

Apart from that, the relationship between one-tailed and two-tailed

test results is the same as in the t-test or correlation.

With kind regards

Karabiner

Why do you think it is necessary here?

Apart from that, the relationship between one-tailed and two-tailed

test results is the same as in the t-test or correlation.

With kind regards

Karabiner

In my research, one hypothesis is that the average (mean) length of stay (Loss) of one group in a hospital ward is shorter than that of another group. Also, I want to examine this hypothesis between the medians of the groups.

The distributions of groups' (LoS) aren't normal. So, I need two non-parametric tests for means and medians. And because of my hypotheses, I think one-tailed seems appropriate.

In my research, one hypothesis is that the average (mean) length of stay (Loss) of one group in a hospital ward is shorter than that of another group. Also, I want to examine this hypothesis between the medians of the groups.

The distributions of groups' (LoS) aren't normal. So, I need two non-parametric tests for means and medians.

The distributions of groups' (LoS) aren't normal. So, I need two non-parametric tests for means and medians.

distributions matter for the t-test (or better Welch test) only if your total sample

size is small. How large is it?

For the median, you could use the median test, as mentioned before, or maybe you

try a Kaplan-Meier survival analysis to compare time to discharge between groups.

With kind regards

Karabiner

With such a large sample, you can use the t-test (or better the Welch test, because samp

le sizes are unequal and probably variances are inhomogenous), regardless of how the

variables are distributed in the respective groups.

There is no "nonparametric test" which can compare means. The Mann-Whitney

(which is 100% equvalent to the Wilcoxon rank sum test) is is a test for ranked data

(ordinal scaled data). Such data do not have a mean.

With kind regards

Karabiner

le sizes are unequal and probably variances are inhomogenous), regardless of how the

variables are distributed in the respective groups.

Isn't Mann-Whitney a non-parametric test test for comparing means??

(which is 100% equvalent to the Wilcoxon rank sum test) is is a test for ranked data

(ordinal scaled data). Such data do not have a mean.

With kind regards

Karabiner

Last edited:

With such a large sample, you can use the t-test (or better the Welch test, because samp

le sizes are unequal and probably variances are inhomogenous), regardless of how the

variables are distributed in the respective groups.

There is no "nonparametric test" which can compare means. The Mann-Whitney

(which is 100% equvalent to the Wilcoxon rank sum test) is is a test for ranked data

(ordinal scaled data). Such data do not have a mean.

With kind regards

Karabiner

le sizes are unequal and probably variances are inhomogenous), regardless of how the

variables are distributed in the respective groups.

There is no "nonparametric test" which can compare means. The Mann-Whitney

(which is 100% equvalent to the Wilcoxon rank sum test) is is a test for ranked data

(ordinal scaled data). Such data do not have a mean.

With kind regards

Karabiner