sandbox.descstats.sign_test()

statsmodels.sandbox.descstats.sign_test

statsmodels.sandbox.descstats.sign_test(samp, mu0=0)

Signs test.

Parameters:

samp : array-like

1d array. The sample for which you want to perform the signs test.

mu0 : float

See Notes for the definition of the sign test. mu0 is 0 by default, but it is common to set it to the median.

Returns:

M, p-value :

See also

scipy.stats.wilcoxon

Notes

The signs test returns

M = (N(+) - N(-))/2

where N(+) is the number of values above mu0, N(-) is the number of values below. Values equal to mu0 are discarded.

The p-value for M is calculated using the binomial distrubution and can be intrepreted the same as for a t-test. The test-statistic is distributed Binom(min(N(+), N(-)), n_trials, .5) where n_trials equals N(+) + N(-).

doc_statsmodels
2017-01-18 16:15:25
Comments
Leave a Comment

Please login to continue.