Professional Documents
Culture Documents
Cliff T. Ragsdale
Chapter 12
Introduction to Simulation Using @RISK
Introduction to Simulation
In many spreadsheets, the value for one or more cells representing independent variables is unknown or uncertain. As a result, there is uncertainty about the value the dependent variable will assume:
Alternatives with the same expected value may involve different levels of risk.
Best-Case/Worst-Case Analysis
Best case - plug in the most optimistic values for each of the uncertain cells. Worst case - plug in the most pessimistic values for each of the uncertain cells. This is easy to do but tells us nothing about the distribution of possible outcomes within the best and worst-case limits.
worst case
best case
worst case
best case
worst case
best case
worst case
best case
What-If Analysis
Plug in different values for the uncertain cells and see what happens. This is easy to do with spreadsheets. Problems:
Values may be chosen in a biased way. Hundreds or thousands of scenarios may be required to generate a representative distribution. Does not supply the tangible evidence (facts and figures) needed to justify decisions to management.
Simulation
Resembles automated what-if analysis. Values for uncertain cells are selected in an unbiased manner. The computer generates hundreds (or thousands) of scenarios. We analyze the results of these scenarios to better understand the behavior of the performance measure. This allows us to make decisions using solid empirical evidence.
Simulation
To properly assess the risk inherent in the model we need to use simulation. Simulation is a 4 step process: 1) Identify the uncertain cells in the model.
2) Implement appropriate RNGs for each uncertain cell. 3) Replicate the model n times, and record the value of the bottom-line performance measure. 4) Analyze the sample values collected on the performance measure.
What is @RISK?
@RISK is a spreadsheet add-in that simplifies spreadsheet simulation. It provides:
functions for generating random numbers commands for running simulations graphical & statistical summaries of simulation data
=IF(RAND( )<0.5,1,2)
RiskBinomial(10,0.05)
0.40
0.30
RiskBinomial(10,0.08)
0.30
0.20 0.10 0.00 0 1 2 3 4 5 6 7 8 9 10
0.20
0.10 0.00 0 1 2 3 4 5 6 7 8 9 10
RiskDiscrete({20,21,22,23},{.15,.35,.45,.05})
0.50 0.40 0.30 0.20 0.10 0.00 20 21 22 23 0.50 0.40 0.30 0.20 0.10 0.00 20
INT(RiskUniform(20,24))
21
22
23
RiskPoisson(0.9)
0.40
0.30 0.20 0.10 0.00 0 1 2 3 4 5 6 7 8 9 10 0.40 0.30 0.20 0.10 0.00 0 1 2
RiskPoisson(2)
0.40
RiskPoisson(8)
0.30
0.20 0.10 0.00 3 4 5 6 7 8 9 10 0 2 4 6 8 10 12 14 16 18 20
RiskNormal(20,3)
0.30 0.25 0.20 0.15 0.10 0.05 0.00
RiskNormal(20,3,15,23)
11
13 15
17 19 21
23
25 27 29
RiskChisq(2)
0.50 0.40 0.30 0.20 0.10 0.00 0 2 4 6 8 10 12 0.50 0.40 0.30 0.20 0.10 0.00 0 2 4
RiskChisq(5)
0.50 0.40 0.30 0.20 0.10 0.00 6 8 10 12 14 16 18 0 2
RiskExponential(5)
10
RiskTriang(3,4,8)
0.50 0.40 0.30 0.20 0.10 0.00 2.5 3.5 4.5 5.5 6.5 7.5 8.5 0.50 0.40 0.30 0.20 0.10 0.00 2.5
RiskTriang(3,7,8)
0.15 0.10 0.05
RiskUniform(40,60)
3.5
4.5
5.5
6.5
7.5
8.5
0.00 30.0
40.0
50.0
60.0
70.0
A continuous random variable may assume one of an infinite number of values in a specified range.
Example: The amount of gasoline in a new car can be any value between 0 and the maximum capacity of the fuel tank.
s n
s n
where:
y the sample mean s = the sample standard deviation n = the sample size (and n 30)
Note that as n increases, the width of the confidence interval decreases.
p (1 p ) n
p (1 p ) n
where:
p the proportion of the sample that is less than some value Yp n = the sample size (and n 30)
Note again that as n increases, the width of the confidence interval decreases.
Probability
.03 .05 .07 .09 .11 .15 .18 .14 .08 .05 .03 .02
MCCs owner wants to determine the ROP and order size that will provide a 98% service level while minimizing average inventory.
TRC wants to select the projects that will maximize the firms expected profit.
Risk Management
The solution that maximizes the expected profit also poses a significant (9%) risk of losing money. Suppose TRC would prefer a solution that maximizes the chances of earning at least $1 million while incurring at most a 9% chance of losing money. We can use RISKOptimizer to find such a solution...
Normal Dist'n Return Parameters Gas Coal Oil Nuclear 16% 12% 10% 9% 12% 6% 4% 3%
Wind 8% 1%
The McDaniel Group wants a 12% return with minimal risk. How much should be invested in each type of plant?
End of Chapter 12