# Is the formula of covariance right?

Is this formula correct for covariance for two variable? I could not figure it out.

$$\operatorname{Cov}(x,y) = \frac{1}{r}\sum_{i=1}^n \frac{x_i}{s_x}\frac{y_i}{s_y}$$

here $s_x$,$s_y$ is the standard deviation of $x$ and $y$;

$r$ is the sample correlation coefficient and $n$ is the total number of observations in the sample. $x_i$ is the ($X-\bar{X}$) where $X$ is a variable and $y_i$ is the ($Y-\bar{Y}$) where $Y$ is another variable.

• It might or might not be correct, depending on what "$s_x,$" "$s_y,$" "$r,$" "$x_i,$", and "$y_i$" mean. Could you explain them in your post? – whuber Jun 12 '18 at 13:06
• thanks. I'm new here maybe that's why I couldn't identify how to ask a question, sorry for your inconvenience. @whuber – Nahid Sultana Tuli Jun 14 '18 at 5:41
• Thank you. Have you applied this formula to some tiny datasets? That will quickly show you what it actually equals. – whuber Jun 14 '18 at 12:15
• Doesn't look right to me, as: $r = \frac{cov(x,y)}{s_x s_y}$ and $cov(x,y) \propto \sum_{i=1}^n x_i y_i$ – byouness Jun 14 '18 at 13:00
• It doesn't look right to me too. but neither I find it in any books nor I can contact my teacher – Nahid Sultana Tuli Jun 14 '18 at 16:59