Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to find covariance?

  1. Jul 11, 2007 #1
    I have 2 normally distributed dependent random variables, X and Y, and I have the mean and variance of both of them, and I want to find the covariance (or correlation) between X and Y.

    Now the formula for the covariance is Cov(XY) = E(XY) - E(X)E(Y). So I tried to calculate E(XY) via the bivariate normal distribution, but it seems that to use the bivariate normal I need to provide the correlation coefficent as a parameter, but this is the parameter that i'm trying to actually find.

    So how would I find an expression for the covariance of X and Y? To find E(XY), it seems you need to use P(XY), but to use this bivariate probability you need to provide the covariance (or correlation coefficent). So how do I get around this problem??
     
  2. jcsd
  3. Jul 11, 2007 #2

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    You can numerically calculate the covariance by taking multiple observations from the two distributions and multiplying their values. The mean of their product is E(XY). For example, let X = daily humidity and Y = daily temperature. If I measure humidity and temperature over 100 days (or at 100 locations), I will have 100 ordered pairs of (X,Y), from which I can calculate E(XY).
     
  4. Jul 11, 2007 #3
    Yes, with observations from the two distribitions I could calculate E(XY), but I need an expression for the covariance of X and Y, and not really an empirical result. That is given (X,Y) are both normally distributed with mean (m1, m2), and standard deviation (s1,s2) how do I find the covariance of XY, when they are dependent.

    What really confuses me is that for all these bivariate distributions you need to supply a correlation coefficent or some sort of covariance parameter, yet there seems to be no way of actually obtaining these covariances for dependent variables?

    So how does one actually use any of these bivariate distributions if it's not possible to theoretically get the covariances??
     
  5. Jul 11, 2007 #4

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    If you think that two variables are jointly distributed but you only know the marginal distributions, the simplest way to obtain the joint dist. is to calculate the covariance empirically. Other than that, there are copulas: http://en.wikipedia.org/wiki/Copula_(statistics)
     
  6. Jul 11, 2007 #5

    mathman

    User Avatar
    Science Advisor
    Gold Member

    When dealing with the theoretical distribution only (no empirical data), there is no way around the "problem". A bivariate normal distribution is defined by the covariance (or equivalent alternatives). If you don't have something, it remains undefined.
     
  7. Jul 11, 2007 #6
    So would I be right in concluding that when using any sort of multivariate distribution you have to know the correlation (covariance) between the random variables, and the only way to get these covariances is empirically?
     
  8. Jul 12, 2007 #7

    mathman

    User Avatar
    Science Advisor
    Gold Member

    Yes - unless there is some given theoretical information you can use.
     
  9. Jul 21, 2007 #8

    EnumaElish

    User Avatar
    Science Advisor
    Homework Helper

    http://www.math.ethz.ch/~strauman/preprints/pitfalls.pdf

     
    Last edited: Jul 21, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?