Maxima Function
test_sign (x)
test_sign(x,option_1,option_2,...)
This is the non parametric sign test for the median of a continuous population. Argument x is a list or a column matrix containing a one dimensional sample.
Options:
'alternative
, default 'twosided
, is the alternative hypothesis;
valid values are: 'twosided
, 'greater
and 'less
.
'median
, default 0
, is the median value to be checked.
The output of function test_sign
is an inference_result
Maxima object
showing the following results:
'med_estimate
: the sample median.
'method
: inference procedure.
'hypotheses
: null and alternative hypotheses to be tested.
'statistic
: value of the sample statistic used for testing the null hypothesis.
'distribution
: distribution of the sample statistic, together with its parameter(s).
'p_value
: p-value of the test.
Examples:
Checks whether the population from which the sample was taken has median 6, against the alternative H_1: median > 6.
(%i1) load("stats")$ (%i2) x: [2,0.1,7,1.8,4,2.3,5.6,7.4,5.1,6.1,6]$ (%i3) test_sign(x,'median=6,'alternative='greater); | SIGN TEST | | med_estimate = 5.1 | | method = Non parametric sign test. | (%o3) | hypotheses = H0: median = 6 , H1: median > 6 | | statistic = 7 | | distribution = [binomial, 10, 0.5] | | p_value = .05468749999999989