Discrete Distribution Examples
Worked examples for common discrete distributions. For each example the range, PMF, and expected moment values are given. All results were verified against known analytical formulae.
Bernoulli Distribution
The Bernoulli distribution models a single binary trial with success probability \(p\).
Parameters: \(p = 0.6\)
Support: 0, 1
Range: 0,1
PMF: 0.6 if x == 1 else 0.4
Known moments about origin:
Order |
Value |
|---|---|
mu_1 |
0.6 (= p) |
mu_2 |
0.6 (= p, since X^2 = X for Bernoulli) |
mu_3 |
0.6 |
mu_4 |
0.6 |
Known central moments:
Order |
Value |
|---|---|
mu_1 |
0 (always) |
mu_2 |
0.24 (= p*(1-p)) |
Binomial Distribution
The Binomial distribution models the number of successes in \(n\) independent Bernoulli trials.
Parameters: \(n = 10\), \(p = 0.4\)
Support: 0, 1, 2, …, 10
Range: 0,1,2,3,4,5,6,7,8,9,10
PMF: (factorial(10) / (factorial(x) * factorial(10-x))) * 0.4**x * 0.6**(10-x)
Known analytical values:
Mean = n*p = 4.0
Variance = n*p*(1-p) = 2.4
Std Dev = sqrt(2.4) ≈ 1.5492
Skewness = (1-2p)/sqrt(n*p*(1-p)) ≈ 0.1291
Kurtosis = 3 + (1-6p(1-p))/(n*p*(1-p)) ≈ 3.0583
Geometric Distribution (failures before first success)
The Geometric distribution models the number of failures before the first success, with support starting at 0.
Parameters: \(p = 0.3\)
Support: 0, 1, 2, 3, …
Range: 0,1,2,3,...
PMF: 0.3 * (0.7 ** x) if x >= 0 else 0
Known analytical values:
Mean = (1-p)/p = 7/3 ≈ 2.3333
Variance = (1-p)/p² = 70/9 ≈ 7.7778
Skewness = (2-p)/sqrt(1-p) ≈ 2.031
Kurtosis = 9 + p²/(1-p) ≈ 9.129
Geometric Distribution (trials until first success)
Alternative parameterisation: support starts at 1.
Parameters: \(p = 0.3\)
Range: 1,2,3,4,...
PMF: 0.3 * (0.7 ** (x-1)) if x >= 1 else 0
Known analytical values:
Mean = 1/p = 10/3 ≈ 3.3333
Variance = (1-p)/p² ≈ 7.7778 (same as above)
Poisson Distribution
The Poisson distribution models the number of events in a fixed interval when events occur at constant rate \(\lambda\).
Parameters: \(\lambda = 3\)
Support: 0, 1, 2, 3, …
Range: 0,1,2,3,...
PMF: (exp(-3) * 3**x) / factorial(x) if x >= 0 else 0
Known analytical values:
Mean = λ = 3.0
Variance = λ = 3.0
Skewness = 1/sqrt(λ) ≈ 0.5774
Kurtosis = 3 + 1/λ = 3.3333
Tip
The Poisson distribution’s PMF decays very quickly for large \(x\) relative to \(\lambda\). With \(\lambda = 3\), 200 terms captures more than \(10^{-200}\) of the total probability.
Negative Binomial Distribution
The Negative Binomial models the number of failures before the \(r\)-th success.
Parameters: \(r = 2\), \(p = 0.5\)
Support: 0, 1, 2, 3, …
Range: 0,1,2,3,...
PMF: (factorial(x+1) / (factorial(x) * factorial(1))) * 0.5**2 * 0.5**x if x >= 0 else 0
Known analytical values:
Mean = r*(1-p)/p = 2
Variance = r*(1-p)/p² = 4
Uniform Discrete Distribution
Equal probability over a finite set of values.
Parameters: values 1 through 6 (fair die)
Range: 1,2,3,4,5,6
PMF: 1/6
Known analytical values:
Mean = (n+1)/2 = 3.5
Variance = (n²-1)/12 = 35/12 ≈ 2.9167
Skewness = 0 (symmetric)
Kurtosis = 3 - (6(n²+1))/(5(n²-1)) ≈ 2.5143
Tips for All Discrete Distributions
Set the moment reference to Mean (a = μ) and order ≥ 4 to see skewness and kurtosis in the Statistics tab.
Cross-check the first moment (μ₁) against the known analytical mean before trusting higher-order results.
For the Poisson distribution with small \(\lambda\), increasing Calc precision to 10 helps accuracy for the 4th moment and above.
If validation fails with sum ≠ 1, verify the PMF guard (
if x >= 0 else 0) and check for typos in the exponent.
See also
Discrete Random Variables — full DRV user guide
Convergence Methods — how infinite series are handled
Advanced Examples — mixture distributions and custom PMFs