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.

  • 1
    $\begingroup$ 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? $\endgroup$ – whuber Jun 12 '18 at 13:06
  • $\begingroup$ thanks. I'm new here maybe that's why I couldn't identify how to ask a question, sorry for your inconvenience. @whuber $\endgroup$ – Nahid Sultana Tuli Jun 14 '18 at 5:41
  • $\begingroup$ Thank you. Have you applied this formula to some tiny datasets? That will quickly show you what it actually equals. $\endgroup$ – whuber Jun 14 '18 at 12:15
  • $\begingroup$ 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$ $\endgroup$ – byouness Jun 14 '18 at 13:00
  • $\begingroup$ It doesn't look right to me too. but neither I find it in any books nor I can contact my teacher $\endgroup$ – Nahid Sultana Tuli Jun 14 '18 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.