Chapters 30 through 41 built the theory of probability and its distributions. Now we put it to work. This Part walks thirteen realistic datasets, each a textbook case of one named distribution, and for every one we follow the same recipe: see the shape, choose the model, validate the fit (a QQ plot or a formal goodness-of-fit test), compute the probabilities, and simulate the outcomes.
Each of the next thirteen chapters takes one dataset from book/data/, plots it, names its
distribution and explains why, fits the parameters with Python (NumPy and SciPy), overlays the
theoretical curve on the real data, computes the headline probabilities, and, where it helps, runs a
simulation. The framework below is the index to all of it.
One Distribution per Question
The hardest part of any probability problem is rarely the algebra; it is recognizing which distribution fits. The trigger is the question you are asking. This is the roadmap for the whole Part.
| Ch | Distribution | Dataset | The question it answers | Key parameters |
|---|---|---|---|---|
| Discrete · counting (Chapters 30–37) | ||||
| 48 | Bernoulli | e-commerce sessions | One yes/no trial: does a visitor add to cart? | p |
| 49 | Binomial | QC inspections | How many defects in a fixed batch of n = 50? | n, p |
| 50 | Poisson | server traffic | How many rare events (requests) per fixed interval? | λ |
| 51 | Geometric | sales outreach | How many calls until the first success? | p |
| 52 | Hypergeometric | capture-recapture | How many tagged items when drawing without replacement? | N, K, n |
| 53 | Negative binomial | reliability testing | How many trials to reach r = 10 successes? | r, p |
| Continuous · measurement (Chapters 38–39) | ||||
| 54 | Normal | exam scores | A symmetric quantity clustering around a mean? | μ, σ |
| 55 | Exponential | hardware lifespans | Time until a Poisson event (failure)? | λ |
| 56 | Gamma | regional rainfall | A positive, right-skewed total? | α (shape), β (scale) |
| Sampling & inference (Chapters 40–41) | ||||
| 57 | Central Limit Theorem | freight weights | How do sample means behave as n grows? | SE = σ/√n |
| 58 | Student's t | clinical trials | Is a small-sample mean different, with σ unknown? | df = n − 1 |
| 59 | Chi-square | survey demographics | Are two categorical variables independent? | df = (r−1)(c−1) |
| 60 | F / ANOVA | crop yield | Do several groups have different means? | df₁ = k−1, df₂ = N−k |
PMF vs PDF vs CDF
Every distribution is described by a handful of functions, and knowing which one to reach for is half the skill.
| Function | Used for | Answers | Example |
|---|---|---|---|
| PMF | discrete only | the exact probability of a value, P(X = k) | P(exactly 3 defects) |
| continuous only | density; area over a range is the probability | the bell curve of exam scores | |
| CDF | both | cumulative probability, P(X ≤ x) | P(wait ≤ 2 min) |
In the notebook these three appear for the same normal distribution: the PDF's shaded area to the left of 1 equals the CDF's height there, both 0.841. A continuous variable has zero probability at any exact point, so for those distributions only ranges (areas) carry probability.
Mean and Variance as Shape Parameters
The framework chart lists a mean and a variance for every distribution because those two numbers are the dials that set its center and its spread. Sometimes they move independently, and sometimes they are locked together.
For the normal, you can shift the mean without touching the spread: μ and σ are free. For the Poisson and exponential, they are linked, the Poisson has mean = variance = λ, so a busier process is automatically a more variable one. Recognizing which regime you are in tells you what a single parameter buys you.
Throughout the case studies we will read these straight off the data: a sample mean estimates the distribution's mean, a sample variance estimates its variance, and from those we recover the parameters (for example, a Poisson's λ is just the average count, and an exponential's rate is 1 / mean).
The Central Limit Theorem: the Bridge
The last four case studies leave single distributions behind and turn to sampling. The Central Limit Theorem is what makes that leap possible: no matter how skewed or strange the underlying data, the distribution of sample means becomes normal as the sample size grows.
This is the engine behind z-scores, the t-test, the chi-square test, and ANOVA, the tools of the final four case studies. The freight-weights chapter (57) makes it visible by generating a large population and watching the sampling distribution of the mean tighten and turn normal as n climbs, with standard error SE = σ/√n.
See the whole gallery
The companion notebook draws all thirteen distributions in one place, the six discrete PMFs, the continuous densities, the PMF/PDF/CDF relationship, and the mean-equals-variance link of the Poisson, so you can see at a glance the shapes you are about to meet in the data.
View opens the rendered notebook instantly (no setup). Open in Colab runs &
edits it live in your browser. To run locally, install numpy, scipy, and
matplotlib and launch jupyter notebook.
🎓 Key Takeaways
- ✓Choosing a distribution starts from the question; this Part maps thirteen datasets to thirteen distributions.
- ✓PMF (discrete) and PDF (continuous) give the shape; the CDF gives cumulative probability for both.
- ✓Mean and variance set center and spread; they are independent for the normal but linked for the Poisson and exponential.
- ✓The Central Limit Theorem turns sample means normal regardless of the population, the bridge to the t, chi-square, and F tests.
- ✓The workflow repeats every chapter: plot the data, choose the model, fit parameters, compute probabilities, simulate.
Quiz: Test Yourself
Eight quick questions on the distribution framework. Answer them, hit Check Answers, and keep refining until you score 100%. Your progress is saved, so you can hop back to the chapter and return anytime.