Random Variables & Their Distributions

the probability mass function (pmf)

For a discrete random variable, the probability mass function answers the simplest possible question: how much probability sits on each value? Think of it as a list of weights. If X is the number of heads in two coin flips, the pmf tells you P(X = 0) = 1/4, P(X = 1) = 1/2, P(X = 2) = 1/4. Picture a bar chart with a spike at each possible value whose height is its probability; the pmf is exactly those heights.

Written as a function, the pmf is p(x) = P(X = x). It has two defining properties. First, every value is a genuine probability, so p(x) is between 0 and 1. Second, the total mass is exactly 1: summing p(x) over all possible values of x gives 1, because the experiment must produce some outcome. To find the probability that X lands in a set of values, you simply add up the masses there: P(X is in A) = sum of p(x) over all x in A. No integrals are needed because the probability sits on isolated points.

The pmf is the complete description of a discrete random variable: knowing it tells you everything probabilistic about X, including its expectation and variance later on. A common slip is to write a pmf that does not sum to 1, or to assign positive probability to a value that the variable can never reach; both make it not a valid pmf. The probability of any value outside the listed support is simply 0.

Roll one fair die, X = the face shown. The pmf is p(x) = 1/6 for x = 1, 2, 3, 4, 5, 6 and 0 otherwise. The six masses sum to 1, and P(X is even) = p(2) + p(4) + p(6) = 1/2.

A pmf is a set of probability weights on listed values that must add up to exactly 1.

A pmf value p(x) really is a probability and cannot exceed 1. This is the key contrast with a density: a pdf value is not a probability and may exceed 1.

Also called
pmfprobability mass function機率質量函數