Presentation is loading. Please wait.

Presentation is loading. Please wait.

Materials for Lecture 13 Chapter 2 pages 6-12, Chapter 6, Chapter 16 Section 3.1 and 4 Lecture 13 Probability of Revenue.xlsx Lecture 13 Flow Chart.xlsx.

Similar presentations


Presentation on theme: "Materials for Lecture 13 Chapter 2 pages 6-12, Chapter 6, Chapter 16 Section 3.1 and 4 Lecture 13 Probability of Revenue.xlsx Lecture 13 Flow Chart.xlsx."— Presentation transcript:

1 Materials for Lecture 13 Chapter 2 pages 6-12, Chapter 6, Chapter 16 Section 3.1 and 4 Lecture 13 Probability of Revenue.xlsx Lecture 13 Flow Chart.xlsx Lecture 13 Farm Simulator.xlsx Lecture 13 Uniform.xlsx Lecture 13 Theta UPES.xlsx Lecture 13 View Distributions.xlsx

2 What is a Simulation Model?
A Model is a mathematical representation of any system of equations When you think through the many steps to solve a problem you are constructing a model When you think or plan your way through a complex situation you are making a virtual model Computer games are models Econometric equations can be part of a model We build models so we do not have to experiment on the actual economic system Will the business be successful if we change management practices, etc.?

3 Outline for the Lecture
Organization of a model in an Excel Workbook Steps for model development Parts in a simulation model Generating random variables from uniform distributions Estimating parameters for other distributions Parameters are the numbers that define the center and the dispersion about the center of the random variable For a Normally distributed random variable, the parameters are the Mean & Std Dev For Empirical ….

4 Organization of Models in Excel
Input Data: Costs, inflation & interest rates Production functions Assets & liabilities Scenarios to analyze, etc. Historical Data for Stochastic Variables: 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, financial ratios KOV Table List all output variables of interest Model Outputs: Statistics for KOVs Probability charts Decision summary Final report tables

5 Organization 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 Pro Forma financial tables of results Key Output Variables (KOVs) Table to send to SimData Sheet 2 (Stoch) Historical data for all random variables Calculations to estimate the parameters for random variables Simulate all random values to be mapped to the Model Sheets 3-N (SimData, Stoplite, SERF, STODOM, etc) Simulation results and charts

6 Equations and Calculations to
Model Design Steps KOVs Intermediate Results Tables and Reports Equations and Calculations to Get Values for Reports Stochastic Variables Exogenous and Control Variables Design Build Model development is like building a pyramid Design the model from the top down Build from the bottom up

7 Steps for Model Development
Determine the purpose of the model and KOVs Draw a sketch 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

8 Flow Chart for Simulating NPV

9 Steps for Model Development
Write out the equations by hand This organizes your thoughts and the model’s structure Avoids problem of forgetting important sections Example of equations to simulate receipts at this point: Output/hour = a stochastic variable Hours Operated = management control value (scenario) 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 deterministic; usually policy driven Stochastic variables management can not control and are random in nature: weather or market prices, interest rates Control variables the manager can manipulate and are usually used for sensitivity and/or scenario analyses

10 Steps for Model Development
Stochastic variables (most time is spent here) Identify key random variables that affect the system Estimate parameters for the assumed distributions Normality – means and standard deviations Empirical – sorted deviates and probabilities Other distributions should be tested Use the best possible econometric model to forecast deterministic part of stochastic variables – reduce risk Model validation starts here Use 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 Key to validating model are statistical tests

11 Stochastic Variables? What are Stochastic Variables?
Random variables we can not control, such as: Prices, yields, interest rates, rates of inflation, sickness, etc. Represented by the residuals from regression equations as this is the part of a variable we did not predict Why include stochastic variables? To get a more robust simulation answer Draw random values from a PDF rather than a single or deterministic value The result is that we can assign probabilities to KOVs We can incorporate risk in our decisions of selecting between scenarios

12 Simple Economic Model Supply and Demand Model
You learned there is one Demand and one Supply But there are many, due to the risk on the equations Qx = a + b1Px +b2Y + b3Py gives a single line for Demand Qx = a + b1Px +b2Y + b3Py + ẽ gives infinite Demands After harvest Supply is a constant, so we get an infinite number of Prices as we draw ẽ values at random Price/U Supply Demand is stochastic so we can have an infinite number of Demand functions passing through the QD distribution Demand Quantity/UT

13 The Basic Business Model
Profit is generally our Key Output Variable of interest 𝜋 = Total Receipts – Variable Cost – Fixed Cost 𝜋 = ∑(Pi * Ỹi ) - ∑(VCi * Ỹi * Qi ) – FC Where Pi is the stochastic price for product i, as $/bu. Ỹi is stochastic production level as yield or bu./acre VCi is variable cost per unit of production for i, or $/bu. Qi is the level of resources committed to i, as acres ~ ~

14 Univariate Random Variables
More than 50 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 See Chapter 16 in Sections 3.1 and 4

15 Uniform Distribution A continuous distribution where each range has an equal probability of being observed 20% chance of seeing a value between 0 and 0.2 or between 0.8 and 1.0 Parameters for the uniform are minimum and maximum values and the domain includes all real number’s =UNIFORM(minimum, maximum) The mean and variance of this distribution are:

16 PDF and CDF for a Uniform Dist.
Probability Density Function Cumulative Distribution Function f(x) F(x) 1.0 0.0 min max min max X X

17 When 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 An example of how USD is used to simulate a Standard Normal Distribution Uniform Deviate Std. Normal Dev. - + 3 0.5 1.0 0.8 0.6 0.4 0.2 SNDi USDi Inverse Transform for Generating a SND from a USD

18 Uniform Standard Deviate (USD)
In Simetar we simulate the USD as: =UNIFORM(0,1) or =UNIFORM() Produces a Uniform Standard Deviate (USD) 0 to 1 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

19 Simulate a Uniform Distribution
Alternative ways to program the Uniform( ) distribution function = Uniform(Min, Max,[USD]) = Uniform(10,20) Not recommended method = Uniform(A1,A2) This is the preferred method = Uniform(A1,A2,A3) where a USD is calculated in cell A3

20 Uses for a Uniform Standard Deviate
USD can be used in all random number formulas in Simetar to facilitate correlating random variables For example in Simetar we can add USDs: =NORM(mean, std dev, [USD1]) =TRIANGLE(min, middle, max, [USD2]) = EMP( Si, F(Si), [USD3]) =EMP(values , , [USD4]) NOTE: every variable has its own unique USD Note the [ ] means that USD is optional

21 Generating Random Numbers
Generate a Uniform Standard Deviate (USD) =UNIFORM(0,1) Simetar defaults to simulate 500 values (can be changed to 1,000s) These are called iterations or draws Iterations are separate, uncorrelated draws of random variables Equal chance of observing a number in each of the intervals; both charts are for the same output

22 USD Output in SimData Simetar saves the 500 samples in SimData and calculates summary statistics

23 Inverse Transform Use the 500 USDs to simulate random variables for your Ŷ variable This involves translating the USDs from a 0 to 1 scale to the scale for your random variable This is done using the Inverse Transform method shown on the next slide. NOTE: you must have a separate USD for every random variable Y

24 Inverse Transform The 500 USDs converted from the 0 to 1 scale on the Y axis by direct interpolation Each random USD is associated with a unique “random” Y value to get 500 Ỹs

25 Inverse Transform Results of 500 iterations for Y using Inverse Transform USDs and their resulting Ỹs

26 Simulate the Normal Distribution
Parameters for a Normal Distribution Mean or Ŷ from OLS Std Dev or σ of residuals Simulated using the formula for a Normal Ỹ = Ŷ + σ * SND Where the SND is a “standard normal deviate” We generate 500 SNDs and thus simulate (calculate) 500 random Y’s

27 Simulate the Standard Normal Deviate (SND)
SND is a random value between ±∞ SND has a mean of zero SND has a standard deviation of one SND is simulated by =NORM(0,1) SNDs are the “number of standard deviations from the mean” or the number of σ’s Ỹ is from the Ŷ or Ῡ Uniform Deviate Std. Normal Dev. - + 3 0.5 1.0 0.8 0.6 0.4 0.2 SNDi USDi Inverse Transform for Generating a SND from a USD

28 Simulate Normal Distribution
Next apply the random SNDs to the Normal distribution formula Ỹ = Ŷ + σ * SND In Simetar all of these steps are done for you: = NORM(Ŷ, σ) or = NORM(Ŷ, σ, USD) Remember where to get Ŷ and σ ? In forecasting we estimated Ŷ = a + bX1 +bX2 σ = Standard Deviation of residuals

29 Normal Distribution: Simetar Code and Output
The USD is used to calculate the SND The SND is used to simulate Ỹ Simetar gives same result in one step

30 Steps for Simulating Random Variables
Must assume a probability distribution (shape) Normal, Beta, Empirical, etc. Estimate parameters required to define and simulate 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 fits the data

31 Steps for Parameter Estimation
Step 1: Check for the 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 (X’s) Step 2: Estimate parameters for several assumed distributions using the X’s 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

32 Parameter Estimator in Simetar
Use Theta Icon in Simetar Estimate parameters for 16 parametric distributions Select MLE method of parameter estimation Provides equations for simulating distributions

33 Parameter Estimator in Simetar
Results for Theta Estimate parameters for 16 distributions Selected MLE in this example Provides equations for simulating distributions based on a common USD

34 Which is the Best Distribution?
Use Simetar function =CDFDEV(History, SimData) Perfect fit has a CDFDEV value of Zero Pick the distribution with the lowest CDFDEV

35 Use the “View Distributions.xlsx”
For a random variable with 10 observations can estimate the parameters and view the shape of the distribution


Download ppt "Materials for Lecture 13 Chapter 2 pages 6-12, Chapter 6, Chapter 16 Section 3.1 and 4 Lecture 13 Probability of Revenue.xlsx Lecture 13 Flow Chart.xlsx."

Similar presentations


Ads by Google