For a discrete random variable X taking the values x1,x2,x3,…, the probability mass function (pmf), written f(⋅) or p(⋅), is defined by
f(xk)=P(X=xk),k=1,2,3,…
(Definition 11.3). By Theorem 11.1, a function f is a valid pmf exactly when (i) f(xk)≥0 for every k, and (ii) ∑kf(xk)=1 — every candidate pmf in this chapter is checked against these two conditions, either to find an unknown constant (e.g. solving for k in f(x)=kx2) or simply to confirm the given table is legitimate.
The pmf is the discrete analogue of a "how likely is each value" table, and can be presented in three equivalent forms: as a table (x against f(x)), as a graph (a bar/spike diagram over the support points), or as an algebraic expression f(x)=… valid over the support.
Building a pmf from an experiment. Typically: (1) identify the random variable's support (its list of possible values, from the Random-Variable concept's inverse-image counting); (2) compute P(X=x) for each value, usually as (favourable sample points)/(total sample points), or via a known combinatorial formula (e.g. hypergeometric counts (xK)(n−xN−K)/(nN) for drawing without replacement); (3) verify the probabilities sum to 1 as a sanity check.
Building a pmf with an unknown constant. When f is given up to a constant k (e.g. f(x)=k2,2k2,… over a table, or f(x)=kx2+1 over a finite support), Theorem 11.1(ii) — the probabilities must sum to 1 — gives a single equation in k that pins it down (discarding any solution that would make some f(xk)<0, by Theorem 11.1(i)).