Confidence intervals, stats modules?

Tim Churches tchur at optushome.com.au
Mon Jun 10 06:27:11 EDT 2002


Alan James Salmoni wrote:
> 
> Problem is that I don't think stats.py has confidence intervals (it does
> have mean, stddev etc). I am working on it myself for my own stats
> package, but it might be a few weeks as I am concentrating upon non
> parametric stuff.

Assuming your are talking about a normal variate, the stats.py module
has a function 
for the sample std deviation but not, as far as I recall, for the
Student's t distribution,
which is needed to calculate confieence intervals where the popuation
std deviation is
unknown (which is most of the time).

Thus, I think that R, via RPy, is a better bet. R also has all the
machinery you need to 
calculate confidence limits for non-normal variates too. Even simple
statistics only remain
"elementary" if you don't think too hard about them.

Tim C

> 
> Alan.
> 
> Tim Churches wrote:
> > Duncan Smith wrote:
> >
> >>"Stephen Boulet" <stephen at theboulets.net> wrote in message
> >>news:ug2r3aac4etnef at corp.supernews.com...
> >>
> >>>Are there any stats modules to calculate things like confidence intervals,
> >>>mean, standard deviation? Thanks.
> >>>
> >>>-- Stephen
> >>
> >>http://www.nmr.mgh.harvard.edu/Neural_Systems_Group/gary/python.html
> >>
> >
> >
> > Gary's stats module is excellent and is probably sufficient for the uses
> > you
> > describe. There are also some elementary statistical functions in Konrad
> > Hinsen's
> > equally excellent Scientific Python package - see
> > http://starship.python.net/crew/hinsen/scientific.html
> >
> > In fact, you could just use NumPy (Numerical Python) - have a look at
> > the MLab
> > module in NumPy (which is at http://www.pfdubois.com/numpy/ ).
> >
> > However, if you are interested in more advanced statistical analysis
> > and/or in
> > drawing statistical graphs, then have a look at RPy, by Walter Moreira,
> > at http://rpy.sourceforge.net
> >
> > RPy embeds the R stats environment within Python. R is good for most
> > things
> > statistical, from the elementary to the advanced and experimental, and
> > it does
> > truly beautiful graphics. It is a mature project backed by a number of
> > eminent
> > statisticians in five continents.
> >
> > Note that R is multi-platform (see http://www.r-project.org ) but RPy
> > only
> > works under Linux and Unix (and Mac Os X, perhaps) at this stage. I
> > believe
> > a Windows version is in the works.
> >
> > Tim C
> >
> >
> 
> --
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list