# Expectation value of the sum of two random variables

1. Dec 1, 2010

### jg370

1. The problem statement, all variables and given/known data
The expectation value of the sum of two random variables is given as:

$$\langle x + y \rangle = \langle x \rangle + \langel y \rangle$$

My textbook provides the following derivation of this relationship.

Suppose that we have two random variables, x and y. Let $$p_{ij}$$ be the probability that our measurement returns $$x_{i}$$ for the value of x and $$y_{j}$$ for the value of y. Then the expectation value of the sum of $$x+y$$ is:

$$\langle x + y \rangle = \sum\limits_{ij} p_{ij} (x_i + y_j) =\sum\limits_{ij} p_{ij} x_i + \sum\limits_{ij} p_{ij} x_j$$

Then I am given the following statement:

But $$\sum\limits_j p_{ij} = p_i$$ is the probability that we measure $$x_i$$ regardless of what we measure for y, so it must be equal to $$p_i$$. Similarly, $$\sum\limits_i p_{ij} = p_j$$, is the probability of measuing $$y_i$$ irrespective of what we get for $$x_i$$.

2. Relevant equations

The difficulty I have with this statement is that I do no see how $$\sum\limits_j p_{ij}$$ can be equal to $$p_i$$.

3. The attempt at a solution

Summing over j, we should have $$(p_{i1} + p_{i2},+ .... p_{in})$$. Now, is this equal to $$p_i$$.

And similarly how can $$\sum\limits_i p_{ij}$$ can be equal to $$p_j$$

I am hopefull that someone can clear this up for me.

Thank you for your kind assitance.

jg370[/quote]
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Dec 1, 2010

### lanedance

so you have 2 discrete random variables X & Y, with a joint distribution, pij
$$p_{ij} = P(X=x_i, Y = y_j)$$

the expectation is given by:
$$<X+Y> = \sum_{ij} p_{ij} x_i y_j =$$

By definition, the marginal probabilities are
$$P(X=x_i) = \sum_{j} p_{ij} = p_i$$
$$P(Y=y_j) = \sum_{i} p_{ij} = p_j$$

If the variables are independent then you have the further conidtion that
$$p_{ij} = P(X=x_i, Y = y_j) = P(X=x_i)P(Y = y_j) = p_i p_j$$