‘Median test’ or ‘Moody’s Media Test’ is used to test whether two or more samples are same in their median values. The Median test is a non parametric test and basically verifies whether the two samples have the same median or not, and then it can be inferred whether they are samples from the same population or not. This test ordains that the measurement scale should be ordinal and the samples should be independent (not necessarily of the same sample size) and should be taken from populations whose distributions have a similar shape.
The null hypothesis is assumed to be that the two samples have the same median. The alternate hypothesis is that both samples have different medians.
The median test is very robust against outliers, and fairly robust against differences in the shapes of the distributions.The median test has poor power for normally distributed data, even worse power for short-tailed distributions, but good relative power for heavy-tailed distributions.
The test involves use of the chi- square statistic during its procedure.