[SciPy-dev] Numerical Recipes (was tagging 0.7rc1 this weekend?)

Bruce Southey bsouthey@gmail....
Thu Dec 4 08:19:32 CST 2008


josef.pktd@gmail.com wrote:
> I looked at ttest_rel and ttest_ind, both are simple t-tests for
> equality of two samples, either in mean or of a twice ("related")
> observed random variable.
>
> step 1: calculate difference between samples (means)
> step 2: divide by appropriate standard deviation measure
> step 3: look up distribution to report p-value
>
> The doc strings don't explain well what the test is useful for, but it
> looks a straight forward implementation of the statistical formulas.
> The only messy part is to make it more general so that it also applies
> for higher dimensional arrays, and that looks all numpy to me.
>
> ttest_ind is identical to
> http://en.wikipedia.org/wiki/T-test#Independent_two-sample_t-test
> ttest_rel is described in http://en.wikipedia.org/wiki/T-test#Dependent_t-test
>
> So, if there is any resemblance left to NR (which I don't know) then
> it's purely because it calculates the same thing. I think the two
> Wikipedia references are a lot better than NR, since Wikipedia also
> explains a bit the background and usage.
>
> The only part that I wouldn't have immediately implemented, is
> handling of zerodivision problems when the variance (of both samples
> or of difference of samples) is zero, which is an unusual boundary
> case.
>
> Josef
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>   
Hi,
Could you also please replace the use of 'betai' with the appropriate 
call to the t-distribution to the the probabilities?
Numerical Recipes uses betai and also it is more understandable to use 
the actual t-distribution.

Bruce



More information about the Scipy-dev mailing list