nag_median_test (g08acc) performs the Median test on two independent samples of possibly unequal size.
The Median test investigates the difference between the medians of two independent samples of sizes
and
, denoted by:
The hypothesis under test,
, often called the null hypothesis, is that the medians are the same, and this is to be tested against the alternative hypothesis
that they are different.
The test proceeds by forming a
frequency table, giving the number of scores in each sample above and below the median of the pooled sample:
|
Sample 1 |
Sample 2 |
Total |
Scores pooled median |
|
|
|
Scores pooled median |
|
|
|
Total |
|
|
|
nag_median_test (g08acc) returns:
(a) |
the frequencies and ; |
(b) |
the probability, , of observing a table at least as ‘extreme’ as that actually observed, given that is true. If , is computed directly (‘Fisher's exact test’); otherwise a approximation is used. |
The probability returned should be accurate enough for practical use.
nag_median_test (g08acc) is not threaded in any implementation.
This example is taken from page 112 of
Siegel (1956). The data relate to scores of ‘oral socialisation anxiety’ in 39 societies, which can be separated into groups of size 16 and 23 on the basis of their attitudes to illness.