For questions about correlation of two random variables. Correlation is a statistical technique that can show whether and how strongly pairs of variables are related. Use it with [tag: random-variables] and [tag: probability].

The correlation is one of the most common and most useful statistics. It is a statistical measure that indicates the extent to which two or more variables fluctuate together. A positive correlation indicates the extent to which those variables increase or decrease in parallel; a negative correlation indicates the extent to which one variable increases as the other decreases.

Let $X$ and $Y$ two random variables such that $X^2$, $Y^2$ have an expectation. We define the correlation between $X$ and $Y$ by $$\rho(X,Y)=\frac{\mathbb E[(X-\mathbb EX)(Y-\mathbb EY)]}{\sqrt{\mathbb EX^2\mathbb EY^2}}$$ when $\mathbb EX^2\mathbb EY^2\neq0$, and $0$ otherwise.

In terms of the strength of relationship, the value of the correlation coefficient varies between $-1$ and $1$. A value of $\pm1$ indicates a perfect degree of association between the two variables. As the correlation coefficient value goes towards $0$, the relationship between the two variables weakens. The direction of the relationship is indicated by the sign of the coefficient; a $+$ sign indicates a positive relationship and a $-$ sign indicates a negative relationship. Usually, in statistics, we measure four types of correlations: Pearson correlation, Kendall rank correlation, Spearman correlation, and the Point-Biserial correlation.

**References:**