Thanks for the responses, glad to know I'm not going crazy.
Hi,
On Tue, Mar 10, 2015 at 9:27 AM, Sturla Molden <sturla.molden@gmail.com> wrote:
> Alistair Miles <alimanfoo@googlemail.com> wrote:
>
>> I'm trying to calculate correlation coefficients and looking at the
>> np.corrcoef function. It has bias and ddof arguments, however when I try
>> different values of ddof with test data the results are always the same,
>> i.e., changing ddof has no effect. From some back-of-the-envelope algebra I
>> reckon the n/(n-ddof) normalisations should get cancelled out when
>> calculating correlation coefficients from a covariance matrix, and
>> therefore the ddof (and bias) arguments to np.corrcoef are redundant.
>>
>> I'd be very grateful if someone could verify this is true or tell me if
>> I've missed something.
>
> You are right. It should cancel out or np.corrcoef would be wrong. The
> sample size does not go into the Pearson product-moment correlation.
Oh dear - that's embarrassing.
https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
I guess we should deprecate the 'bias' and 'ddof' input arguments asap.
Cheers,
Matthew
_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user