Thanks for the responses, glad to know I'm not going crazy. 

Cheers,
Alistair. 

On Tuesday, 10 March 2015, Matthew Brett <matthew.brett@gmail.com> wrote:
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


--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Web: http://purl.org/net/aliman
Email: alimanfoo@gmail.com
Tel: +44 (0)1865 287721