# Math Help - Need some clarification on a formula

1. ## Need some clarification on a formula

In the discrete case, is the summing notation used here interpreted such that I have to sum with regard to the sample space of Y, and then sum the result of that with respect to the sample space of X? Or do I consider both sample spaces and just sum once? The former sounds like a lot of work.

Thanks!

2. ## Re: Need some clarification on a formula

The sum is ultimately over the set of pairs $\{(x,y)\mid x\in S_X,y\in S_Y\}$. You can imagine this set as a matrix. It does not matter whether you sum it rows first or columns first; you have to compute $g(x,y)p_{XY}(x,y)$ for each pair $(x,y)$ and then add them all together.

3. ## Re: Need some clarification on a formula

I see, thanks.