Chapter 3 — Simulate in Excel (N = 10)

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)

  1. In Excel set B1 = 10 (sample size N = 10). Put parameters in B2, B3 as shown in each section.
  2. Put the generator in D2. If you have 365 with RANDARRAY, it spills to D11. Otherwise, fill down to D11.
  3. Compute:
    • Mean: =AVERAGE(D2:D11)
    • Variance (sample): =VAR.S(D2:D11)
  4. Quick visual: select D2:D11Insert → 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

How to recognize it by sight

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

How to recognize it by sight

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)

How to recognize it by sight

If you prefer “trials until first success” (support 1,2,…): use the same formula + 1.

=NEGBINOM.INV(1,B2,RANDARRAY(B1,1)) + 1   (365)
=NEGBINOM.INV(1,B2,RAND()) + 1             (fill)

4) Negative Binomial — failures before r-th success

Example: r=3 (B2), p=0.30 (B3).

Excel generator

365:

=NEGBINOM.INV(B2,B3,RANDARRAY(B1,1))

No RANDARRAY (fill D2 → D11):

=NEGBINOM.INV(B2,B3,RAND())

Theory (failures counted)

How to recognize it by sight

5) Poisson — X ~ Poisson(λ)

Example: λ=4 (B2). Outputs are 0,1,2,… (counts).

Excel generator

365:

=POISSON.INV(B2,RANDARRAY(B1,1))

No RANDARRAY (fill D2 → D11):

=POISSON.INV(B2,RAND())

Theory

How to recognize it by sight

Compare & reflect

  1. Compute mean/variance with =AVERAGE(D2:D11) and =VAR.S(D2:D11).
  2. Match the “look”:
    • Uniform: evenly spread within [a,b].
    • Binomial: integers 0…n, cluster near np.
    • Geometric: many small values, rare large ones (strong right tail).
    • NegBin: like geometric but larger mean/spread (failures until r successes).
    • Poisson: counts centered near λ; mean≈variance.
  3. Write 1–2 sentences: “What clues in my 10 numbers make me think it’s this distribution?”