BSimulating Statistical Scenarios

The type of simulation we will be doing is called Monte Carlo simulation—the use of random numbers to mimic realities involving chance. This appendix begins with step-by-step instructions and screenshots for constructing a basic statistical simulation in Excel. After that, it describes the nature of random variation evident in all simulations, then it overviews general guidelines for simulating statistical phenomena, and, finally, it gives specific instructions for reproducing the book's other statistical scenario simulations.

In cell A1 type = randbetween(0,1) then press Enter key on keyboard.

Screenshot of an Excel sheet depicting the first step for constructing a basic statistical simulation in Excel. In the cell A1 is written randbetween(0,1).

You will now see either a 0 or a 1 in cell A1.

Press the function key F9 several times and you will see the value change like flipping a coin.

Screenshot of an Excel sheet depicting the next step for constructing a basic statistical simulation in Excel. In the cell A1 is written 1.

Copy A1 to B1 through J1 (B1:J1).

This will give you 10 coin flips in a row.

Screenshot of an Excel sheet depicting the next step for constructing a basic statistical simulation in Excel by copying A1 to B1 through J1 (B1:J1).

In cell K1 type = sum(A1:J1), then press Enter. This will give you the head count.

Press the function key F9 several times just to see what happens.

Screenshot of an Excel sheet depicting the next step for constructing a basic statistical simulation in Excel. In the cell K1 is written sum(A1:J1) that gives the head count.

Copy cells A1:K1 down through row 1000.

This will give you 1000 independent repetitions ...

Get Illuminating Statistical Analysis Using Scenarios and Simulations now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.