Skip to content

Distributions (normal, binomial, Poisson)

Distributions model uncertainty and randomness.

  • Normal: measurement noise, averages
  • Binomial: number of successes in N trials (conversions)
  • Poisson: counts over time/space (arrivals, events)
diagram Choosing a distribution mermaid
A quick decision path from the kind of data you have to a matching distribution.
  • Parameters: mean (\mu), std (\sigma)
  • Symmetric bell curve
Normal samples
import numpy as np
 
x = np.random.normal(loc=0, scale=1, size=10_000)
print(x.mean(), x.std())
  • Parameters: trials (n), success prob (p)
  • Example: 100 visitors, conversion probability 0.03
Binomial samples
import numpy as np
 
samples = np.random.binomial(n=100, p=0.03, size=10_000)
print(samples.mean())
  • Parameter: rate (\lambda)
  • Example: number of support tickets per hour
Poisson samples
import numpy as np
 
samples = np.random.poisson(lam=5, size=10_000)
print(samples.mean())

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:

sketch Three common distributions p5.js
Normal is a smooth bell; binomial counts successes in n trials; Poisson counts rare events over an interval.

When unsure:

  • Plot a histogram of your data.
  • Start with simple candidates (normal vs count distributions).
  • Check mean/variance: for Poisson, mean ≈ variance.

Exercise 1 – Simulate a normal distribution

Section titled “Exercise 1 – Simulate a normal distribution”

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

pch.feedbackHeading

pch.feedbackSubheading