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!