Transcript ch09_1
DECISION MODELING
WITH
MICROSOFT EXCEL
Chapter 9
Monte Carlo Simulation
Part 1
Copyright 2001
Prentice Hall Publishers and
Ardith E. Baker
Introduction
Simulation allows you to quickly and inexpensively
acquire __________concerning a problem that is usually
gained through ___________ (which is often costly and
time consuming).
An experimental device (__________) will “act like”
(simulate) the system of interest in a quick, costeffective manner.
Goal: To create an _________________in which
information about alternative actions can
be obtained through_________________.
SIMULATION vs. OPTIMIZATION
In an ___________model, the values of the decision
variables are outputs.
The result of the model is a set of ________for the
decision variables that will maximize (or minimize)
the value of the____________________.
In a simulation model, the values of the decision
variables are__________. The model evaluates the
objective function for a particular set of values.
The result of the model is a measure of the _______
of a suggested solution and the variability in various
performance measures due to ______________in the
inputs.
When should simulation be used?
Simulation is one of the most frequently used tools of
quantitative analysis today because:
1. _________models may be difficult or impossible to
obtain, depending on complicating factors.
2. Analytical models typically predict only average or
“____________” (long-run) behavior.
3. _____________can be performed with a variety of
software on a PC or workstation. The level of
computing and mathematical skill required to
design and run a simulator has been substantially
reduced.
Simulation and Random Variables
MONTE CARLO METHOD:
Simulation models are often used to analyze a decision
_____________. Under risk, the behavior of one or more
factors is not known with____________. For example:
demand for a product during the next month
the return on an investment
the number of trucks that will arrive to be unloaded
The factor that is not known with certainty is called the
____________________.
The behavior of the random variable can be described
by a ____________distribution.
Design of Docking Facilities. In the following model,
trucks of different sizes carrying different types of loads,
arrive at a warehouse to be unloaded.
T
r
u
c
k
D
o
c
k
3
T
r
u
c
k
D
o
c
k
2
T
r
u
c
k
D
o
c
k
1
Exit
Entrance
Truck waiting
Truck waiting
The uncertainties are:
When will a truck arrive?
What kind and size of load will it be carrying?
How long will it take to unload the trucks?
Each ____________quantity would be a random variable
characterized by a probability distribution.
The planners must address a variety of ___________
questions:
How many docks should be built?
What type and quantity of material-handling
equipment are required?
How many workers are required over what
periods of time?
The design of the unloading dock will affect its ______of
construction and operation. Management must _______
the cost of acquiring and using the various resources
against the cost of having trucks wait to be___________.
Determination of Inventory Control Policies. Simulation
can be used to study ______________control models.
Factory
Warehouse 1
Warehouse 2
Warehouse 3
Demand
Demand
Demand
In this model, the factory produces goods that are sent
to the _________________to satisfy customer demand.
The random variables are: ________________at each
warehouse and ____________________from factory to
warehouse.
Simulation can be used to study inventory control
models.
Some of the _________________questions are:
When should a warehouse ____________from the
factory and how much?
How much _______should the factory maintain to
satisfy the orders of the warehouses?
The main costs are:
Cost of ____________the inventory
Cost of shipping goods from a factory to a
warehouse
Cost of not being able to satisfy customer
____________at the warehouse
The __________is to find a stocking and ordering policy
that keeps the total cost low while meeting demand.
Generating Random Variables
To generate a random variable, draw a _________sample
from a given probability distribution.
Two broad categories of random variables:
________________
Can assume only certain specific values
(e.g., integers)
________________
Can take on any fractional value (an infinite
number of values)
The game spinner below is an example of a _________
device used to generate demand in a given model.
Once spun, the spinner is equally likely to point to any
point on the circumference of the_____________.
13 (10.0%) 8 (10.0%)
12 (10.0%)
9 (20.0%)
11 (20.0%)
10 (30.0%)
If the areas of the _______are made to correspond to the
probabilities of different demands, the spinner can be
used to _________demand. Each spin represents a____.
Using a Random Number
Generator in a Spreadsheet
Although easy to understand, the spinner method of
generating ________________would be difficult to use if
thousands of trials are necessary. Therefore, random
number generators have been developed in
______________.
To generate __________for a given model, first assign a
range of random numbers to each possible demand.
To do this correctly, the _____________of total numbers
assigned to a demand must equal the __________of that
demand.
For example, using the interval from_________, make
the following assignment:
The probability of drawing a ___________in the range of
.90 to .99999 is 1 out of 10 or 0.1 (10%).
This method is useful for generating __________random
variables.
A GENERALIZED METHOD:
To generate a ________random variable with the RAND()
function in a spreadsheet, two things are needed:
1. The _______to generate discrete uniform random
variables
2. The ___________of the discrete random variable
to be generated
To generate a __________random variable, two things
are needed:
1. The ability to generate continuous ___________
random variables on the interval 0 to 1
2. The distribution (in the form of the ____________
distribution function) of the random variable to
be generated
Continuous Uniform Random Variables. It is important
to distinguish between U (the _________random variable
on the interval 0 to 1) and u (a specific realization of that
random variable).
0
The game
spinner can
be used to
generate
values of U.
.75
.25
.5
However, it is
impractical for
a continuous
distribution
since the ____
point must be
read (e.g.,
.4999999999).
Every point on the _______________of the circle
corresponds to a number between__________.
The Cumulative Distribution Function (CDF). Consider a
random variable, D, the_______. The CDF for D [called
F(x)] is then defined as the __________that D takes on a
value < x.
F(x) = Prob{D < x}
Knowing the probability distribution for D, the ______for
key values of D is:
X
F(x)
8
0.1
9
0.3
10
0.6
11
0.8
12
0.9
13
1.0
With a continuous distribution, the probability that any
specific value occurs is___. Therefore, continuous
random variables do not have probability_____________.
They are defined by the _________________and the CDF.
Here is a graph of the CDF. To generate a discrete
demand using the graph:
Probability
1.2
Step 1: Locate
the particular
value of U on
this axis
1
0.8
0.6
F(x)
u
Step 2: Read the
particular value
of the random
quantity, d, on
this axis
0.4
0.2
d
x
0
7
8
9
10
11
12
13
14
Suppose you want to model a _____________________
distribution of demand where the values of 8 through 12
all have the same ______________of occurring (uniform,
equally likely).
The spreadsheet has a________, =RAND(), that returns a
random number between 0 and 1. However, this will
result in a ____________uniform distribution.
To create a discrete uniform distribution, use the ______
function. For example:
In general, if you want a discrete, uniform distribution of
integer values between_________, use the formula:
INT(x + (y – x + 1)*RAND() )
THE GENERAL METHOD
APPLIED TO CONTINUOUS DISTRIBUTIONS:
The two-step process for generating a continuous
random variable W is shown below:
Probability
1.1
1
F(x)=Prob{W<x}
u
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
As before, first
locate the value
(u) of the random
variable U
F(w)
w
0
1
2
3
4
5
6
7
8
9
x
10
Then, read the
particular value of
the random
quantity, W, on
this axis
Generating from the Exponential Distribution. The
___________distribution is often used to model the time
between arrivals in a _______________model. Its CDF is
given by:
F(x) = Prob{W < w} = 1 – e-lw
Where 1/l is the ___________of the random variable W.
Therefore, we want to solve the following equation for w:
u = 1 – e-lw
The solution is:
w = -1/l ln(1- u)
Now, to draw a sample from an exponential distribution
with a mean of _____(1/l) using this equation:
1. First ____________a continuous, uniform random
number with ___________(for example, .75).
2. Apply the formula: w = -1/l ln(1- u)
= -20 (ln(1- .75))
= -20 (-1.386)
= 27.72
In a spreadsheet cell, simply enter:
= -20 *LN(1 – RAND() )
Generating from the Normal Distribution. The ________
distribution plays an important role in many simulation
and _________models. Normality is often assumed.
Consider drawing a random demand from a normal
distribution with a mean (___) of 1000 and a standard
deviation (____) of 100.
If Z is a _____normal random variable (normally
distributed with a mean of 0 and a _________________of
1) then m + Zs is a normal random variable with mean m
and standard deviation s.
So, we can draw from a unit normal distribution. Excel
has a built-in _____________that can do this:
= NORMINV( RAND() , 1000, 100)
Excel will automatically return a ___________distributed
random number with mean 1000 and std. dev. 100.
Simulating with a Spreadsheet
Simulations can be performed with _____________alone.
However, add-in software packages can enhance the
capabilities of Excel.
Two Excel add-in packages that will be used are _______
Ball and @Risk.
These add-ins offer additional random ____________and
easy commands to set up and run many more iterations
than could be run in Excel.
In addition, they automatically gather ____________and
graphical summaries of the results.
A CAPITAL BUDGETING EXAMPLE:
ADDING A NEW PRODUCT LINE
Airbus Industry is considering adding a new jet airplane
(model A3XX) to its product line. The following _______
information is available:
Startup Costs
Sales Price
Fixed Costs (per year)
Variable Costs (per year)
$150,000
$ 35,000
$ 15,000
75% of revenues
Tax ___________on the new equipment would be
$10,000 per year over the 4 year expected product life.
____________value of the equipment at the end of the 4
years is estimated to be 0.
Airbus’ cost of ________is 10% and tax rate is 34%.
If ________is known, then a spreadsheet can be used to
calculate the __________________(NPV). For example,
assume that the demand for A3XXs is 10 units for each
of the next 4 years:
THE MODEL WITH RANDOM DEMAND
It is unlikely that demand will be the same every year. A
more ___________model would be one in which demand
each year is a ___________of random variables.
This model of demand is appropriate when there is a
_____________base level of demand that is subject to
random fluctuations from year to year.
Sampling Demand with a Spreadsheet: Assume initially
that the demand in a year will be either 8, 9, 10, 11, or 12
units with each value being _____________to occur.
This is an example of a __________uniform distribution.
Now, use the formula =INT(8 + 5*RAND() ) to sample
from a discrete uniform distribution on the ________8, 9,
10, 11, 12 .
Multiple trials can be performed by pressing the
_________________key for the spreadsheet (e.g., F9).
Using this formula results in __________demands.
Hitting the ____key would result in a different sample of
demands, and possibly a different_________.
The demands are __________variables, therefore, the
NPV is also a random variable.
EVALUATING THE PROPOSAL
Two questions need to be answered about the NPV
distribution:
1. What is the _______or expected value of the NPV?
2. What is the ____________that the NPV assumes a
negative value (making the proposal to add the
A3XX less attractive)?
To answer these questions, a _____________model must
be built. To run the simulation automatically and capture
the resulting NPV in a separate spreadsheet, use the
________________command.
Start with a blank ____________by clicking on the Insert
menu and select Worksheet
Next, _________this blank worksheet 100 Iterations
Type the starting value (1) in cell A2 and hit Enter, then
return to cell A2.
Click the Edit menu and
choose_____________.
In the resulting dialog, select
Series in Columns and enter a
stop value of_____. Click OK
to fill series.
Add column ______and the following formula to cell B2.
Now select the range A2:B101 and click______________.
In the resulting dialog, enter ____for the column input
cell and click OK.
Excel will __________
the values and store the
resulting NPV in the
adjacent cells in column
B.
Note that since a random
number __________is used
in the formula, you may get
different values than these.
Now, to turn the ________into actual values upon which
we can focus, first select the range of cells B2:B101,
then click on the Edit – Copy_______.
Next, click on the Edit – Paste
_________menu option and in the
resulting dialog, choose_________.
To get a summary of the 100 iterations, use Excel’s builtin data analysis______. Click on Tools – Data Analysis.
If you do not have this option, click on the ______option
on the Tools menu and in the resulting dialog, click on
Analysis ToolPak.
After clicking OK, the Data
Analysis _______will open.
Select the Descriptive
Statistics option and click
OK.
In the resulting dialog, choose the Input Range to
include the 100__________________.
Now click
on Output
______and
enter the
cell where
the output
will be
placed.
In addition,
select
Summary
_________
and click
OK.
The resulting analysis gives the ____________mean NPV
and standard deviation.
Downside Risk and Upside Risk: To get a better idea
about the range of possible NPVs that could occur, look
at the ____________and maximum NPVs.
Distribution of Outcomes: Now we ask the question:
How likely will these _____________outcomes occur?
To answer this, examine the ________of the distribution
of the NPV by creating a histogram.
Click on Tools – Data Analysis and choose___________.
In the resulting dialog, set
the _________range and
choose to save the results
in a worksheet called NPV
Distribution.
In the resulting analysis, the ______________(column B)
indicates the number of trials that fell into the bins
(_____________) defined by column A.
The ___________% column indicates the cumulative
percentage of observations that fall into each category
or bin.
The histogram gives a visual ________________of the
distribution of NPVs. Note that it is somewhat ________
shaped.
How Reliable is the Simulation? Now the two questions
about the distribution can be answered:
1. What is the mean or _______________of the NPV?
In this trial, the mean is $12,100.
2. What is the probability that the NPV assumes a
negative value (making the proposal to add the
A3XX less attractive)?
In this trial, the probability is__________
The next questions to ask are:
1. How much __________do we have in the answers
from the first trial?
2. Would we be more confident if we ran more_____?
For a ______confidence interval, the formula is:
estimated mean + 1.96(standard deviation)
In this case, the standard deviation is the standard ____
(the standard deviation divided by the square root of the
number of trials).
Based on this trial, the ___________and lower
confidence limits are:
So, we have 95% confidence that the ______mean NPV
is somewhere between $9,679 and $14,521.
Simulating with Spreadsheet Add-ins
Spreadsheet add-ins such as Crystal Ball and ______
simplify the process of generating random variables and
assembling the ___________results.
To illustrate, return to the capital budgeting example.
A CAPITAL BUDGETING EXAMPLE:
ADDING A NEW PRODUCT LINE
Airbus Industry is considering adding a new jet airplane
(model A3XX) to its product line. The following financial
information is available:
Startup Costs
Sales Price
Fixed Costs (per year)
Variable Costs (per year)
$150,000
$ 35,000
$ 15,000
75% of revenues
Tax _________________on the new equipment would be
$10,000 per year over the 4 year expected product life.
Salvage value of the equipment at the end of the 4 years
is estimated to be_____.
Airbus’ cost of capital is _____and tax rate is 34%.
If demand is known, then a spreadsheet can be used to
calculate the net present value (______). For example,
assume that the demand for A3XXs is 10 units for each
of the next 4 years:
THE MODEL WITH RANDOM DEMAND
It is unlikely that _______will be the same every year. A
more realistic model would be one in which demand
each year is a ________of random variables.
This model of demand is appropriate when there is a
constant ________of demand that is subject to random
fluctuations from year to year.
Sampling Demand with a Spreadsheet: Assume initially
that the demand in a year will be either 8, 9, 10, 11, or 12
units with each _________being equally likely to occur.
This is an example of a discrete
uniform_______________.
Enter the discrete distribution
in a two-column format for
__________to be able to use it.
After installing Crystal Ball, an additional ________will
be displayed in Excel.
Place your cursor in cell C9 and click on the Define
______________button.
Click _________in the
resulting dialog.
Click Ok to open the
Custom Distribution
______.
Click on the ______
button.
Enter the cell range in which the __________distribution
resides and click OK.
The resulting _____________will be displayed:
Click OK again
to accept.
Repeat these steps for years 2-4 (cells D9:F9) or use
Crystal Ball’s copy data
and paste data
icons.
To get Crystal Ball to draw a new __________sample of
demands, simply click on the Single Step icon.
Clicking on this button will
randomly change the
_________and the NPV, since
each is a random variable.
EVALUATING THE PROPOSAL
In order to answer the two questions about the NPV
distribution:
1. What is the _______or expected value of the NPV?
2. What is the probability that the NPV assumes a
________value (making the proposal to add the
A3XX less attractive)?
We need to run the simulation ____________a number of
times and capture the resulting NPV.
To do this using Crystal Ball, first set up the base case
model and enter the ________(Random Number
Generators) in cells C9:F9 as was previously illustrated.
Next, click
on B19 (the
NPV cell)
and then on
the Define
Forecast
button.
After clicking on the Define Forecast icon, the following
dialog will appear:
Click on the ______
forecast window size
and When Stopped
(faster) ______option
in this dialog. Click
Set Default and then
click OK.
Click on the Run
Preferences
icon to
change the Maximum
Number of Trials to _____
and click OK.
To begin the_________, click on the Start Simulation
button.
The following dialog will be displayed upon completion
of the 500_____________.
Clicking OK will automatically
produce a_______________.
To look at the ____________from the simulation, click on
View menu on the histogram and click on Statistics.
Each run of the simulation will produce different
__________so your results may not match those shown
here.
Downside Risk and Upside Risk: To get an idea of the
range of possible NPVs that could occur, look at the
__________and maximum values in the statistic results.
Distribution of Outcomes: In order to answer other
questions about the ______________of NPVs, we need
to look at the shape of the distribution.
The previous ____________(which was automatically
produced) gives a graphical view of the distribution.
The shape of the distribution is definitely_____________.
Other _____________can be requested from Crystal Ball.
For example, suppose you want to determine the exact
probability that the NPV will be _________________(< 0).
In the Crystal Ball __________window, enter 0 in the cell
in the lower right corner and hit enter.
Click on View – Percentiles in the Crystal Ball window to
display the percentiles of the NPV distribution.
How Reliable is the Simulation? Now that the questions
concerning the __________of the distribution and the
probability of negative __________has been determined,
the next questions to answer are:
How much ______________do we have in these
answers?
Would we have more confidence if we ran more
________?
We can have 95%
confidence that the
true mean will fall in an
interval of + 1.96
____________________
about the estimated
mean.
OTHER DISTRIBUTIONS OF DEMAND
Originally, we started with equal mean ___________of 10
for each period (year). Then, we allowed for random
__________in mean demand (between 8 and 12 units).
Now, assume the mean demand will stay the ______over
the next four years, somewhere between 6 and 14 units a
year, with all values being___________________.
This scenario can be modeled as a continuous, _______
distribution between 6 and 14.
In addition, we can explore the impact of different
demand distributions on the________. When the mean
demand is relatively small, a distribution called the
_____________distribution is often a good fit.
The Poisson distribution is a _____________distribution.
Specifying the mean of this distribution completely
determines it.
The Poisson distribution is a __________distribution and
the Poisson random variable can only take on non___________ integer values.
Using Crystal Ball’s Distribution Gallery, we can easily
___________from a discrete Poisson distribution or from
a continuous uniform distribution.
First, indicate in Crystal Ball that the cell ____will have
the uniform distribution and that cells C9:F9 will have a
Poisson _____________with a mean value driven by the
value in cell D6.
With your __________on cell D6, click on the Define
Assumptions icon and choose Uniform as the
___________________. Click OK.
In the resulting dialog, specify the ___________of the
distribution to be a minimum of 6 and a maximum of 14,
then click OK.
To specify the Poisson distribution, first select cell C9
then click on the Define Assumption icon
. In the
resulting dialog, select Poisson and click OK.
In the distribution’s dialog, specify the lower range to be
–Infinity and the Rate to be =$D$6.
Clicking Enter will display the __________and Dynamic
options. Click on Dynamic and then click OK.
Use the Copy Data
and Paste Data
icons to
____________the information to cells D9:F9.
Now, let’s base the _____________on a sample of 1000
from the distribution of the NPV.
Click on the Run Preferences
following dialog box:
icon to open the
Change the Maximum
Number of Trials to
________and click OK.
Click on the Define Forecast
icon to capture the
NPV in cell B19 for each of the iterations.
Now, click on the Reset Simulation
previous results.
icon to clear any
Click on the Start Simulation
icon to begin. After
1000 iterations are completed, a _______________will be
displayed.
Click on View –
Statistics to bring up
the ____________
statistics dialog.
Note that these
results may differ
from yours.
Based on these results, the probability of a negative
NPV is 44.2%.
In summary,
1. Increasing the number of ________is apt to give a
better estimate of the expected______. However,
there can still be a difference between the
simulated _________and the true expected return.
2. Simulations can provide useful information on the
___________results.
3. Simulation results are sensitive to _____________
affecting the input parameters.
End of Part 1
Please continue to Part 2