Summarize this article in one sentence.
The Pearson correlation coefficient is luckily a good amount simpler to calculate than its constituent parts, the covariance and standard deviations. The correlation coefficient of X and Y, ρxy{\displaystyle \rho _{xy}}, is calculated as σxyσx×σy{\displaystyle {\frac {\sigma _{xy}}{\sigma {x}\times \sigma {y}}}}. In simple terms, it is the covariance of X and Y divided by the product of their standard deviations. For the example stocks, your equation would be set up as ρxy=0.19250.456×0.522{\displaystyle \rho _{xy}={\frac {0.1925}{0.456\times 0.522}}} Start by simplifying the bottom of the equation by multiplying the two standard deviations. Then, divide the covariance on the top by your result. The solution is your correlation coefficient. The coefficient is represented as a decimal between -1 and 1, rather than as a percentage.  Continuing with the example, the equation solves to ρxy=0.809{\displaystyle \rho _{xy}=0.809}. So, the correlation coefficient between returns on stocks X and Y is 0.809. Note that this result has been rounded to three decimal places. The square of the correlation coefficient, called R-squared, is also used to measure how closely the returns are linearly related. In simpler terms, it represents how much of the movement in one variable is caused by the other. It does, however, specify which variable acts upon the other (if X causes Y to move or if Y causes X to). Calculate R-squared by squaring your result for the correlation coefficient. For example, the R-squared value for the example correlation coefficient would be ρxy2=0.8092=0.654.{\displaystyle \rho _{xy}^{2}=0.809^{2}=0.654.}

Summary:
Set up your correlation coefficient equation. Solve for the correlation coefficient. Calculate R-squared.