0% found this document useful (0 votes)
61 views40 pages

07a - Simulation Modeling

This document discusses simulation modeling using built-in Excel tools. It explains that simulation modeling allows managers to evaluate risk by incorporating uncertainty into parameters. It provides examples of how companies use simulation to evaluate investment alternatives and make risk-informed decisions. The document outlines the basic process for developing a simulation model, including selecting input distributions, building the model, running simulations, and analyzing outputs to select the best decision variable value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views40 pages

07a - Simulation Modeling

This document discusses simulation modeling using built-in Excel tools. It explains that simulation modeling allows managers to evaluate risk by incorporating uncertainty into parameters. It provides examples of how companies use simulation to evaluate investment alternatives and make risk-informed decisions. The document outlines the basic process for developing a simulation model, including selecting input distributions, building the model, running simulations, and analyzing outputs to select the best decision variable value.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Simulation Modeling with

Built-in Excel Tools

1
Why is simulation useful?

 Consider two investment alternatives:


• A: Invest $10,000.
• Probability of a $100,000 gain is 0.10
• Probability of a $10,000 loss is 0.90
• B: Invest $10,000
• Probability of a $500 gain is 1.0
 Which would you choose?
 Why?

2
Risk-Informed Decision Making
 Appropriate and inappropriate uses of averages.
 Managers manage risk.
 Simulation gives us a tool to help us evaluate risk.
 Risk: The uncertainty associated with an undesirable
outcome.
• Risk is not the same as just being uncertain about something,
and is not just the possibility of a bad outcome.
• Risk considers the likelihood of an undesirable outcome (e.g., the
probability) as well as the magnitude of that outcome.

3
Simulation Model
 A simulation model is a computer model that imitates a
real-life situation.
 Like other decision models, it has parameters (uncontroll-
able inputs), decision variables (controllable inputs), and
outputs (objective, consequences, etc.)
 Simulation model incorporates uncertainty in one or more
parameters (uncontrollable inputs)

Some of them are


random inputs Parameters Spreadsheet Objective

Simulation Probability and


Model statistics
Determined by Decision
decision-maker Consequences
Variables
4
How Does Spreadsheet Simulation Model Work?
 We begin with input variables and then relate them with
appropriate Excel formulas to output variables of interest.
 Simulation uses random numbers, which represent
uncertain parameters, to drive the whole simulation process.
 Random numbers are generated with pre-specified
probability distribution functions.
 Each time the spreadsheet recalculates, all of the random
numbers change, which simulates the real process once and
generates one scenario.
 By collecting the output data from all the scenarios, we see
which values of the outputs are mostly likely, and we see the
best-case and worst-case scenarios.
5
Real Applications of Simulation
 Many companies (Cummins Engine, Merck, Proctor &
Gamble, and United Airlines, to name only a few) have
used simulation to determine which of several possible
investment projects they should choose.

 Simulation can help answer questions such as:


 Which project is the riskiest?

 What is the probability that an investment will yield at


least a 20% return?

 What is the probability that the NPV of an investment


will be less than - $1 billion, which is a loss of more
than $1 billion?
6
Advantage and Benefit of Simulation Models

 It shows an entire distribution of results, not simply a


single bottom-line result.

 Each different set of values for the uncertain inputs can


be considered a scenario. Simulation allows us to
generate many scenarios, each leading to an output
value. In the end, we see a whole distribution of the
output values.

 Simulation models are useful for determining how


sensitive a system is to changes in operating conditions.

7
Process for Developing and
Using a Simulation Model

 Select input probability distributions


 Build the simulation model.
 Generate outputs from several decision
variable values.
 Select the best value for the decision
variable.

8
Selecting an Input Probability Distribution

There are several ways to chose an appropriate input


distribution.
 Use a histogram with historical data.
 Compare the assumptions of a distribution with the
input characteristics.
 Use @RISK’s distribution fitting feature to compare
potential distributions to actual data.

A good distribution will both fit the theoretical


assumptions of the variable and match the distribution
of values from that variable.

9
Building the Simulation Model

Create the spreadsheet model using decision variables,


random inputs, and formulas to create outputs of
interest.
 Use good spreadsheet design to make the model easy to
read and follow.
 A table containing different candidate values for the
decision variables can be used to simultaneously
generate outputs from several decision variable values.
• Using only Excel, this can be done with a Data Table.
• In @RISK, this will be done using a SimTable.

10
Selecting the Best Value
for the Decision Variable
After the simulation is run, the distribution
for the output variables from each set of
decision variable inputs can be compared
and the “best” selected.

Because random inputs change from


simulation to simulation, each run may
suggest a different value of the decision
variable as being the best.

11
Use the Inverse of Probability Function
to Generate Random Numbers
 The following inverses of probability functions are often used:
 For Normal distribution: NORMINV( )
 For Log-normal distribution: LOGINV( )
 For Discrete Uniform Distribution: RANDBETWEEN(a,b)
 For Continuous Uniform Distribution: a + (b-a)*RAND( )

 Generate random numbers using the inverse of probability


function:
 General formula: = ….INV(RAND( ), parameter values)
 Example: =NORMINV(RAND( ), mean, standard
deviation)
12
Ordering Calendars At Walton Bookstore
In August, Walton must decide how many of next year’s
nature calendars to order.

 Each calendar costs $7.50 and sells for $10.

 After February 1, all unsold calendars will be returned


to the publisher for a refund of $2.50/calendar.

 Walton find out that the best-fit probability


distribution for demand is a normal distribution with
mean of 175 and standard deviation of 50.

Walton wants to develop a simulation model to estimate the


expected profit and standard deviation if he orders 130
calendars. 13
Simulating Demand and Profit
 For any fixed order quantity of calendars, profit is a
function of demand:
Profit = unit_price * MIN(demand, order_quantity)
- unit_cost * order_quantity
+ unit_refund * MAX(order_quantity - demand, 0)

 Demand is uncertain, so profit is also uncertain.


 Demand follows some probability distribution.
 We can simulate demand by drawing samples from the
distribution.
 Using the sample data of demand and the corresponding
profit data, we can simulate the profit.

14
Key Formulas in the Simulation Model

 Generate simulated demand (in C17):


=MAX(0, ROUND(NORMINV(B17, $E$4, $E$5), 0))

 Revenue (in D17):


=$B$5*MIN(C17, $B$9)

 Ordering Cost (in E17):


=$B$4*$B$9

 Refund (in F17):


=$B$6*MAX($B$9 – C17, 0)

15
Key Formulas in the Simulation Model

 Profit (in G17):

=D17 – E17 + F17

 Estimated measures:
B12: =AVERAGE(G17:G1016)
B13: =STDEV(G17:G1016)

16
Spreadsheet Simulation
Modeling With @RISK
Lab Exercise

17
Why Use @RISK
for Spreadsheet Modeling and Simulation
 Due to simulation add-ins such as @RISK, spreadsheet
simulation modeling has recently become extremely
popular.
 There are three primary advantages to using @RISK:

1. It has powerful distribution fitting functions that allow


users to find the best fit probabilities to data.
2. It gives users much easy access to many probability
distributions that are used in simulation models.
3. It performs simulations much more easily and
automatically than is possible with Excel alone.

 @RISK is not the only simulation add-in for Excel.


Crystal Ball, developed by Decisoneering, has much of
18
Common @RISK Probability Distribution Functions

 RiskBinomial(n, p): Number of defective items in a batch size n, where each


item has a probability p of being defective; number of sales made from a given
number of contracts.
 RiskDiscrete({x1,…, xn},{p1,…, pn}): For situations with small number of
outcomes.
 RiskDuniform({x1,…, xn}): For situations with a few possible outcomes, each
with equal probability of occurrence, e.g. which plant will meet its production
quota first; probability of each face in a dice.
 RiskExpon(beta): Time between events; lifetime of device with constant
probability of failure. mean = beta, variance = beta-square.
 RiskLognorm(mean, s.d.): Quantities that are the product of a large number of
other quantities; measurement errors; distribution of physical quantities such
as size of oil fields.
 RiskNormal(mean, s.d.): Distribution of characteristics of a population; size of
quantities that are sum of other quantities (because of central limit theorem).
 RiskPoisson(lambda): Number of individual events that occur in a given unit of
time, such as a number of customers arriving in a queue, number of accidents
on a road, number of imperfections per yard of carpet.
 RiskTriang(min, most likely, max): Rough modeling when actual data is absent.
 RiskUniform(min, max): Quantities that vary uniformly between two values.

19
Using @RISK At Walton Bookstore
In August, Walton must decide how many of next year’s
nature calendars to order.
 Each calendar costs $7.50 and sells for $10.

 After February 1, all unsold calendars will be returned


to the publisher for a refund of $2.50/calendar.

 Walton estimates a triangular probability distribution


for demand:
Minimu Most Maximu
m Likely m
Demand 100 175 300

Walton wants to use this probability distribution, together


with @RISK, to simulate the profit for any particular order
quantity. 20
Simulation Model and Solution

 Plan for model development and solution:


 Choose an input probability distribution for demand

 Build simulation model (write formulas) for a specific


order quantity

 Generate outputs from the model

 Use RISKSIMTABLE function to simultaneously generate


outputs from several order quantities

 Decide a “best” order quantity


21
Spreadsheet Model for Walton’s Bookstore

Data

User Chosen Input Value


Simulated Demand Input
Cell

Model Output Cell


Calculations 22
Developing the Simulation Model

 Input distribution: Enter in cell B13 the formula


“=ROUND(RISKTRIANG(E4,E5,E6),0)”.

 Output cell: Highlight a cell and click on the Add Output


Cell button on the toolbar. The formula in cell F13 changes to
“=RISKOUTPUT(“Profit”)+C13+E13-D13”.

 Inputs and outputs in @RISK’s record list:


 Input cells: cells with @RISK random functions

 Click on the Display Outputs/Inputs button on the


@RISK toolbar to check the Explorer-like list
23
Defining the Input Distribution

To enter a distribution
function using the @RISK
menu
 Select the input cell (A13.)
 Click on the Define
Distribution button to
open a window
displaying the @RISK
distributions.
 Select the Triang
distribution.
 Click Select Distribution
button.
24
Defining the Input Distribution (Continued)
Click on Assign
Excel References
button.

Select E4, E5, and


E6 as the Min,
Most likely, and
Max values.

Click OK when
complete.

Add the ROUND function to generate an integer value of


calendar demand as follows:
“=ROUND(RiskTriang(E4,E5,E6),0)” 25
Model Formulas

Calculation Cell Formula


Revenue B13 =MIN(B9,A13)*B5
Cost C13 =B9*B4
Left Over D13 =MAX(B9-A13,0)
Refund E13 =D13*B6
Profit F13 =B13-C13+E13

26
Defining an Output Cell

 Select cell F13


 Click on the Add
Output Button.

27
Simulation Settings

 The Simulation segment of


the @RISK menu bar shows
that we are set to do 500
iterations in one simulation.
 Clicking on Simulation
Settings button opens the
Simulation Settings dialogue
box.
 With Static Values selected,
the spreadsheet will display
the expected values of the
simulated distributions in the
spreadsheet when the
simulation is not running. 28
Starting the Simulation

 Start the simulation by clicking on the Start


Simulation button.

29
Discussion of the Simulation Results
 The Simulated Detailed Statistics
button will open a window
displaying summary statistics
including percentiles in 5%
increments for both the input and
output distributions. More
detailed information about our
inputs and outputs in the lower
part of the window. Here any
 The leftmost button in the
target value or percentile can be
Results panel is the Browse
entered and @RISK calculates the
Results button. It will generate
corresponding percentile or value.
an interactive histogram for any
@RISK input or output cell in
 The Simulation Data button will
your spreadsheet model. display all of the inputs and
outputs in the simulation model.

30
Output Cell Distribution

The “slider” at the top of the chart can be moved to the


left or right to see various probabilities and their
corresponding values. Open by clicking on Browse
Results button.
31
Simulation Results Reports in Excel

 Clicking on the Excel


Reports button will
open a dialogue box
allowing you to select
simulation reports
that @RISK will
create worksheets in
an Excel workbook.

32
Using RISKSIMTABLE for Decision Making
 In order to use RISKSIMTABLE function, we make two
modifications to the previous model:
 List the representative order quantities in row 9.
 Enter in cell B9 the formula:
RISKSIMTABLE(D9:H9)
 Enter 5 for the number of simulations.
 @RISK will run 5 simulations of 500 iterations each.
 Each simulation uses the same 500 random demands to
evaluate each order quantity.

The spreadsheet is shown on the next slide ready to run.

33
Spreadsheet Model with RISKSIMTABLE

34
@RISK Models
with Several Random Input Variables
 @RISK models can handle several random variables at the
same time, each reflecting some uncertainty, and @RISK
has a very useful feature – sensitivity analysis.
 Additional uncertainty at Walton bookstore:
 The maximum number of calendars Walton’s supplier
can supply follows discrete distribution. The supplier
charges $7.50/calendar.
Demand 100 150 200 250 300
Probability 10% 20% 30% 20% 20%

 The demand for leftover calendars follows normal


distribution with mean of 50 and standard deviation of
15. The sale price is $5 apiece. Any calendars still left
over will be trashed.
35
Spreadsheet for Walton with Several Random Inputs

36
Simulation Model
with Multiple Sources of Uncertainty
 Random inputs:
 Uncertain supply in cell A24:
RISKDISCRETE(D15:D19,E15:E19)
 Uncertain customer demand in cell D24:
ROUND(RISKTRIANG(E4, E5, E6), 0)
 Uncertain customer demand for sale-price calendars in
cell G24:
ROUND(RISKNORMAL(E9,E10), 0)

 Actual supply in cell B24: MIN(B14, A24)

 Total order cost in cell C24:


B4*B24
37
Simulation Model
with Multiple Sources of Uncertainty
 Revenue from regular-price sales in cell E24:
B5*MIN(B24, D24)

 Number of calendars left over after regular-price sales


in cell F24:
MAX(B24-D24, 0)

 Revenue from sale-price sales in cell H24:


B6*MIN(F24, G24)

 Total profit in cell I24 (output cell):


RISKOUTPUT(“Profit”)+E24+H24-C24
38
Tornado Graph for Sensitivity Analysis
 Identifying important input variables is essential for real
applications:
If a random input has a high influence on an important output,
then it might be worth time and money to study this input and
possibly reduce the amount of uncertainty involving it.

 Tornado graph shows graphically and numerically how


each of the random inputs affects the profit:
“Higher” coefficient implies stronger relationship between the
input and profit.

 Numerical understanding of the coefficients:


The coefficient is the number of standard deviations by which
the output increases if the input increases by one standard
deviation (assuming all the other inputs are held constant).
39
Tornado Graph for Walton Simulation

40

You might also like