Definition:Expectation/Discrete

Definition
Let $\struct {\Omega, \Sigma, \Pr}$ be a probability space.

Let $X$ be a real-valued discrete random variable on $\struct {\Omega, \Sigma, \Pr}$.

The expectation of $X$, written $\expect X$, is defined as:
 * $\expect X := \ds \sum_{x \mathop \in \image X} x \map \Pr {X = x}$

whenever the sum is absolutely convergent, that is, when:
 * $\ds \sum_{x \mathop \in \image X} \size {x \map \Pr {X = x} } < \infty$

where $\map \Pr {X = x}$ is the probability mass function of $X$.

Note that the index of summation does not actually need to be limited to the image of $X$, as:
 * $\forall x \in \R: x \notin \image X \implies \map \Pr {X = x} = 0$

Hence we can express the expectation as:
 * $\expect X := \ds \sum_{x \mathop \in \R} x \map \Pr {X = x}$

Also, from the definition of probability mass function, we see it can also be written:
 * $\expect X:= \ds \sum_{x \mathop \in \R} x \map {p_X} x$

Also see

 * Expectation of Real-Valued Discrete Random Variable shows that this definition is consistent with the general definition of expectation.

It can also be seen that the expectation of a discrete random variable is its first moment.