To test this hypothesis, each group is divided into two subgroups: those whose scores fall at or below the median, and those whose scores are above it. The result is a two-way frequency table with two rows and g columns, where g is the number of categories in your grouping variable.

  • In this table, for example, the first cell is a count of the number of employees who received standard training and scored above the median. While the null hypothesis would predict that about 10 subjects scored above the median, only four subjects in this group did so.
  • In addition to standard training, group 2 also received some technical training. Unlike the other groups, the median for all trainees does what the null hypothesis says it should do: it nearly divides this group into two equal subgroups.
  • In the final training group, those with exam scores greater than the median outnumber those at or below it by a margin of three to one. Like group 1, the null hypothesis does not provide a good approximation of center for these trainees.

From this two-way frequency table, a chi-square statistic can be calculated to test the null hypothesis of row and column independence. In fact, the median test is a chi-square test of independence between group membership and the proportion of cases above and below the median.