Probability distributions are mathematical models that describe the likelihood of observing possible values of a random variable. In modern data science, selecting the correct probability distribution is essential for anomaly detection, A/B testing, risk estimation, and probabilistic machine learning algorithms.
| Property | Discrete Distributions | Continuous Distributions |
|---|---|---|
| Variable Nature | Distinct, countable integer outcomes (e.g., number of purchases, website clicks). | Uncountable real numbers along a continuous interval (e.g., height, temperature, latency). |
| Probability Function | PMF: Probability Mass Function \(P(X = k)\) | PDF: Probability Density Function \(f(x)\) |
| Cumulative Function | \(F(x) = \sum_{k \le x} P(X = k)\) | \(F(x) = \int_{-\infty}^{x} f(t) \, dt\) |
| Canonical Examples | Bernoulli, Binomial, Poisson, Geometric | Gaussian Normal, Student's t, Exponential, Beta |
The Normal (Gaussian) distribution is the cornerstone of classical statistics, characterized by its symmetric bell curve:
\[ f(x) = \frac{1}{\sigma \sqrt{2\pi}} \exp\left( -\frac{1}{2}\left(\frac{x - \mu}{\sigma}\right)^2 \right) \]When transformed to standard units using the \(Z\)-score (\(Z = \frac{x - \mu}{\sigma}\)), it yields the Standard Normal Distribution (\(\mu = 0, \sigma = 1\)). The famous Empirical Rule dictates:
Models the number of successes \(k\) across \(n\) independent trials, where each trial has binary outcomes (Success/Failure) with constant probability \(p\):
\[ P(X = k) = \binom{n}{k} p^k (1 - p)^{n - k} \]Mean: \(\mu = np\), Variance: \(\sigma^2 = np(1 - p)\). This distribution powers digital ad click-through rates (CTR) and conversion rate audits.
Models the count of rare events occurring in a fixed interval of time or space with average arrival rate \(\lambda\):
\[ P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!} \]A unique mathematical property of the Poisson distribution is that its Mean equals its Variance: \(\mu = \sigma^2 = \lambda\).
from scipy import stats
# 1. Normal Distribution: Probability of test score > 85 (mean=70, std=10)
prob_gt_85 = 1 - stats.norm.cdf(85, loc=70, scale=10)
print(f"P(Score > 85): {prob_gt_85 * 100:.2f}%")
# 2. Binomial Distribution: Exactly 12 conversions out of 100 visits (p=0.10)
prob_12_conv = stats.binom.pmf(k=12, n=100, p=0.10)
print(f"P(12 conversions): {prob_12_conv * 100:.2f}%")
# 3. Poisson Distribution: 8 server API errors in an hour (lambda=5)
prob_8_errors = stats.poisson.pmf(k=8, mu=5)
print(f"P(8 errors when avg=5): {prob_8_errors * 100:.2f}%")
Even if your raw transaction values follow an extreme exponential or power-law distribution, if you draw 1,000 random samples of size n=50 and plot their sample means, the resulting histogram will form a near-perfect Gaussian bell curve. This enables standard parametric hypothesis testing across diverse business datasets.
Broaden your statistical analysis, Python data wrangling, and production engineering expertise:
Master mean, median, standard deviation, skewness, and kurtosis.
Formulate null hypotheses and calculate p-values using probability theory.
Apply Bayes' theorem to update prior beliefs with experimental evidence.
Prevent sampling bias and design balanced scientific experiments.