AI Glossary / Statistics and probability / Beginner
Probability mass function (pmf)
Definition
A probability mass function, or pmf, assigns a probability to each possible value of a discrete random variable. Written pX(x), it equals the probability that X takes the value x. Its values must be nonnegative and sum to one over the variable's possible values. A pmf can describe a finite set of outcomes or a countably infinite set, such as all nonnegative integer counts.
What it means
A pmf is a complete probability description for a discrete variable. It can answer questions about a single value or a collection of values by adding the relevant probabilities. The outcomes need not all be equally likely.
The word mass distinguishes this representation from a probability density for a continuous variable. A pmf value is itself a probability at a particular discrete value. A density height is generally not such a probability; probabilities for a continuous density come from areas over intervals. Confusing the two can produce incorrect calculations and interpretations.
How it works
Define the random variable and its support, meaning the values that can occur with positive probability. Assign a probability to each value using a specified model, empirical estimates, or another justified probability assessment. Verify that no probability is negative and that the total is one.
For an event such as X being at least two, sum the pmf over all qualifying values. The cumulative distribution function adds the masses at values less than or equal to its argument. For numeric outcomes, the expected value is the sum of each value multiplied by its probability, provided the expectation exists.
A conditional pmf describes the distribution given specified information and must be normalized within that condition. If probabilities are estimated from data, distinguish the fitted pmf from the unknown population distribution. Mathematical validity does not guarantee empirical accuracy, especially when the data or operating conditions change.
Three practical examples
- A support model assigns probabilities to receiving zero, one, two, or more urgent requests during a defined interval.
- A classifier outputs a probability distribution over mutually exclusive document categories.
- A quality model describes the number of defective items in a fixed-size batch under stated assumptions.
Think of it this way
Think of dividing a complete probability budget among labeled boxes. Each box corresponds to a possible discrete value, and its share is that value's probability. The shares can differ, but they cannot be negative or collectively exceed the whole budget when all possibilities are included.
Worked example
Suppose a fictional model describes the number X of follow-up questions required for a task. It assigns probabilities 0.10, 0.30, 0.40, and 0.20 to X = 0, 1, 2, and 3 respectively, with zero probability assigned to other values.
The masses sum to one. The probability of at least two follow-up questions is 0.40 + 0.20 = 0.60. The expected number is 0 × 0.10 + 1 × 0.30 + 2 × 0.40 + 3 × 0.20 = 1.70.
The most probable value is two, whereas the expectation is 1.70. There is no contradiction: an average need not be a possible individual count. The model also makes a strong assumption by excluding counts above three. If such cases are possible in the application, its support must be reconsidered rather than treating the four listed values as automatically complete.
Illustrative case study
Fictional case study: Cedar Support builds an assistant that forecasts how many clarification questions a request will require. Its first dashboard shows only the most likely count. Managers cannot see how much probability remains on longer interactions.
The team displays the full predicted pmf and calculates the probability of exceeding a relevant workload threshold. It checks the probabilities against later outcomes and separately reviews cases outside the model's original support. This fictional case illustrates probability reporting and validation; it does not claim that a particular model accurately forecasts real customer behavior.
Common misconceptions and mistakes
A common mistake is assuming all possible values must receive equal probability. Another is using probabilities that do not sum to one or accidentally omitting a tail category. Rounding can create small display discrepancies, but the underlying model still needs a coherent normalization.
The expected value is not always the most likely outcome and need not itself be a possible count. A pmf estimated from observed frequencies also does not prove that unseen outcomes are impossible. Finally, separate probabilities for several overlapping events do not automatically form a pmf over mutually exclusive outcomes; their relationship must be specified.
Business use
Businesses use pmfs to reason about counts, categories, demand levels, defects, and discrete task outcomes. A full distribution can support capacity decisions and threshold calculations that a single predicted label or average cannot express.
AI systems should keep category definitions, time windows, and conditioning information attached to their probability outputs. Validate calibration and coverage of the possible outcomes. When combining several discrete variables, use a joint model or justified independence assumptions rather than multiplying probabilities without checking their relationships.
People also ask
Can a pmf value exceed one?
No. Each mass is a probability and lies between zero and one.
Can a pmf have infinitely many possible values?
Yes, if the support is countable and the probabilities sum to one.
Is a histogram automatically a population pmf?
No. Normalized counts can estimate a discrete distribution, but a histogram may also group continuous measurements into intervals and remains sample-dependent.
Check your understanding
A proposed pmf assigns probabilities 0.20, 0.50, and 0.40 to its only three possible values. Is it valid?
Answer: No. The probabilities sum to 1.10. The model must be corrected; merely labeling the numbers as probabilities does not make them a valid distribution.
Related terms
- Discrete random variable
- Probability distribution
- Probability density function
- Cumulative distribution function
- Expected value
- Normalization
- Conditional probability
- support
- categorical distribution
Learn next
Practice checking pmfs and calculating probabilities for sets of outcomes. Then study expectation, variance, and conditional distributions. Compare a discrete mass function with a continuous density and learn how joint distributions represent relationships among multiple variables.
More in Statistics and probability
- Poisson distribution - The Poisson distribution is a probability distribution for a count taking the values 0, 1, 2 and so on.
- Policy capturing - Policy capturing is a research method for describing how people combine information when making judgments or decisions.
- Poly-Weibull distribution - The poly-Weibull distribution is a continuous time-to-event distribution constructed by adding several Weibull-type hazard functions.
- Pólya urn model - A Pólya urn model is a probability model in which sampling changes the probabilities of future samples through a specified reinforcement rule.
- Polynomial regression - Polynomial regression models an outcome using powers of one or more numerical predictors.
- Polynomial trend coefficient - A polynomial trend coefficient is a numerical weight used with other such weights to test a specified trend across ordered group means.
Sources
The Aalto Dictionary of Machine Learning defines the probability mass function and its relationship to discrete random variables: https://aaltodictionaryofml.github.io/ADictML_Main.pdf
The four-value model, calculations, and fictional case are original. The finite support is an explicit teaching assumption, not a claim that real clarification counts cannot exceed three.
Previous: Probability management Next: Probability matching