Expectation of 2 random variables

1. Nov 5, 2008

kingwinner

Let X and Y be two random variables.

Say, for example, they have the following joint probability mass function
Code (Text):

x
-1   0    1
-1    0   1/4  0
y 0     1/4  0  1/4
1     0   1/4  0
What is the proper way of computing E(XY)?

Can I let Z=XY and find E(Z)=∑ z P(Z=z) ? Would this give E(XY)?

Thanks for explaining!

2. Nov 5, 2008

Hurkyl

Staff Emeritus
You could do that. But it's more straightforward to simply average over all of the events in your probability space rather than doing a transformation like that.

3. Nov 6, 2008

How?

4. Nov 6, 2008

HallsofIvy

What is the probability that xy is 1? In order that xy= 1, either x= 1 and y= 1, which has probability 0 or x= -1 and y= -1 which has probability 0: The probability that xy= 1 is 0.

What is the probability that xy= 0? In order that xy= 0, either x= 0 and y= -1, which has probability 1/4, or x= 0 and y= 0, which has probability 0, or x= 0 and y= 1 which has probability 1/4, or x= -1 and y= 0 which has probability 1/4, or x= 1 and y= 0 which has probability 1/4. The probability that xy= 0 is 1/4+ 1/4+ 1/4+ 1/4= 1.

What is the probability that x= -1? In order that xy= 1, either x= 1 and y= -1 which has probability 0 or x= -1 and y= 1 which has probability 0. The probability that xy= -1 is 0.

The expected value of xy is (-1)(0)+ (0)(1)+ (1)(0)= 0.

Of course, the fact that xy had to be 0 was obvious from the start!

5. Nov 6, 2008

kingwinner

Yes, this is pretty much the way I was thinking about: Let Z=XY, and find E(Z)=∑ z P(Z=z)

But I also saw a theorem:
Code (Text):
E(XY)=∑ ∑ xy P(X=x and Y=y)
x y
What does the double sum mean? Does it just mean summing over all possible combinations of x and y?

6. Nov 6, 2008

HallsofIvy

Yes. that is exactly what it means.

Strictly speaking what it means is "first sum over all values of y, keeping x as a "variable", then sum that over all values of x" but the effect is to sum over all combinations of x and y.

Last edited by a moderator: Nov 6, 2008