Contents/ Part IX · Probability & Distributions Case Studies/ Chapter 48

The Probability Distribution Framework

Thirteen realistic datasets, thirteen distributions, one workflow. This chapter is the map for the case studies ahead: how to pick a distribution, the difference between a PMF, a PDF, and a CDF, how mean and variance set a shape, and why the Central Limit Theorem ties it all back to inference.

⏱️ ~14 min read
🐍 Notebook included
📊 Chapter 48

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.

P
Choosing a distribution is choosing a model for how a quantity varies. The right choice hands you its mean and variance, its exact probabilities (through the PMF or PDF), and its cumulative risks (through the CDF), all for free.
🗺️
How to read these case studies

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.

1

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.

ChDistributionDatasetThe question it answersKey parameters
Discrete · counting (Chapters 30–37)
48Bernoullie-commerce sessionsOne yes/no trial: does a visitor add to cart?p
49BinomialQC inspectionsHow many defects in a fixed batch of n = 50?n, p
50Poissonserver trafficHow many rare events (requests) per fixed interval?λ
51Geometricsales outreachHow many calls until the first success?p
52Hypergeometriccapture-recaptureHow many tagged items when drawing without replacement?N, K, n
53Negative binomialreliability testingHow many trials to reach r = 10 successes?r, p
Continuous · measurement (Chapters 38–39)
54Normalexam scoresA symmetric quantity clustering around a mean?μ, σ
55Exponentialhardware lifespansTime until a Poisson event (failure)?λ
56Gammaregional rainfallA positive, right-skewed total?α (shape), β (scale)
Sampling & inference (Chapters 40–41)
57Central Limit Theoremfreight weightsHow do sample means behave as n grows?SE = σ/√n
58Student's tclinical trialsIs a small-sample mean different, with σ unknown?df = n − 1
59Chi-squaresurvey demographicsAre two categorical variables independent?df = (r−1)(c−1)
60F / ANOVAcrop yieldDo several groups have different means?df₁ = k−1, df₂ = N−k
Two families: discrete bars (counts) and continuous curves (measurements) DISCRETE (PMF) CONTINUOUS (PDF) area under the curve = probability
2

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.

FunctionUsed forAnswersExample
PMFdiscrete onlythe exact probability of a value, P(X = k)P(exactly 3 defects)
PDFcontinuous onlydensity; area over a range is the probabilitythe bell curve of exam scores
CDFbothcumulative probability, P(X ≤ x)P(wait ≤ 2 min)
Three views of probability PMF (mass) PDF (density) CDF (cumulative)

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.

3

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.

🔗
Independent vs linked

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).

4

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.

The CLT: skewed data, but normal sample means skewed population average n normal sample means

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 Notebook (code & outputs) ▶ Open in Colab ⬇ View / Download on GitHub

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.
5

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.