[SciPy-User] [SciPy-user] One Sample Sign Test for a Median in SciPy?
Fri Dec 21 13:37:01 CST 2012
I tried your suggestion with the data set I was running and getting the same
result (p-value) as R and with a third party software. I will let you know
if I encounter any furthers issues.
I will be testing the sample wilcoxon signed rank test at some future date,
so thanks for the letting me know that it's not present.
> On Fri, Dec 21, 2012 at 9:21 AM, amundell <firstname.lastname@example.org>
>> Is there a One Sample Sign Test in SciPy?, i.e. non parametric test for
>> testing the null hypothesis that the median of a population, from which
>> tested sample is drawn, is equal to a hypothesised value.
>> This type of test is included in the BSDA library in R (SIGN.test:
>> http://rss.acs.unt.edu/Rdoc/library/BSDA/html/sign.test.html) and I was
>> looking to see if I could make some comparisons with SciPy. . Thanks
> I thought it is somewhere, but I don't find any
> for the example in the R help, maybe something like this
>>>> xs = (7.8, 6.6, 6.5, 7.4, 7.3, 7., 6.4, 7.1, 6.7, 7.6, 6.8)
>>>> xs = np.asarray(xs)
>>>> med=6.5; stats.binom_test([(xs<med).sum(),(xs>med).sum()], p=0.5)
> same p-value as in R
> A one-sample version of wilcoxon signed rank test also seems to be
>> View this message in context:
>> Sent from the Scipy-User mailing list archive at Nabble.com.
>> SciPy-User mailing list
> SciPy-User mailing list
View this message in context: http://old.nabble.com/One-Sample-Sign-Test-for-a-Median-in-SciPy--tp34823879p34825074.html
Sent from the Scipy-User mailing list archive at Nabble.com.
More information about the SciPy-User