# Mathematics of Statistics

## Definition[edit]

Pearson’s correlation coefficient is the covariance of the two variables divided by the product of their standard deviations. The form of the definition involves a “product moment”, that is, the mean (the first moment about the origin) of the product of the mean-adjusted random variables; hence the modifier *product-moment* in the name.

### For a population[edit]

Pearson’s correlation coefficient when applied to a population is commonly represented by the Greek letter *ρ* (rho) and may be referred to as the *population correlation coefficient* or the *population Pearson correlation coefficient*. Given a pair of random variables {\displaystyle (X,Y)}, the formula for *ρ*^{[7]} is:

{\displaystyle \rho _{X,Y}={\frac {\operatorname {cov} (X,Y)}{\sigma _{X}\sigma _{Y}}}} | (Eq.1) |

where:

- {\displaystyle \operatorname {cov} } is the covariance
- {\displaystyle \sigma _{X}} is the standard deviation of {\displaystyle X}
- {\displaystyle \sigma _{Y}} is the standard deviation of {\displaystyle Y}

The formula for {\displaystyle \rho } can be expressed in terms of mean and expectation. Since{\displaystyle \operatorname {cov} (X,Y)=\operatorname {E} [(X-\mu _{X})(Y-\mu _{Y})],}

^{[7]}

the formula for {\displaystyle \rho } can also be written as

{\displaystyle \rho _{X,Y}={\frac {\operatorname {E} [(X-\mu _{X})(Y-\mu _{Y})]}{\sigma _{X}\sigma _{Y}}}} | (Eq.2) |

where:

- {\displaystyle {\sigma _{Y}}} and {\displaystyle \sigma _{X}} are defined as above
- {\displaystyle \mu _{X}} is the mean of {\displaystyle X}
- {\displaystyle \mu _{Y}} is the mean of {\displaystyle Y}
- {\displaystyle \operatorname {E} } is the expectation.

The formula for {\displaystyle \rho } can be expressed in terms of uncentered moments. Since

- {\displaystyle \mu _{X}=\operatorname {E} [X]}
- {\displaystyle \mu _{Y}=\operatorname {E} [Y]}
- {\displaystyle \sigma _{X}^{2}=\operatorname {E} [(X-\operatorname {E} [X])^{2}]=\operatorname {E} [X^{2}]-[\operatorname {E} [X]]^{2}}
- {\displaystyle \sigma _{Y}^{2}=\operatorname {E} [(Y-\operatorname {E} [Y])^{2}]=\operatorname {E} [Y^{2}]-[\operatorname {E} [Y]]^{2}}
- {\displaystyle \operatorname {E} [(X-\mu _{X})(Y-\mu _{Y})]=\operatorname {E} [(X-\operatorname {E} [X])(Y-\operatorname {E} [Y])]=\operatorname {E} [XY]-\operatorname {E} [X]\operatorname {E} [Y],\,}

the formula for {\displaystyle \rho } can also be written as{\displaystyle \rho _{X,Y}={\frac {\operatorname {E} [XY]-\operatorname {E} [X]\operatorname {E} [Y]}{{\sqrt {\operatorname {E} [X^{2}]-[\operatorname {E} [X]]^{2}}}~{\sqrt {\operatorname {E} [Y^{2}]-[\operatorname {E} [Y]]^{2}}}}}.}