I am trying to follow the derivation for the covariance of two discrete random variables. The joint distribution of the two random variables is known:
$ P(x=a, y=b) = \frac{1}{(m+n)(m+n-1)},$ when $1 \leq a \leq m+n, 1 \leq b \leq m+n, a \neq b$.
The distribution of x is the same as y, and it is known:
$ P(x=a) = P(y=a) = \frac{1}{m+n},$ when $1 \leq a \leq m+n$
Then, to calculate $Cov(x,y)$:
$ Cov(x,y) = E[xy] - E[x]E[y] $ $ = \sum_{1 \leq a \leq m+n, 1 \leq b \leq m+n, a \neq b} \frac{ab}{(m+n)(m+n-1)} - \left(\frac{m+n+1}{2}\right)^2$
The covariance is given as: $\displaystyle Cov(x,y) = -\frac{m+n+1}{12}$.
How do I express the summation in the covariance equation in terms of $m,n$? It is the product of two numbers, then varying the two numbers over a range, that is getting me stuck.
Thanks.
P.S. I have read the post here Variance for Summing over Distinct Random Integers, and I am getting stuck on step #3 of Didier Piau's post.