Distributions (normal, binomial, Poisson)
Why distributions matter
Section titled “Why distributions matter”Distributions model uncertainty and randomness.
- Normal: measurement noise, averages
- Binomial: number of successes in N trials (conversions)
- Poisson: counts over time/space (arrivals, events)
Picking the right distribution
Section titled “Picking the right distribution”flowchart TD A["What are you modeling?"] --> B["Continuous measurement
(height, latency, noise)"] A --> C["Count of successes
in a fixed number of trials"] A --> D["Count of events
over time or space"] B --> E["Normal"] C --> F["Binomial"] D --> G["Poisson"]
Normal distribution
Section titled “Normal distribution”- Parameters: mean (\mu), std (\sigma)
- Symmetric bell curve
import numpy as np
x = np.random.normal(loc=0, scale=1, size=10_000)
print(x.mean(), x.std())Binomial distribution
Section titled “Binomial distribution”- Parameters: trials (n), success prob (p)
- Example: 100 visitors, conversion probability 0.03
import numpy as np
samples = np.random.binomial(n=100, p=0.03, size=10_000)
print(samples.mean())Poisson distribution
Section titled “Poisson distribution”- Parameter: rate (\lambda)
- Example: number of support tickets per hour
import numpy as np
samples = np.random.poisson(lam=5, size=10_000)
print(samples.mean())Visualize it
Section titled “Visualize it”The three distributions have distinct shapes: the normal is a smooth continuous bell, the binomial counts successes in a fixed number of trials, and the Poisson counts rare events over an interval. Seeing them side by side makes the differences click:
Practical tip
Section titled “Practical tip”When unsure:
- Plot a histogram of your data.
- Start with simple candidates (normal vs count distributions).
- Check mean/variance: for Poisson, mean ≈ variance.
🧪 Try It Yourself
Section titled “🧪 Try It Yourself”Exercise 1 – Simulate a normal distribution
Section titled “Exercise 1 – Simulate a normal distribution”Exercise 2 – Binomial trials
Section titled “Exercise 2 – Binomial trials”Exercise 3 – Poisson arrivals
Section titled “Exercise 3 – Poisson arrivals”Continue to Sampling and the Central Limit Theorem to see why sample means behave so predictably no matter which distribution you started from.
pch.coffeeTagline
pch.coffeeCtapch.feedbackHeading
pch.feedbackSubheading