0% found this document useful (0 votes)
11 views

16 Introduction To Simulation

Uploaded by

adityatop07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

16 Introduction To Simulation

Uploaded by

adityatop07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Session 16

• Simulation
• Random variables and risk
• Methods of risk analysis
• Random number generators
Uncertainty and "Uncertainty is the most difficult thing about
decision-making. In the face of uncertainty, some
Decision-Making… people react with paralysis, or they do exhaustive
research to avoid making a decision. The best
decision-making happens when the mental
environment is focused. …That fined-tuned focus
doesn’t leave room for fears and doubts to enter.
Doubts knock at the door of our consciousness, but
you don't have to have them in for tea and crumpets."

-- Timothy Gallwey, author of The Inner Game of


Tennis and The Inner Game of Work.
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:

Y = f(X1, X2, …, Xk)

• Simulation can be used to analyze these types of models.


Random Variables & Risk
• A random variable is any variable whose value cannot
be predicted or set with certainty.
• Many “input cells” in spreadsheet models are
random variables.
• the future cost of raw materials
• future interest rates
• future number of employees in a firm
• expected product demand
• Decisions made based on uncertain information often
involve risk.
• “Risk” implies the potential for loss.
• Using “expected values” for uncertain independent (X) variables may give us the wrong
“expected value” for the dependent (Y) variable…

• In this case, the expected value of Y should be something less than its maximum value.
Y

E(Y) ??

E(X) X

Why Use Simulation to Analyze Risk?


Plugging in expected values for uncertain cells tells us nothing about the variability of the
performance measure we base decisions on…
• Suppose an $1,000 investment is expected to return $10,000 in two years. Would you
invest if...

• the outcomes could range from $9,000 to $11,000?

• the outcomes could range from -$30,000 to $50,000?

• Alternatives with the same expected value may involve different levels of risk.

Why Use Simulation to Analyze Risk?


Methods of Risk Analysis

Best-Case/Worst-Case What-if Analysis Simulation


Analysis
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.
Possible Performance Measure Distributions Within a Range
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.
• Hungry Dawg is a growing restaurant chain with a self-
insured employee health plan.

• Covered employees contribute $125 per month to the


plan, Hungry Dawg pays the rest.

• The number of covered employees changes from month


Hungry to month.

Dawg • The number of covered employees was 18,533 last month


Restaurants and this is expected to increase by 2% per month.

• The average claim per employee was $250 last month and
is expected to increase at a rate of 1% per month.
Implementing the
Model
See file Fig12-2.xlsm
Questions About the Model

• Will the number of covered employees really increase by


exactly 2% each month?

• Will the average health claim per employee really increase


by exactly 1% each month?

• How likely is it that the total company cost will be exactly


$36,125,850 in the coming year?

• What is the probability that the total company cost will


exceed, say, $38,000,000?
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.


Random • A RNG is a mathematical function that randomly generates
Number (returns) a value from a particular probability distribution.
Generators • We can implement RNGs for uncertain cells to allow us to sample
(RNGs)
from the distribution of values expected for different cells.
• The RAND() function returns uniformly distributed random numbers

How RNGs between 0.0 and 0.9999999.

Work • Suppose we want to simulate the act of tossing a fair coin.

• Let 1 represent “heads” and 2 represent “tails”.

• Consider the following RNG: =IF(RAND( )<0.5,1,2)


Simulating the Roll of a Die
Simulating
the Roll of
a Die

If 6*RAND( ) falls INT(6*RAND( ))+1


in the interval: returns the value:
0.0 to 0.999 1
1.0 to 1.999 2
2.0 to 2.999 3
3.0 to 3.999 4
4.0 to 4.999 5
5.0 to 5.999 6
Generating Random • DADM uses variety of functions to implement RNGs in
spreadsheets
Numbers With
• DADM functions
DADM Add-in • Used in formulas like any other Excel function
• Require DADM addin to be installed on the machine
displaying the spreadsheet
Some of the RNGs
Provided by
DADM add-in
Some of the RNGs Provided By DADM add-in
Distribution Function and arguments Restrictions on arguments Comments
1 if a success, 0 otherwise, where success has
Bernoulli bernoulli_(p) 0<=p<=1
probability p
Number of successes in n independent trials, where p
Binomial bnomial_(n,p) n>=0, 0<=p<=1
is the probability of success on each trial
Nonnegative integer-valued, often used for the
Poisson poisson_(mean) mean>0
number of events in some amount of time or place

General discrete distribution where values is any list of


# of values must match # of probs,
Discrete discrete_(values,probs) possible values and probs is the corresponding list of
and probs must sum to 1
probabilities

Flat distribution, where any value between min and


Uniform uniform_(min,max) min<=max
max is equally likely
Famous symmetric bell-shaped distribution with given
Normal normal_(mean,stdev) stdev>0
mean and standard deviation
Distribution bounded by min and max, with peak at
Triangular triangular_(min,mostlikely,max) min<=mostlikely<=max
mostlikely value
Pert pert_(min,mostlikely,max) min<=mostlikely<=max A “rounded” version of the triangular distribution
Some of the RNGs Provided By DADM add-in
Distribution Function and arguments Restrictions on arguments Comments
Bounded by min and max, shape determined by
Beta beta_(alpha1,alpha2,min,max) alpha1>0, alpha2>0, min<=max
alpha1 and alpha2
Nonnegative “memoryless” distribution with given
Exponential exponential_(mean) mean>0
mean and mode at 0
Right-skewed nonnegative distribution with
Erlang erlang_(n,beta) n>0, n integer, beta>0 integer shape parameter n and mean equal to
n*beta
Generalization of Erlang distribution where the
Gamma gamma_(alpha,beta) alpha>0, beta>0 shape parameter alpha can be any nonnegative
value. Mean is alpha*beta.

Right-skewed nonnegative distribution with given


Lognormal lognormal_(mean,stdev) mean>0, stdev>0
mean and standard deviation

Right-skewed nonnegative distribution with shape


Weibull weibull_(alpha,beta) alpha>0, beta>0 parameter alpha and scale parameter beta. Mean
is a complex function of alpha and beta.
Discrete vs. Continuous
Random Variables
• A discrete random variable may assume one of a fixed set of
(usually integer) values.

• Example: The number of defective tires on a new car can be


0, 1, 2, 3, or 4.

• 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.

You might also like