# Expectation value of the sum of two random variables

## Homework Statement

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$$.

## Homework 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$$.

## 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]

## The Attempt at a Solution

Related Calculus and Beyond Homework Help News on Phys.org
lanedance
Homework Helper
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$$