[SciPy-User] [SciPy-user] One Sample Sign Test for a Median in SciPy?

amundell andrewhdmundell@gmail....
Fri Dec 21 13:37:01 CST 2012


Thanks Josef,

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.
Cheers, Andrew


josef.pktd wrote:
> 
> On Fri, Dec 21, 2012 at 9:21 AM, amundell <andrewhdmundell@gmail.com>
> wrote:
>>
>> 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
>> the
>> 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
>> Andrew.
> 
> 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)
> 0.021484374999999997
> same p-value as in R
> 
> A one-sample version of wilcoxon signed rank test also seems to be
> missing.
> 
> Josef
> 
>>
>> --
>> View this message in context:
>> http://old.nabble.com/One-Sample-Sign-Test-for-a-Median-in-SciPy--tp34823879p34823879.html
>> Sent from the Scipy-User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
> 
> 

-- 
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 mailing list