1. Introduction
Monte Carlo or randomization techniques cover a wide variety of situations. They all work
by generating a large number of possible scenarios and using this distribution to calculate the
probability of a particular event or a statistic of interest. The power, relative simplicity, and
versatility of Monte Carlo methods have boosted their popularity, but to a large extent their
use has been limited by the need for specialist software or programming skills. This is
particularly true in classrooms where Excel is the most widespread data processing program,
and often the only one.
Many approaches have been made to facilitate the use of Excel as a Monte Carlo analyser.
Commercial Excel add-ins like @Risk and Crystal Ball have been available since 1987 but they
are beyond the budget of many classrooms. Albright et al (1999) [1] used the Excel data table
function to evaluate management risk, and Christie (2004) [2] used the same idea to include
statistical concepts like confidence intervals and p values. However, large data tables used for
Monte Carlo analyses proved to be clumsy and hard to change. Other authors like Leong and
Lee (2008) [3] set up a resampled test using normal Excel functions, copied the resampled test
many, many times down the sheet, and collated the results. This can be very effective in simple
cases, but lacks the versatility to cope with more complex cases without swamping the
spreadsheet with formulas.
Another approach is to use the VBA (Visual Basic for Applications) programming language
to write macros to help with automating the Excel sheets. Barr and Scott (2013) [4], for
example, provide tailor-made VBA macros that simulate the game of roulette to teach
statistical ideas. Excel also has a Data Analysis Toolpak which can resample a single instance
of a data set. Rochowicz (2010) [5] explains how to use the Toolpak in this way and gives a
VBA macro to repeat this process many times.
Macros can certainly transform Excel into a Monte Carlo processor. Unfortunately, one-off
special purpose VBA macros are beyond the scope of most students, and perhaps many
teachers. This article shows how to write a short Excel macro to collate the output from a
Monte Carlo analysis, allowing simulations and Monte Carlo integration. Two user defined
functions are given which can resample any given data range with or without replacement.
This extends the use of the sheet to give standard errors, confidence intervals, and p values
for inferential tests. A final user defined function for the triangular distribution gives the
student a chance to experiment with Monte Carlo risk analysis.
Some questions have been raised as to the suitability of Excel as Monte Carlo generator. These
issues have been addressed by Botchkarev (2015) [6] who generally approves, but advocates
the use of an external random number generator. However, this spreadsheet is intended for
classroom use with runs of only a few thousands, where possible slight deviations from
randomness in the Excel functions cannot be detected. In any case, the fidelity of the Excel
random generator is likely to be better than the fit between the mathematical model and the
real world. This Monte Carlo sheet is not as fast as its commercial rivals, but the student can
see it working which aids understanding, and its generality makes it quite capable of rather
larger projects.