liveBook · Manning

Probability distribution

As explained in Grokking Statistics

A probability function assigns a probability to an event or possible outcome.

A probability distribution maps every possible value of a random variable to its probability. Think of the variable as the result of a chance-driven procedure: adult height, raindrops in a minute, a die roll, or whether a water-damaged laptop recovers. Taken together, the probabilities must total 1.0 (100%). section 3.4 section 3.1

Distributions make uncertainty usable. Rather than demand one certain answer, they describe all plausible outcomes and how likely each is. Probabilities may come from observed data, personal or expert belief, or a mix; that origin matters because biased or incomplete information can make a distribution less trustworthy. section 3.0 section 3.3

Table 3.1 Probability distributions covered in this chapter

Probability distribution

Discrete or continuous?

Description

Example

Bernoulli

Discrete

Describes a single random experiment with exactly two outcomes: success or failure

After a spill, there’s a 70% chance my MacBook Air will recover and a 30% chance it will not.

Discrete (General)

Discrete

Assigns probabilities to a finite number of outcomes for an event

Probabilities of selling different colors of a video game controller

Binomial

Discrete

Predicts the probability of so many successes out of so many trials, assuming a fixed probability for each success

Probability of seeing 7 heads in flipping a 50/50 coin 10 times

Beta

Continuous

Shows the likelihood of different success rates for an event to occur, given so many successes
and failures

For a possibly rigged coin, shows the most possible outcomes of heads on a single flip, given that 8 heads occurred out
of 10 trials

Poisson

Discrete

Measures the probability of how many times an event is likely to occur for a given interval

Predicted number of server requests in a given minute

Exponential

Continuous

Predicts the time or
distance between
consecutive events in a Poisson process

Predicted time between server requests

Normal

Continuous

Predicts a continuous variable as a symmetrical bell curve defined by a mean and standard deviation

The body temperature of any given adult

Compare distribution families by whether outcomes are discrete or continuous, the problem cues they fit, and a concrete use case. section 3.4

Choose a distribution by first identifying what kind of outcome the problem describes:

  • A single two-outcome experiment calls for a Bernoulli distribution: success or failure, yes or no. section 3.4 section 3.5
  • A finite set of possible outcomes can use a general discrete distribution that assigns each outcome a probability. section 3.4
  • Repeated trials, elapsed time, and observed successes or failures point toward different specialized distributions. section 3.4

A 70% recovery chance

Let X represent laptop recovery after a spill. Assign X = 1 to recovery and X = 0 to non-recovery. A Bernoulli distribution can set P(X=1)=0.70 and P(X=0)=0.30. The values add to 1.0, and the distribution can be shown as two bars, stored in a Python dictionary, or sampled with numpy for a simulation. section 3.5 section 3.1

A distribution is not a promise about what will happen once. It is a structured model of uncertainty. Small samples can give a misleading impression of consistency or spread, so interpret patterns alongside sample size and the limits of the data. section 2.20 section 3.0

How Grokking Statistics covers it

How deep it goes
Defines random variables and probability functions, then develops distribution selection through named families and a Bernoulli implementation.
Examples
Uses laptop water-damage recovery, die rolls, raindrops, adult heights, controller colors, and tornado widths.
What it assumes
Teaches probability from zero as a value between 0 and 1 before defining distributions.
What you can do after
Apply it by pairing problem cues such as trials, time, successes, and failures with an appropriate distribution.
How it connects
Connects random variables, probability functions, Bernoulli distributions, discrete distributions, simulations, and hypothesis testing.

Also explained in

Compare how 27 books explain probability distribution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Statistics. The section links point to the parts of the book it draws on.