29.2 Testing for a median using the binomial distribution
In any set of data, we’d expect half the values to lie either above or below the median11 1 This is from how the median is defined.. The probability distribution of the number of values above (or below) the median () can be defined as
We can use this to carry out a hypothesis test to see if a set of data has a given median; we count up the total number of observations, and how many are above or below the median. We can then work out the probability of how likely it would be to see that value (or a more extreme value) under the null hypothesis.