Sei sulla pagina 1di 3

How the Mood's Median Test Works

The test statistic of the Mood's median test is actually based on another well known hypothesis test: the chi-square
test. This test is usually used to find differences between proportions of two or more groups. But how can it be used
to compare medians?

First, practitioners should aggregate the original data into a two-way table following this procedure:

1. Calculate the overall median of all the data (here: 1.66)

2. Calculate the number of observations per group less than or equal to the overall median and greater than the

overall median. Note that only groups containing two or more observations are included in the analysis. If there

are relatively few observations greater than the median due to ties with the median, then observations equal to

the median may be counted with those greater than the median.

3. Display the data with a two-way contingency table (Table 1).

Table 1: Two-way Contingency Table


Product
Overall median = 1.66
Type
Number of Observations... A B C
Less than or equal to overall
20 16 9
median
Greater than overall median 10 14 21

The assumption (or null hypothesis) is that if there were no median difference between the groups, the percentage of
values below and above the overall median should be equal for each group. The chi-square test can now be used to
test this assumption. Low values of chi-square would prove this assumption true; large values would indicate that the
null hypothesis is false.

In this project example, the chi-square value is 8.27. The p-value of 0.016 indicates that the probability that such a
chi-square value occurs if there are actually no differences between the product type groups is only 1.6 percent.
Therefore, the practitioners can conclude that there is at least one significant difference between the groups, with just
a 1.6 percent risk of being wrong.
Return to Statistics

The Median Test


Example:
#A = 12 #B = 9, Median = 774, p <= 0.0484
Top of Form
The observation sequences

815 691
1018 548
608 554
921 851
1267 613
685 774
837 681
681 695
839 753
848
873
954

Submit Reset

A B

Bottom of Form

Characteristics:
This is the two-sample equivalent of the one-sample Sign-Test and this test is just
as crude and insensitive. However, because there are so few assumptions, a
statistically significant result is very convincing.

H0:
The median values of the two samples are equal
Assumptions:
None other than H0
Scale:
Ordinal, but only the sign with respect to the combined median is used.
Procedure:
Determine the median value of the combined samples. Count the number of observations in the
smallest sample that are smaller than the median (H) and the total number of observations
smaller than the median (m).
Together with the number of observations in the smallest sample (n1) and the total number of
observations (N), these four numbers are used to calculate the level of significance.
Level of Significance:
The probability of a certain outcome k is:
P( k ) = ( k out m ) * (( n1 - k ) out ( N - m )) / ( n1 out N )
with: ( k out n ) = n! / ( k! * (n-k)! )
If H < ( n1 * m / N ) : sum all P(k=0, H)
If H > ( n1 * m / N ) : sum all P(k=H, m)
Approximation:
If both samples contain more than 10 observations, then the distribution of
Z = ( H + 0.5 - ( n1 * m / N ) / sqrt( n1 * ( N - n1 ) * N * ( N - m ) / ( N ** 2 * ( N - 1 ) ) )
can be approximated by a Standard Normal distribution.
Remarks:
This test for median values is a permutation test. It tries to calculate the level of significance
from all possible permutations of the observations with respect to both samples.
When there are observations equal to the median value (i.e., ties) these should be assigned
conservatively, i.e., in a way that makes rejection of the H0 less likely. This has been
implemented in this example.
In this example, exact probabilities are calculated for H < 50, N < 50.

Return to: Statistics

Potrebbero piacerti anche