[SciPy-User] stats.chisquare issues

Gökhan Sever gokhansever at gmail.com
Mon Sep 27 19:39:04 EDT 2010


On Mon, Sep 27, 2010 at 2:41 PM, Bruce Southey <bsouthey at gmail.com> wrote:

> >>>> stats.chisquare(np.array([4, 1, 3, 1.]),np.array([4, 2, 2, 1.]))
> > (1.0, 0.80125195690120077)
> >
> > Not accepting list is a bug
>
> It is not a bug because the docstring says arrays not array-like.
>

This is interesting. I am too much used to then getting array-like sequences
converted to np.arrays under the hood when I forget explicitly using
np.arrays for numpy, scipy and matplotlib libraries.



> If you are doing something like density estimation then you probably
> need to select your bins (especially in the tails) more carefully to
> avoid this from happening.


I was testing chi-square test to see how well my model representing my
actual observed data. Right know I don't need to use the function for
further calculation as I have different methods to estimate the quality of
my fit.

Thanks for your suggestions.


-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100927/9fb2877b/attachment.html>


More information about the SciPy-User mailing list