Correlation
Correlation
!Several sets of (x, y) points, with the [Pearson correlation coefficient of x and y for each set. The correlation reflects the noisiness and direction of a linear relationship (top row), but not the slope of that relationship (middle), nor many aspects of nonlinear relationships (bottom). N.B.: the figure in the center has a slope of 0 but in that case, the correlation coefficient is undefined because the variance of Y is zero.](//upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Correlationexamples2.svg/500px-Correlationexamples2.svg.png)
Correlation matrices
The correlation matrix of ${\displaystyle n}$ random variables ${\displaystyle X{1},\ldots ,X{n}}$ is the ${\displaystyle n\times n}$ matrix ${\displaystyle C}$ whose ${\displaystyle (i,j)}$ entry is
Correlation matrices
${\displaystyle c{ij}:=\operatorname {corr} (X{i},X{j})={\frac {\operatorname {cov} (X{i},X{j})}{\sigma {X{i}}\sigma {X{j}}}},\quad {\text{if}}\ \sigma {X{i}}\sigma {X{j}}>0.}$