Density and Mass Functions

The probability mass function (pmf) of a discrete random variable $X$ is given by \[f_X(x) = P(X = x) \text{ for all } x.\]

The probability density function (pdf), $f_X(x)$, of a continuous random variable $X$ is the function that satisfies \[F_X(x) = \int_{-\infty}^{x} f_X(t)\;dt \text{ for all } x.\]

A note on notation: The expression “$X$ has distribution given by $F_X(x)$” is abbreviated symbolically by “$X \sim f_X(x),$” where we read the symbol “$\sim$” as “is distributed as.” We can similarly write $X \sim f_X(x)$ or, if $X$ and $Y$ have the same distribution, $X \sim Y.$

Theorem 1.8.1 A function $F_X(x)$ is a pdf (or pmf) of a random variable $X$ if and only if
a.) $f_X(x) \geq 0 \text{ for all } x.$
b.) $\sum_x f_X(x) = 1 \text{ (pmf) } \;\; \text{ or } \;\; \int_{-\infty}^{\infty}f_X(x)\,dx = 1 \text{ (pdf).}$