numpy.corrcoef

numpy.corrcoef(x, y=None, rowvar=1, bias=0)

Return correlation coefficients.

Please refer to the documentation for cov for more detail. The relationship between the correlation coefficient matrix, P, and the covariance matrix, C, is

P_{ij} = \frac{ C_{ij} } { \sqrt{ C_{ii} * C_{jj} } }

The values of P are between -1 and 1.

See also

cov
Covariance matrix

Previous topic

numpy.var

Next topic

numpy.correlate

This Page

Quick search