If I have two random variables ($A$ and $B$) and a joint probability function whose output is dependent on the values of both random variables (i.e both variables are part of the function's equation), how would I go about finding the correlation and covariance of $A$ and $B$?

Let's say that the two variables both take on the values 0 and 1.

The formula for covariance is $$E[XY] - E[X]E[Y]$$ so in this case, I would first need to find $E[AB], E[A]$ and $E[B]$. The part that's confusing me is, how would I use this joint probability function in order to get the individual expectations of each variable? Do I just plug in the values that each variable takes on and sum up the values?

EDIT: Here's an example joint probability function in order to make my question more clear: $P(A = q, B = p) = 10q - 3p$

  • $\begingroup$ If $(A,B)$ is discrete, then, for example, $$E(A)=\sum_{a,b}aP(A=a,B=b)$$ $\endgroup$ – Did Jun 6 '17 at 7:57
  • 1
    $\begingroup$ Hmm, okay that makes sense! Also, for E(AB), would it be the same except with a * b inside the summation multiplied by the same probability? $\endgroup$ – corecase Jun 6 '17 at 8:13
  • 1
    $\begingroup$ Yes. Kind of... the definition, you know. $\endgroup$ – Did Jun 6 '17 at 8:29

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.