The paired sample sign test tests the median difference between pairs of scores from two matched samples.
For two match samples
,
. The null hypothesis
iis that the medians of the paired samples are the same, while the alternative hypothesis
can be one- or two-tailed (see below). We compute:
, which is the number of pairs for which
;
of non-tied pairs
;
corresponding to
(adjusted to allow the complement
to be used in an upper tailed or a two-tailed test).
is the probability of observing a value
if
; or of observing a value
if
, given that
is true. If
, then
.Suppose that the significance test of a chosen size
is to be performed (i.e.,
is the probability of rejecting
when
is true; typically
is a small quantity such as 0.05 or 0.01). The returned value of
can be used to perform the significance test on the median difference, against various alternative hypothesis
as follows.
: median of
median of
.
is rejected if
.
: median of
median of
.
is rejected if
: median of
median of
.
is rejected if /math-f17d940553818fee4f08170e90217c63.png?v=0)
For more details of the algorithm, please refer to: nag_sign_test (g08aac).