[SciPy-User] [SciPy-user] One Sample Sign Test for a Median in SciPy?
josef.pktd@gmai...
josef.pktd@gmai...
Fri Dec 21 12:49:17 CST 2012
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
More information about the SciPy-User
mailing list