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

josef.pktd@gmai... josef.pktd@gmai...
Wed Dec 3 22:45:51 CST 2008

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


More information about the Scipy-dev mailing list