The Mood’s Median is a non-parametric hypothesis test the difference of two or more population median.

For run this test it’s important that:

• All samples are random from the respective population;
• Works on ordinal data;
• The distribution of the k samples isn’t normal but have the same shape;
• The k samples are independent of each other;
• In each sample, the observation is independent;
• We have few outlier because in working with median the outlier doesn’t helps.

In this case the hypothesis are like:

• H0: all the k population median are equal
• H1at least one of the median are different.

The way to conduct the hypothesis test is like the one-sample t-tests, but we use another statistics.

To compute the statistics first you need to:

• Put together all the observation from the k sample and find the overall median M – Es: you have S1 = {1,5,7,8} and S2 = {2,4,6} so you have Stot={1,2,4,5,6,7,8} and M=5;
• In each sample, order the observation (in ascending way) and count how many data point falls above M and how many data point falls on or belove – Es: So you calculate the contigency table1;
• Now you can perform the Chi-square test based on this data in table1, so for each cell you calculate the expected value as: cell= row tot * column tot / total of total – Es: so you calculate the expected value in table2;
• So now Chi-square goodnes of fit test, the formula is in image1