# Median Test

A Median Test is a non-parametric hypothesis test for comparing medians of two or more samples.

## References

### 2017

• $H_0:$ All k populations have the same median.
• $H_a:$ All least two of the populations have different medians
Test Statistic: $\frac{N^2}{ab}\sum^k_{i=1}\frac{(O_{1i}−n_ia/N)^2}{n_i}$
where
• $a$ the number of observations greater than the median for all samples
• $b$ the number of observations less than or equal to the median for all samples
• $N$ the total number of observations
• $O_{1i}$ the number of observations greater than the median for sample i
Significance Level: $\alpha$
Critical Region: $T\gt \chi^2_{1−\alpha;k−1}$
where $\chi^2$ is the percent point function of the chi-square distribution and k-1 is the degrees of freedom
Conclusion: Reject the independence hypothesis if the value of the test statistic is greater than the chi-square value.