v.
Adding uncertainty –Risk Analysis
• Introduction
• Previous topics usually dealt with mathematical models
and formulas that could be applied to certain types of
problems
• The solution approaches to these problems were, for the
most part, analytical.
• However, not all real-world problems can be solved by
applying a specific type of technique and then performing
the calculations. Some problem situations are too complex
to be represented by the concise techniques presented. In
such cases, simulation is an alternative form of analysis.
09/13/2022 1
Definition:
“Simulation is the process of designing
a model of a real system and conducting
experiments with this model for the
purpose of either understanding the
behavior of the system and/or
evaluating various strategies for the
operation of the system.”
Allows us to:
• Model complex systems in a detailed way
• Describe the behavior of systems
• Construct theories or hypotheses that account for
the observed behavior
• Use the model to predict future behavior, that is,
the effects that will be produced by changes in
the system
• Analyze proposed systems
Simulation is one of the most widely
used techniques in operations research
and management
Brief History Not a very old technique...
• World War II
• “Monte Carlo” simulation: originated with
the work on the atomic bomb. Used to
simulate bombing raids. Given the
security code name “Monte-Carlo”.
• Still widely used today for certain problems
which are not analytically
What can be simulated?
Almost anything can
and
almost everything has...
Advantages to Simulation:
Simulation’s greatest strength is
its ability to answer
“what if” questions...
X simulated y is true if and only if
• X and y are formal systems
• Y is taken to be formal/real system
• X is taken to be approximation to the real
system
• The rules of validity on x are error free, other
wise x will become the real system
09/13/2022 8
Simulation is
• A technique which uses computer
• An approach for reproducing the processes by
which events of chances and change are
created in a computer
• procedure of testing and experimenting on
models to answer what if then so---and so
types of questions
09/13/2022 9
Monte Carlo Simulation
• The principle behind monte carlo simulation
technique is representative of a given system
under analysis by a system described by
some known probability distribution and
then drawing random samples from
probability distribution by means of random
numbers.
09/13/2022 10
The monte carlo simulation
technique steps
• Setting up a probability distribution
• Building a probability distribution for each
random variable
• Generate random numbers. Assign an
appropriate random numbers to represent
value or range (interval (of values for each
random variable
• Conduct the simulation experiment by means
of random sampling
09/13/2022 11
• Repeat step 4 until the required number of
simulation runs has been generated.
• Design and implement a course of action and
maintain control
• Simulations are normally done on the
computer
• Random numbers generated by a mathematical
process instead of a physical process are
pseudorandom numbers
09/13/2022 12
Contd .
• To truly reflect the system being simulated, the
artificially created random numbers must have
the following characteristics:
• The random numbers must be uniformly
distributed. This means that each random
number in the interval of random numbers (i.e.,
0 to 1 or 0 to 100) has an equal chance of being
selected. If this condition is not met, then the
simulation results will be biased by the random
numbers that have a more likely chance of being
selected.
09/13/2022 13
Contd.
• The numerical technique for generating random
numbers should be efficient. This means that
the random numbers should not degenerate
into constant values or recycle too frequently.
• The sequence of random numbers should not
reflect any pattern. For example, the sequence
of numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,
5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, and so
on, although uniform, is not random.
09/13/2022 14
Contd.
• Monte Carlo is a technique for selecting numbers
randomly from a probability distribution.
• The name Monte Carlo is appropriate because the
basic principle behind the process is the same as in the
operation of a gambling casino in Monaco. In Monaco
such devices as roulette wheels, dice, and playing cards
are used. These devices produce numbered results at
random from well-defined populations. For example,
a 7 resulting from thrown dice is a random value from
a population of 11 possible numbers (i.e., 2 through
12). This same process is employed, in principle, in the
Monte Carlo process used in simulation models.
09/13/2022 15
• The Monte Carlo process is analogous to
gambling devices.
• The Use of Random Numbers
• The Monte Carlo process of selecting random
numbers according to a probability
distribution will be demonstrated using the
following example
09/13/2022 16
example
• The manager of Computer-World, a store that sells
computers and related equipment, is attempting to
determine how many laptop PCs the store should order
each week. A primary consideration in this decision is the
average number of laptop computers that the store will
sell each week and the average weekly revenue generated
from the sale of laptop PCs. A laptop sells for $4,300. The
number of laptops demanded each week is a random
variable (which we will define as x) that ranges from 0 to
4. From past sales records, the manager has determined
the frequency of demand for laptop PCs for the past 100
weeks. From this frequency distribution, a probability
distribution of demand can be developed, as shown
09/13/2022 17
Probability distribution of demand for laptop
PCs
• PCs Demanded per Week Frequency of Demand Probability of Demand,
P(x)
0 20 .20
1 40 .40
2 20 .20
• 3 10 .10
• 4 10 .10
• 100 1.00
09/13/2022 18
Contd.
• The purpose of the Monte Carlo process is to
generate the random variable, demand, by
sampling from the probability distribution, P(x).
The demand per week can be randomly
generated according to the probability
distribution by spinning a wheel that is
partitioned into segments corresponding to the
probabilities.
• In the Monte Carlo process, values for a random
variable are generated by sampling from a
probability distribution.
09/13/2022 19
• Because the surface area on the roulette wheel is
partitioned according to the probability of each
weekly demand value, the wheel replicates the
probability distribution for demand if the values
of demand occur in a random manner
• By spinning the wheel, the manager artificially
reconstructs the purchase of PCs during a week.
In this reconstruction, a long period of real time
(i.e., a number of weeks) is represented by a
short period of simulated time (i.e., several spins
of the wheel).
09/13/2022 20
Contd.
• There are 100 numbers from 0 to 99 on the
outer rim of the wheel, and they have been
partitioned according to the probability of each
demand value. For example, 20 numbers from 0
to 19 (i.e., 20% of the total 100 numbers)
correspond to a demand of no (0) PCs. Now we
can determine the value of demand by seeing
which number the wheel stops at as well as by
looking at the segment of the wheel.
09/13/2022 21
Contd.
• When the manager spins this new wheel, the
actual demand for PCs will be determined by a
number. For example, if the number 71 comes up
on a spin, the demand is 2 PCs per week; the
number 30 indicates a demand of 1.
• Because the manager does not know which
number will come up prior to the spin and there
is an equal chance of any of the 100 numbers
occurring, the numbers occur at random; that is,
they are random numbers
09/13/2022 22
• instead of spinning the wheel to get a random
number, we will select a random number from
Table 14.3(pp615), which is referred to as a
random number table. (These random
numbers have been generated by computer so
that they are all equally likely to occur, just as
if we had spun a wheel
09/13/2022 23
Generating DD from random
numbers
• DD, x Range of random numbers,r
• 0 0-19
• 1 20-59, r=39
• 2 60-79
• 3 80-89
• 4 90-99
09/13/2022 24
Contd.
• By repeating this process of selecting random
numbers from Table 14.3 (starting anywhere in
the table and moving in any direction but not
repeating the same sequence) and then
determining weekly demand from the random
number, we can simulate demand for a period
of time. For example, Table 14.4 shows demand
for a period of 15 consecutive weeks
09/13/2022 25
Table 14.4. Randomly generated demand for 15 weeks
• Week r Demand, x Revenue
• 1 39 1 $ 4,300
• 2 73 2 8,600
• 3 72 2 8,600
• 4 75 2 8,600
• 5 37 1 4,300
• 6 02 0 0
• 7 87 3 12,900
• 8 98 4 17,200
• 9 10 0 0
• 10 47 1 4,300
• 11 93 4 17,200
• 12 21 1 4,300
• 13 95 4 17,200
• 14 97 4 17,200
• 15 69 2 8,600
• S=31 $133,300
09/13/2022 26
Contd.
• From Table 14.4(616) the manager can
compute the estimated average weekly
demand and revenue:
• Estimated average dd=31/15=2.07 laptops/wk
• Estimated average
revenue=133,300/15=$8886.67
• The manager can then use this information to
help determine the number of PCs to order
each week.
09/13/2022 27
• Although this example is convenient for illustrating
how simulation works, the average demand could
have more appropriately been calculated analytically
using the formula for expected value. The expected
value or average for weekly demand can be
computed analytically from the probability
distribution, n
E(x):∑p(xi)xi
• i=1
• Where xi=demand value i
• P(xi) = probability of demand
09/13/2022 28
• Therefore,
• E(x)=(.20)(0) + (.40)(1) + (.20)(2) + (.10)(3) +
(.10)(4)
• =1.5 PCs per week
• Simulation results will not equal analytical
results unless enough trials of the simulation
have been conducted to reach steady state.
09/13/2022 29
How many trials should you run?
• This question can be answered by looking at
statistics reported with the results of monte
carlo run by most modeling software. Decide
what is the critical attribute. Then make sure the
distribution of the mean of this attribute is
narrow enough that decisions can be made
unambiguously.
• In a Monte Carlo the computer solves the model
over and over again evaluating a large number
of possible scenarios, each solution being a trial
of the simulation.
09/13/2022 30
Contd.
• As the number of trials become large, the percentage
of times the result approaches the reality.
• Therefore it is better to use a higher number of trials.
• Once a simulation has been repeated enough times
that it reaches an average result that remains constant,
this result is analogous to the steady-state result, a
concept we discussed previously in our presentation of
queuing. For this example, 1.5 PCs is the long-run
average or steady-state result, but we have seen that
the simulation might have to be repeated more than 15
times (i.e., weeks) before this result is reached
09/13/2022 31
Stochastic Dominance
• If under choice A, the probability of achieving
x or better for specific attribute is greater
than under choice b, for any X, then A
stochastically dominates B.
09/13/2022 32
The Value of Information
• There are numerous occasions in model
building where we ask ourselves do we have
enough information or good information or
should we collect more? It is not unusual to be
concerned as much about the choice of
whether to make the decision now or study the
matter further as about the choice of which
alternative to take
• The value of information can be determined
separately for each random variable that exists
in the model.
09/13/2022 33
• The model is used to determine the $
outcome(distribution outcome) for better
information vs current information.
• As a benchmark, it is useful to calculate what it
would be worth to have information that is
perfect.
• The value of perfect information serves as a
benchmark, an upper bound on the amount
we would be willing to pay for information on
that variable.
09/13/2022 34
Contd.
• Often the cost of improving the estimate of a
variable is higher than this maximum.
• There are a variety of sources of imperfect
information
• E.g. purchase forecasts of a variable at
different prices.
• Value of perfect information.- the difference
between how well we could do well with the
information versus how well we could do
without the information.
09/13/2022 35
• Given : uncertain dd for printing directories
• FC=50
• VC=2
• Sp=4
• Historical dd is normally distributed with mean
of 100 and standard deviation of 20.
• Clairvoyant sell informationat $50
09/13/2022 36
• Expected value of perfect information(EVPI)=
• Expected profit (with perfect information)-
Expected profit with current information
• Now suppose we want to do evaluate how well
we can do without any additional information
about dd. The best level of production to use is
100 based on historical information.
• To evaluate expected profit with 100 and run
Monte Carlo simulation for profit (800iterations)
09/13/2022 37
• Then, if we have perfect information, the mean
profit=$147.8, and with current information,
the mean profit Is 115.8
• Then we have EVPI=EPPI-EPCI=147.8-115.8=32
• Since this is less than the $50 price of perfect
information, we would turn down the offer.
• The value of imperfect
information(EVII)=Expected profit with
imperfect information-expected profit with
current information
09/13/2022 38
• E.g. Suppose we could purchase a forecast of
dd for your directory for $10 from a marketing
research firm.
• The error distribution is normal with mean o
and standard deviation 10.The results of
simulation run revels EVII=132.1-115.8=16.3
• The value is higher than the cost of $10, we
would buy the imperfect information.
09/13/2022 39
Areas of Simulation Application
• Simulation is one of the most useful of all
management science techniques
• Queuing
• Inventory Control
• Production and Manufacturing
• Finance
• Marketing
• Public Service Operations: police departments, fire
departments, post offices, hospitals, court systems,
airports, and other public systems have all been
analyzed by using simulation
09/13/2022 40
Environmental and Resource Analysis
• Some of the more recent innovative
applications of simulation have been directed
at problems in the environment. Simulation
models have been developed to ascertain the
impact on the environment of projects such as
nuclear power plants, reservoirs, highways,
and dams. In many cases, these models
include measures to analyze the financial
feasibility of such projects. Other models have
been developed to simulate pollution
conditions
09/13/2022 41