Title: Materials for Lecture
1Materials for Lecture
- Chapter 2 pages 6-12, Chapter 6, Chapter 16
Section 3.1 and 4 - Lecture 8 Probability of Revenue.xls
- Lecture 8 Flow Chart.xls
- Lecture 8 Farm Simulator.xls
- Lecture 8 Uniform.xls
- Lecture 8 Theta UPES.xls
- Lecture 8 View Distributions.xls
2Developing Simulation Models
- Organization of a model in an Excel Workbook
- Steps for model development
- Parts for a simulation model
- Generating random variables from uniform
distribution - Estimating parameters for other distributions
3Organization of Models in Excel
Input Data, such as Costs, inflation interest
rates, Production functions Assets
liabilities Scenarios to analyze, etc.
Historical Data for Random Variables, such as
Prices Production levels Other variables not
controlled by management
Equations to calculate variables Production,
Receipts, Costs, Amortize Loans, Update asset
values, etc. Tables to report financial results
Income statement, cash flow, balance sheet KOV
Table List all output variables of interest
4Organization of Models in Excel
- Sheet 1 (Model)
- Assumptions and all Input Data
- Control variables for managing the system
- Logical flow of all calculations
- Table of intermediate results
- Table of final results the Key Output Variables
(KOVs) - Sheet 2 (Stoch)
- Historical data for random variables
- Calculations to estimate the parameters for
random variables - Simulate all random values
- Sheets 3-N (SimData, Stoplite, CDF)
- Simulation results and charts
5Model Design Steps
- Model development is like building a pyramid
- Design the model from the top down
- Build from the bottom up
6Steps for Model Development
- Determine purpose of the model and KOVs
- Draw a sketch or flowchart of how data will
interact to calculate the KOVs - Determine the variables necessary to calculate
the KOVs - For example to calculate Net Present Value (NPV)
we need - Annual net cash withdrawals which are a function
of net returns - Ending net worth which is a function of assets
and liabilities - This means you need a balance sheet and a cash
flow statement to calculate annual cash reserves - An annual income statement is needed as input
into a cash flow - Annual net returns are calculated from an income
statement
7Flow Chart for Simulating NPV
8Steps for Model Development
- Write out the equations by hand
- This organizes your thoughts and the models
structure - Avoids problem of forgetting important sections
- Example of equations for a model at this point
- Output/hour stochastic variable
- Hours Operated management control value
- Production Output/hour Hours Operated
- Price forecast mean each year with a risk
component - Receipts Price Production
- Define input variables
- Exogenous variables are out of the control of
management and are constant usually policy
driven - Stochastic variables management can not control
and are random in nature weather or market
driven - Control variables the manager can manipulate
9Steps for Model Development
- Stochastic variables (40 of time is spent here)
- Identify all random variables that affect the
system - Estimate parameters for the assumed distributions
- Normality means and standard deviations
- Empirical sorted deviates and probabilities
- Use the best model possible to forecast the
deterministic part of stochastic variables to
reduce risk - Model validation starts here
- Statistical tests of the simulated stochastic
variables to insure that random variables are
simulated correctly - Correlation tests, means tests, variance tests
- CDF and PDF charts to compare history to
simulated values
10Univariate Random Variables
- More than 40 Univariate Distributions in Simetar
- Uniform Distribution
- Normal and Truncated Normal Distribution
- Empirical, Discrete Empirical Distribution
- GRKS Distribution
- Triangle Distribution
- Bernoulli Distribution
- Conditional Distribution
- Excel probability distributions have been made
Simetar compatible, e.g., - Beta, Gamma, Exponential, Log Normal, Weibull
11Uniform Distribution
- A continuous distribution where each range has an
equal probability of being observed - Parameters for the uniform are minimum and
maximum values and the domain includes all real
numbers - UNIFORM(min,max)
- The mean and variance of this distribution are
12PDF and CDF for a Uniform Dist.
Probability Density Function
Cumulative Distribution Function
F(x)
1.0
f(x)
0.0
max
min
min
max
X
X
13When to Use the Uniform Distribution
- Use the uniform distribution when every range of
length n between the minimum and maximum values
has an equal chance of occurrence - Use this distribution when you have no idea what
type of distribution to use - Uniform distribution is used to simulate all
random variables via the Inverse Transform
procedure and USD
Note that USD is used to simulate a Normal
Distribution
14Uniform Standard Deviate (USD)
- In Simetar we simulate the USD as
- UNIFORM(0,1) or UNIFORM()
- Produces a Uniform Standard Deviate (USD)
- Special case of the Uniform distribution
- USD is building block for all random number
generation using the Inverse Transformation
method for simulation. Inverse Transform uses a
USD to simulate a Uniform distribution as - X Min (Max-Min) Uniform(0,1)
- X Min (Max-Min) USD
15Simulate a Uniform Distribution
- Alternative ways to program the Uniform( )
function - Uniform(Min, Max,USD)
- Uniform(10,20)
- Uniform(A1,A2)
- Uniform(A1,A2,A3) where a USD is calculated in
cell A3
16Uses for a Uniform Standard Deviate
- The uniform standard deviate (USD) is used in all
of the random number formulas in Simetar to
facilitate correlating random variables - For example
- NORM(mean, std dev, USD)
- TRIANGLE(min, middle, max, USD)
- EMP( Si, F(Si), USD)
17Simulating Random Variables
- Must assume a probability distribution shape
- Normal, Beta, Empirical, etc.
- Estimate parameters required for the assumed
distribution - Here are the parameters for selected
distributions - Normal ( Mean, Std Deviation )
- Beta ( Alpha, Beta, Min, Max )
- Uniform ( Min, Max )
- Empirical ( Si, F(Si) )
- Often times we assume several distribution forms,
estimate their parameters, simulate them and pick
the one which best fit the data
18Steps for Parameter Estimation
- Step 1 Check for presence of a trend, cycle or
structural pattern - If present remove it work with the residuals
(?t) - If no trend or structural pattern, use actual
data (Xs) - Step 2 Estimate parameters for several assumed
distributions using the Xs or the residuals (?t) - Step 3 Simulate the different distributions
- Step 4 Pick the best match based on
- Mean, Standard Deviation -- use validation
tests - Minimum and Maximum
- Shape of the CDF vs. historical series
- Penalty function CDFDEV() to quantify differences
19Parameter Estimator in Simetar
- Use Theta Icon in Simetar
- Estimate parameters for 16 distributions
- Select MLE or MOM method of parameter estimation
- Provides equations for simulating distributions
20Parameter Estimator in Simetar
- Results for Theta Estimate parameters for 16
distributions - Selected MOM in this example
- Provides equations for simulating distributions
based on a common USD
21Which is the Best Distribution?
- Use Simetar function CDFDEV( history, sim data)
- Perfect fit has a CDFDEV value of Zero
- Pick the distribution with the lowest CDFDEV
22Use the View Distributions.xls
- For a random variable with 10 observations can
estimate the parameters and view the shape of the
distribution