numpy/scipy: correlation

robert no-spam at no-spam-no-spam.invalid
Sat Nov 11 12:02:38 CET 2006


Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: 
m, m-err, o, o-err, r-coef,r-coef-err ?

Or a formula to to compute the 3 error ranges?

-robert

PS:

numpy.corrcoef computes only the bare coeff:
>>> numpy.corrcoef((0,1,2,3.0),(2,5,6,7.0),)
array([[ 1.        ,  0.95618289],
       [ 0.95618289,  1.        ]])

with ints it goes computes wrong:
>>> numpy.corrcoef((0,1,2,3),(2,5,6,7),)
array([[ 1.        ,  0.94491118],
       [ 0.94491118,  1.        ]])




More information about the Python-list mailing list