Goal: generate 10 samples for each distribution in Excel, look at the raw numbers (and a tiny chart), and learn to recognize the “look” of each distribution.
How to use (applies to all)
In Excel set B1 = 10 (sample size N = 10). Put parameters in B2, B3 as shown in each section.
Put the generator in D2. If you have 365 with RANDARRAY, it spills to D11. Otherwise, fill down to D11.
Compute:
Mean: =AVERAGE(D2:D11)
Variance (sample): =VAR.S(D2:D11)
Quick visual: select D2:D11 → Insert → Column (or Scatter) for a tiny chart.
Why N=10? Small N makes randomness visible. Later bump to 1000 to see convergence to theory.
1) Uniform — continuous on [a, b]
Example: a=2 (B2), b=5 (B3). Values are real numbers between a and b.
Excel generator
365 (spills to 10 rows):
=B2 + (B3-B2)*RANDARRAY(B1,1)
No RANDARRAY (fill D2 → D11):
=B2 + (B3-B2)*RAND()
Theory
Mean: (a+b)/2
Variance: (b-a)^2/12
How to recognize it by sight
Numbers are spread across the entire interval [a, b] with no preference for middle or edges.
You often see values near both ends, but never outside [a, b].
A quick histogram looks roughly flat; a simple column chart looks “evenly scattered.”
2) Binomial — X ~ Binomial(n, p)
Example: n=10 (B2), p=0.30 (B3). Values are integers 0…n.
Excel generator
365:
=BINOM.INV(B2,B3,RANDARRAY(B1,1))
No RANDARRAY (fill D2 → D11):
=BINOM.INV(B2,B3,RAND())
Theory
Mean: n p
Variance: n p (1-p)
How to recognize it by sight
All outputs are integers between 0 and n (no decimals).
Values cluster around n p; extremes like 0 or n are rare unless p is near 0 or 1.
Shape is symmetric if p≈0.5; skewed toward 0 if p is small, toward n if p is large.
3) Geometric — first success
We’ll use “failures before first success” (support 0,1,2,…). Example: p=0.25 in B2.
Excel generator
365:
=NEGBINOM.INV(1,B2,RANDARRAY(B1,1))
No RANDARRAY (fill D2 → D11):
=NEGBINOM.INV(1,B2,RAND())
Theory (failures counted)
Mean: (1-p)/p
Variance: (1-p)/p^2
How to recognize it by sight
Lots of small numbers (0,1,2 are common) with occasional larger outliers.
Strong right skew: long “tail” of bigger values happens sometimes.
All outputs are nonnegative integers.
If you prefer “trials until first success” (support 1,2,…): use the same formula + 1.