The proof of the linearity of expectation given in my textbook is:
$E[aX+b] \\= \sum_{x|p(x)>0} (ax+b)\;p(x) \\= a\sum_{x|p(x)>0}xp(x) + b \sum_{x|p(x)>0}p(x) \\= aE[X] + b$
I don't understand though why it is $\sum_{x|p(x)>0} (ax+b)\;p(x)$ instead of $\sum_{x|p(x)>0} (ax+b)\;p(ax+b)$
Why is $p(x) = p(ax+b)$ ?
Expectation is integration with respect to a probability measure. Integration is linear. Therefore expectation is linear.