I read from my lecture notes that Pearson correlation can be computed as $\frac{s_{xy}}{s_xs_y}$. If I have been given a finite amount of data points $(x_i,y_i),i=1,\ldots,n$, how can I compute the Pearson correlation using formula $\tfrac{s_{xy}}{s_xs_y}$? I managed to find that $s_{xy}=\dfrac{\sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{n-1}$ but I didn't found the similar formula for $s_x$ and $s_y$.
Tell me more
×
Cross Validated is a question and answer site for
statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.
|
$s_{x}^2=\dfrac{\sum_{i=1}^n (x_i-\bar{x})^2}{n-1}$ = sample variance of the variable $X$. $s_{y}^2=\dfrac{\sum_{i=1}^n (y_i-\bar{y})^2}{n-1}$ = sample variance of the variable $Y$. $s_{xy}=\dfrac{\sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{n-1}$ = sample covariance of the variables $X$ and $Y$. $s_{x}$ is simply the square root of $s_{x}^2$ and $s_{y}$ is the square root of $s_{y}^2$. They are called the sample standard deviations of $X$ and $Y$ respectively. |
|||||||||
|
|
It is standard deviation of first and of second variable. See also this example. |
|||
|
|
