liveBook · Manning

Probability mass function

A probability mass function assigns nonnegative probabilities to the possible values of a discrete random variable, with the probabilities summing to one.

How 3 Manning books explain it

Statistics Every Programmer Needs

A probability mass function assigns an actual probability to each possible value of a discrete random variable, with all probabilities nonnegative and summing to one.

How it is used
Quantifies the probability of specific discrete outcomes for modeling rolls, success counts, and event counts.
How deep it goes
Defines notation and probability requirements, then works through counted outcomes and distribution-specific calculations rather than deriving a universal formula.
Examples
Uses fair dice, two-dice totals, and Python calculations for binomial and Poisson probabilities.
What you can do after
Apply it via SciPy to calculate a specific binomial or Poisson probability after selecting the appropriate distribution.

Read how Statistics Every Programmer Needs explains probability mass function →

Grokking Statistics

A function that assigns a probability to each possible value of a discrete random variable.

How it is used
Uses exact discrete probabilities to evaluate individual outcomes and ranges in a binomial model.
How deep it goes
Explains parameters, SciPy usage, plotting, and range summation while deliberately avoiding combinations and permutations.
Examples
Demonstrates 10 trials with p=0.9, exactly 7 successes, all outcomes from 0 to 10, and 8-or-fewer cumulative probability.
What you can do after
Apply it via SciPy to calculate and plot exact probabilities for binomial outcomes.

Read how Grokking Statistics explains probability mass function →

AI-Powered Search

A probability mass function assigns probabilities to the possible values of a discrete random variable.

How it is used
Uses token-level probabilities to identify answer boundaries in extractive question answering.
How deep it goes
Defines PMFs, contrasts discrete and continuous values, and applies two PMFs without deriving their mathematical training.
Examples
Uses a minimalist-shoes question, tokenized context, and separate start and end probability outputs.
What you can do after
Apply it via an extractive question-answering model to select an answer span from token-level start and end probabilities.

Read how AI-Powered Search explains probability mass function →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.