Linearity of Expectation is a property of expected values, which states that for any two random variables X and Y, the expected value of their sum is equal to the sum of their individual expected values.
The formula for the Linearity of Expectation is:
[ \mathbb{E}[X + Y] = \sum_{(x,y) \in \mathcal{X} \times \mathcal{Y}} p(x, y)(x + y) ]
Here's a detailed explanation of the derivation of the Linearity of Expectation formula:
-
Start with the definition of the expected value:
[ \mathbb{E}[X + Y] = \sum_{(x,y) \in \mathcal{X} \times \mathcal{Y}} p(x, y)(x + y) ]
-
Rearrange the sum to separate the terms involving x and y:
[ = \sum_{y \in \mathcal{Y}} \sum_{x \in \mathcal{X}} p(x, y)(x + y) ]
-
Expand the sum into two separate sums:
[ = \sum_{y \in \mathcal{Y}} \sum_{x \in \mathcal{X}} p(x, y)x + \sum_{y \in \mathcal{Y}} \sum_{x \in \mathcal{X}} p(x, y)y ]
-
Recognize that the first sum is the expected value of X and the second sum is the expected value of Y:
[ = \mathbb{E}[X] + \mathbb{E}[Y] ]
-
Rearrange the terms to show the linearity of expectation:
[ \sum_{y \in \mathcal{Y}} \sum_{x \in \mathcal{X}} p(x, y)x = \sum_{x \in \mathcal{X}} \sum_{y \in \mathcal{Y}} p(x, y)x ]
-
Recognize that the inner sum (\sum_{y \in \mathcal{Y}} p(x, y) ) is the marginal probability of X:
[ \sum_{x \in \mathcal{X}} x \sum_{y \in \mathcal{Y}} p(x, y) = \sum_{y \in \mathcal{Y}} p(x, y) ]
-
Finally, using the definition of the expected value, we have:
[ = \sum_{x \in \mathcal{X}} xp(x) = \mathbb{E}[X] ]
So, the Linearity of Expectation formula is derived by breaking down the joint probability distribution into individual probabilities and then reassembling them to show that the expected value of the sum of random variables is equal to the sum of their individual expected values.