You are on page 1of 25

Lecture 8 – Introduction to

Simulation Models
Decision Models and Optimization
Sumit Kunnumkal
Indian School of Business

1
© Kunnumkal
Please do not share or
distribute
Outline
 Random variables
 Distributions and properties
 Central limit theorem

 Simulation modeling
 Building simulation models in @Risk
 Breaking even at CoolCo

2
Random variables
 Commonly used random variables
 Binomial
 Uniform
 Normal, …

 Properties of these random variables

 Applications: when do we use them?

3
Binomial Distribution: Properties
 Let X be a r.v which counts the number of
successes in the n trials, where the probability of
success in a given trial is p. X is Binomial(n,p)
 The experiment consists of a fixed number of trials ‘n’
 Each trial has only two outcomes- “success” or “failure”
 The probability of success is ‘p’ and that of failure is ‘1-
p’. This is the same for each trial.
 The trials are independent of each other

4
Binomial Distribution
 A binomial random variable counts the number of
“successes” in a fixed number of trials
 Number of heads in 10 coin tosses
 Number of customers in your database that visit your
store on a particular day
 Number of students in a class that have a work
experience of more than four years…

5
QC: Binomial Distribution (1min)
 Suppose that 45% of the students at the ISB are
not engineers. We randomly select three
students to participate in the DMOP curriculum
assessment team. Let X = number of non-
engineers on the team

 What is the distribution of X?


 (a) BINOMIAL(3, 0.55)
 (b) BINOMIAL(1, 0.55)
 (c) BINOMIAL(3, 0.45)
 (d) BINOMIAL(1, 0.55) 6
Binomial Distribution: Shape

7
Binomial Distribution: Excel
 The Excel function BINOM.DIST(.) gives the
probabilities P(X=x)
 P(X=x) = BINOM.DIST(no. of successes (x), no. of
trials (n), probability of success (p), 0/1)
 0 if we want P(X=x), 1 if we want P(X ≤ x)

8
The Uniform Distribution
 A random variable X is uniformly distributed on the interval [a,b] if it is
equally likely to take any value in the range from a to b

 What is the shape of the density function of a uniform distribution?

 Intuitively, the lower end point of the interval, a, can be interpreted as


the worst-case scenario and the upper end point of the interval, b, can
be interpreted as the best-case scenario.

 Typically used when we have very little information about the


underlying uncertainty (i.e., when there is limited data and we rely on
expert opinion/judgment to identify the best and worst-case scenarios)
The Normal (Gaussian)
Distribution or 'Bell Curve'
 An important distribution in statistics and probability

 A Normal distribution is characterized by its mean (μ) and standard


deviation (σ)

 Density function:
The Normal Distribution
 Many phenomenon obey Normal distribution
 GMAT scores
 Height of a group of people
 Stock returns over a short period of time
 This is not true for longer periods of time

 Width of a steel plate from a production process

 Binomial random variables when is 'large' and is not too close to


or
 'rule of thumb': and

 The Excel function NORM.DIST(.) gives the probabilities P(X=x)


 P(X=x) = NORM.DIST(value (x), mean (μ) , std. dev (σ), 0/1)
 0 if we want P(X=x), 1 if we want P(X ≤ x)
The Central Limit Theorem
 The central limit theorem (CLT) is a statement about the
behavior of an aggregation of random variables.

 Suppose that X1 , X2 , …, Xn random variables. Then


under some conditions (independence, identical
distributions, sufficient number of random variables, …),
the sum of these random variables X1 + X2 + …. + Xn is
approximately normally distributed.

 The normal distribution is centered around nµ where µ is


the expected value of Xi and its variance is given by nσ2
where σ2 is the variance of Xi
Example
Roll a die once. Let X1 denote the outcome of the die roll.
What is the distribution of X1 (shape)? What is the expected
value of X1?

Roll die once


Example
Roll a die 10. times. Let Xi denote the outcome of the die roll on
the ith roll and Sn denote the sum of the outcomes over n such
tries.

What is the shape of Sn? What is its expected value?


n=10: Roll die ten times and take the sum of the outcomes
The Central Limit Theorem
 The sample mean can be
viewed as an aggregation of random variables

 CLT therefore implies that the sample mean is


approximately normally distributed
Simulation Models
Simulation creates a virtual mirror of reality.

Simulation creates models with elements which correspond directly to


elements in the real world.

Creates a model which "looks like", or replicates, reality.

E.g. Suppose we are building a new factory, and want to explore


how a machine shop area will function.

Suppose we'd like to add a new customer service counter and


would like to understand its impact on the customer waiting
times.

Describe an existing system, Understand the impact of making changes,


Design an improved system
Simulation Models
Physical simulation versus Computer simulation
E.g. Modeling a new aircraft wing:
– A balsa wood scale model can be tested in a wind tunnel to verify and test actual
performance
versus
E.g. Personalized simulations of blood flow in the body
 Software that simulates blood flow throughout the human
body in a model based on medical images. Software requires a supercomputer
to crunch calculations on the fluid dynamics of millions of blood cells as they
move through the blood vessels
[TR Sept 2017]

E.g. GE is currently piloting a digital wind farm which it uses to inform the
configuration of each wind turbine prior to procurement and construction
[The Economist, 2015]

E.g. ORION ride, a simulation program used by UPS to test the


effectiveness of route optimization software [Interfaces, 2017]
Simulation Advantages
Advantages of simulation models are:
– Models are simple and easy to follow. One-to-one
correspondence of model elements to real world: model
is believable

– Flexible and adaptable. Can model complicated


dynamic processes

– Time compression: can model years in a few hours

– Results are descriptive: statistics on process reveal


randomness and possibility of extreme fluctuations
Simulation Disadvantages
Disadvantages of simulation models are:
– Ease of adding detail means over-complexity

– Little analytic insight, since models are "one-off"


(although good for testing insight)

– Sensitivity analysis is more difficult: more of brute force


approach
Simulation
Setting
 Output/Payoff Y = f(X), which is a function of the input X
 Winning bid in an auction = max. of bids of participants

 Revenues = Price*Demand

 Project completion time = max. of completion times of tasks

 We know the shape of the input X. We also know the relation between
the input and the output
 Interested in shape of Y (its distribution) and other metrics (expected
value, variance, …)
 Difficult to compute these quantities analytically because the relation
between Y and X is non-linear
 Simulation is a useful tool to get a rough estimate of these quantities
Steps in Simulation Modeling
Formulate the model:
 Understand the input variables and their nature,
 Parameter estimation/Distributions of the input random variables: a
typical hurdle, data is never completely adequate or reliable – often
use a reasonable theoretical distribution complemented with data

 Understand the output variables – what are the metrics of interest?


 Understand the relationships between the output and the input random
variables
 Remember the Pareto Principle: the extent to which a problem is
understood is inversely proportional to the number of variables required to
describe it!
 Tendency is for too much detail!
Steps in Simulation Modeling
(continued…)
Simulation Approach
 Input random variable (X): Generate a scenario – pick a
realization of the input random variable

 Output random variable (Y): Use the relation between the


input and the output to calculate the value of the output for
the given scenario

 Iterate: Repeat process, generate multiple scenarios

 Interpret: Obtain summary statistics and interpret the


results
Breaking even at CoolCo
 CoolCo sells its air conditioners at $1,000 per unit. The
variable cost of producing an AC is estimated at $500 per
unit. This includes cost of material, direct labor and other
costs associated with the production of each unit. The
company incurs $3 million a year in terms of indirect fixed
overhead charges and administrative salaries that are
independent of production volume. The sales
representative expects that 8,000 units will be sold on
average and based on past experience, she thinks that the
annual sales is bell-shaped with roughly a 95% probability
that the annual sales will be between 5,000 and 11,000
units.
 What is the expected profit and the variance of profit at CoolCo?
 What is the probability that the company will not break-even?
 What is the probability that CoolCo’s profits will exceed $1 million?
23
Breaking even at CoolCo
 Problem formulation
 Data
 Unit price = $1000
 Unit cost = $500
 Fixed cost = $3,000,000

 Random variables
 What is the input random variable? What is its shape
(distribution)?
 What is the output random variable? How is the input related to
the output?

 How do we translate the business questions into


statements about the random variables? 24
Breaking even at CoolCo
 The CoolCo example is simple enough that we can work
out the solution analytically using our knowledge of
probability theory and the properties of random variables.

 Analytic solution
 X (Sales) is N(8000,15002)
 Y (Profits) = 500X – 3,000,000
 E(Y) =
 V(Y) =
 What is the shape of Y?
 Therefore P(Y<= 0) = 9.1%, P(Y ¸ 1M) =
25

You might also like