\begin{definition}[Definition:Probability Mass Function]
Let $\struct {\Omega, \Sigma, \Pr}$ be a probability space.
Let $X: \Omega \to \R$ be a discrete random variable on $\struct {\Omega, \Sigma, \Pr}$.
Then the '''(probability) mass function''' of $X$ is the (real-valued) function $p_X: \R \to \closedint 0 1$ defined as:
:$\forall x \in \R: \map {p_X} x = \begin{cases}
\map \Pr {\set {\omega \in \Omega: \map X \omega = x} } & : x \in \Omega_X \\
0 & : x \notin \Omega_X
\end{cases}$
where $\Omega_X$ is defined as $\Img X$, the image of $X$.
That is, $\map {p_X} x$ is the probability that the discrete random variable $X$ takes the value $x$.
$\map {p_X} x$ can also be written:
:$\map \Pr {X = x}$
Note that for any discrete random variable $X$, the following applies:
{{begin-eqn}}
{{eqn | l = \sum_{x \mathop \in \Omega_X} \map {p_X} x
      | r = \map \Pr {\bigcup_{x \mathop \in \Omega_X} \set {\omega \in \Omega: \map X \omega = x} }
      | c = {{Defof|Probability Measure}}
}}
{{eqn | r = \map \Pr \Omega
      | c = 
}}
{{eqn | r = 1
      | c = 
}}
{{end-eqn}}
The latter is usually written:
:$\ds \sum_{x \mathop \in \R} \map {p_X} x = 1$
Thus it can be seen by definition that a '''probability mass function''' is an example of a normalized weight function.
The set of '''probability mass functions''' on a finite set $Z$ can be seen denoted $\map \Delta Z$.
\end{definition}