# Equivalent definitions for expected value of random variable

Let $(\Omega, P)$ be a probability space. One definition for the expected value of a random variable $X$ is

$$E(X)=\sum_{x\in \mathbb{R}} xP(X=x).$$

The notes I am reading say that this definition is equivalent to

$$E(X)=\sum_{\omega \in \Omega} X(\omega)P(\omega).$$

Okay, I sort of understand why, but not completely. Since the set $\left\{X=x\right\}=\emptyset$, then of course $P(X=x)=0$, so we only need to consider the real values $X(\omega)$ for each $\omega \in \Omega$. What I don't understand is why $P(X=x)$ gets replaced with $P(\omega)$. It seems like that change is made simply because the set we are taking the sum over changes, but somehow that is an unsatisfactory reason for me. Can anyone give me another reason? Thank you!

• as it stands, you have an uncountable sum - are you sure you want that? Jul 7, 2015 at 18:16
• @user190080 you make a good point. Of course I don't want that. I prefer the second definition, but I just wanted to know why they were equivalent. Jul 7, 2015 at 18:26
• ha well...I actually wanted to point out that this is not quite well defined - have you wrote it like (exactly) this in your notes? Maybe in addition to the answer, the concept is known as image measure, so the measure which is induced on your image of $X$ Jul 7, 2015 at 18:34

Since $X : \Omega \mapsto \mathbb{R}$, you can think of the distribution (or expectation) of $X$ either in terms of a probability function over the domain or range of this function, it's really just a conceptual difference.
Also by looking at the sum $\sum_{\omega \in \Omega} X(\omega) P(\omega)$ and collecting all those $\omega$ for which $X(\omega) = k$ for each $k$, you can by simple factoring get the first definition. (You can go in the other direction as well by decomposing $\{ X = k \}$ into the atoms of $\Omega$.)
• I thought to do the factoring, but then I thought that it's not necessarily true that $P(X=x)=\prod_{\omega \in \left\{X=x\right\}} P(\omega)$, right? Jul 7, 2015 at 18:29
• I'm guessing you mean a sum instead of product? But yes we can write $P(\{ X = k \}) = P(\{ \omega : X(\omega) = k \} ) = \sum_{ \omega \in \{ \omega : X(\omega) = k \} } P(\omega)$. Jul 7, 2015 at 18:34