0
$\begingroup$

The following is an equation from my probability textbook:

$\displaystyle\sum_y\sum_{\{x\ |\ g(x)=y\}}g(x)p_X(x)=\sum_x g(x)p_X(x)$

Could someone please give me a step-by-step explanation of why this is true?

$\endgroup$
  • 1
    $\begingroup$ Probably because probabilities add-up to one.. $\endgroup$ – Eduardo Longa May 7 '17 at 18:16
  • $\begingroup$ @EduardoLonga I like the probably...in a question on probability ;) $\endgroup$ – TheGeekGreek May 7 '17 at 18:17
0
$\begingroup$

Interpretation 1 (no need for probability): The right-hand side is a sum over all possible values of $x$. The left-hand side is also a sum over all possible values of $x$, but they are "grouped" by the value of $g(x)$ so that you sum over each group first, and then add up the group totals.

Interpretation 2: Leg $p_X$ be the probability mass function of $X$. The right-hand side is $E[g(X)]$ while the left-hand side is $\sum_y E[g(X) \cdot \mathbf{1}_{g(X)=y}]$. The equality follows by noting that $\sum_y \mathbf{1}_{g(x)=y}=1$ for any $x$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.