Intro to Simulation (using Excel) DSC340 Mike Pangburn.

Slides:



Advertisements
Similar presentations
Tips for solving bundling problems
Advertisements

Mean, Proportion, CLT Bootstrap
Introduction to Risk Analysis Using Excel. Learning Objective.
Copyright © Cengage Learning. All rights reserved. 7 Probability.
Monte Carlo Simulation A technique that helps modelers examine the consequences of continuous risk Most risks in real world generate hundreds of possible.
Time Value of Money Lecture 9 This lecture is part of Chapter 4: Investing in the Company.
Probability Distributions CSLU 2850.Lo1 Spring 2008 Cameron McInally Fordham University May contain work from the Creative Commons.
Tutorial 10: Performing What-If Analyses
Simulation Operations -- Prof. Juran.
Session 7a. Decision Models -- Prof. Juran2 Overview Monte Carlo Simulation –Basic concepts and history Excel Tricks –RAND(), IF, Boolean Crystal Ball.
Outline/Coverage Terms for reference Introduction
Spreadsheet Demonstration New Car Simulation. 2 New car simulation Basic problem  To simulate the profitability of a new model car over a several-year.
Probability Distributions and Stochastic Budgeting AEC 851 – Agribusiness Operations Management Spring, 2006.
Engineering Economic Analysis Canadian Edition
Spreadsheet Simulation
Spreadsheet Demonstration
1 SIMULATION – PART I Introduction to Simulation and Its Application to Yield Management For this portion of the session, the learning objectives are:
Simulation.
Example 11.1 Simulation with Built-In Excel Tools.
1 Psych 5500/6500 The t Test for a Single Group Mean (Part 5): Outliers Fall, 2008.
Monté Carlo Simulation MGS 3100 – Chapter 9. Simulation Defined A computer-based model used to run experiments on a real system.  Typically done on a.
Simulation.
Chapter 9: Simulation Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Example 12.6 A Financial Planning Model | 12.2 | 12.3 | 12.4 | 12.5 | 12.7 |12.8 | 12.9 | | | | | | |
ACOT Intro/Copyright Succeeding in Business with Microsoft Excel 2010: Chapter1.
Example 16.1 Ordering calendars at Walton Bookstore
Simulation II IE 2030 Lecture 18. Outline: Simulation II Advanced simulation demo Review of concepts from Simulation I How to perform a simulation –concepts:
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
Spreadsheet-Based Decision Support Systems Chapter 22:
Sample size vs. Error A tutorial By Bill Thomas, Colby-Sawyer College.
Chapter © 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or.
Unultiplying Whole Numbers © Math As A Second Language All Rights Reserved next #5 Taking the Fear out of Math 81 ÷ 9 Division.
Making decisions about distributions: Introduction to the Null Hypothesis 47:269: Research Methods I Dr. Leonard April 14, 2010.
Chapter 14 Simulation. What Is Simulation? Simulation is to mimic a process by using computers.
The AIE Monte Carlo Tool The AIE Monte Carlo tool is an Excel spreadsheet and a set of supporting macros. It is the main tool used in AIE analysis of a.
1 OM2, Supplementary Ch. D Simulation ©2010 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible.
Chapter © 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or.
1 Performing Spreadsheet What-If Analysis Applications of Spreadsheets.
GEM A Finance Survival Kit GEM2508 Frederick H. Willeboordse
Expected values and variances. Formula For a discrete random variable X and pmf p(X): Expected value: Variance: Alternate formula for variance:  Var(x)=E(X^2)-[E(X)]^2.
ESD.70J Engineering Economy Module - Session 41 ESD.70J Engineering Economy Fall 2010 Session Four Xin Zhang – Prof. Richard de Neufville.
Randomness Has structure in the long run Randomness seems “Fair” 1) Nobody can predict the outcome ahead of time. 2) Some underlying set of outcomes are.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 10, Slide 1 Chapter 10 Understanding Randomness.
Understanding Randomness Chapter 11. Why Be Random? What is it about chance outcomes being random that makes random selection seem fair? Two things: –
1.3 Simulations and Experimental Probability (Textbook Section 4.1)
Crystal Ball: Risk Analysis  Risk analysis uses analytical decision models or Monte Carlo simulation models based on the probability distributions to.
Understanding Randomness
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Loops Wrap Up 10/21/13. Topics *Sentinel Loops *Nested Loops *Random Numbers.
Slide Understanding Randomness.  What is it about chance outcomes being random that makes random selection seem fair? Two things:  Nobody can.
Simulation is the process of studying the behavior of a real system by using a model that replicates the system under different scenarios. A simulation.
Risk Analysis Simulate a scenario of possible input values that could occur and observe key impacts Pick many input scenarios according to their likelihood.
6-2: STANDARD NORMAL AND UNIFORM DISTRIBUTIONS. IMPORTANT CHANGE Last chapter, we dealt with discrete probability distributions. This chapter we will.
Computer Simulation. The Essence of Computer Simulation A stochastic system is a system that evolves over time according to one or more probability distributions.
Sensitivity Analysis A systematic way of asking “what-if” scenario questions in order to understand what outcomes could possibly occur that would effect.
1 Module One: Measurements and Uncertainties No measurement can perfectly determine the value of the quantity being measured. The uncertainty of a measurement.
1 BA 555 Practical Business Analysis Linear Programming (LP) Sensitivity Analysis Simulation Agenda.
Risk Analysis Simulate a scenario of possible input values that could occur and observe key financial impacts Pick many different input scenarios according.
Simulation Chapter 16 of Quantitative Methods for Business, by Anderson, Sweeney and Williams Read sections 16.1, 16.2, 16.3, 16.4, and Appendix 16.1.
Independence and Dependence 1 Krishna.V.Palem Kenneth and Audrey Kennedy Professor of Computing Department of Computer Science, Rice University.
Copyright © 2010 Pearson Education, Inc. Chapter 16 Random Variables.
Introduction Imagine the process for testing a new design for a propulsion system on the International Space Station. The project engineers wouldn’t perform.
Copyright © 2009 Pearson Education, Inc. Chapter 11 Understanding Randomness.
© 2008 Pearson Addison-Wesley. All rights reserved Probability Level 8 The key idea of probability at Level 8 is investigating chance situations.
1 Copyright © 2014, 2012, 2009 Pearson Education, Inc. Chapter 9 Understanding Randomness.
What if analysis By: Fatimah Alotaibi.
Computer Simulation Henry C. Co Technology and Operations Management,
Monte Carlo Simulation
Sampling Distributions
Hypothesis Testing and Confidence Intervals
Presentation transcript:

Intro to Simulation (using Excel) DSC340 Mike Pangburn

Generating random numbers in Excel  Excel has a RAND() function for generating “random” numbers  The numbers are really coming from a formula and hence are often called pseudo-random  =RAND() generates a number between 0 and 1, where are values are equally likely (the so-called Uniform distribution)  =RANDBETWEEN(low, high) generates a pseudo-random # between low and high, where all #’s are equally likely

Generating random numbers in Excel  We can use RAND() to generate #’s from other distributions  To generate values from the Normal distribution  =NORMINV(RAND(), mean, standard_deviation)  E.g., =NORMINV(rand(), 10,5)  …will generate a random number from a Normal distribution with mean 10 and std. dev. 5.

Generating random numbers in Excel “Why bother generating random numbers?”

Creating a Simulation  What is a simulation?  Investigating a real-life phenomenon, process, or problem using a model.  The Excel features we have discussed can be blended together to create a simulation  The flexibility of Excel allows us to create many types of simulation models  Why use a model?

Value from simulation modeling 1.In business (and life), “do overs” are not always possible  Simulations let you experiment with different decisions and see their outcomes 2.Humans have a poor ability to assess odds in some situations  You can use repeated simulation “trials” to assess odds of various outcomes  Companies typically use simulations to assess the likelihood of outcomes that may follow from different actions

Creating a Simulation  Because you can simulate so many different kinds of situations, there is no one “recipe” to follow  Makes it challenging, and creative (even fun?!)  Simulations typically require bringing together lots of Excel skills!  If you can do Excel simulations, then you are good at Excel

Simulation modeling in Excel  First get your model of the problem (finance/profit/cost/capacity/whatever) correct, before making certain inputs random  Visually separate your model on the Worksheet  Then make the necessary inputs random  Refresh the Worksheet many times to see the random values change and check whether your model’s calculations seem to behave properly  Then add a Data Table to automate many, many trials of your model, collecting the output(s) you want  Then add some summarizing statistics (e.g., average) based on the results you obtained in your Data Table

General tips on modeling in Excel  Organize – keep your worksheet neat  Be clear on how to do any given calculation on paper first  Then identify the corresponding Excel function, using Google search if you don’t know the name of the Excel function  Don’t embed data values within formulas  Put data values in visible cells and reference that data  Don’t put too much logic in one cell  If it starts to get complicated, split the logic across more cells  Remember to use the power of the Data Table  …for trying different parameter values  …for replicating multiple trials of random #’s

1 st Simulation example: dice game  We play a game against 2 opponents  3 players (we are player 1)  Each player rolls a die  To win, a player needs to roll a # bigger than the other two dice values  If it’s a tie, then the game is called a tie  You want to simulate a play of the game and report whether you win, lose, or tie

2 nd sim. example: inventory management  Demand is uncertain, and you want to determine how many of your product to stock  Let’s assume that demand is uniform between 50 and 150 units  Each units costs you $6  Your price is $10  If you end up with unsold units, you will have to “dump” them at $2 salvage value  Simulate one “play” of this game, where you stock a certain quantity and then see how much profit you make (given some random demand realization)

Repeating simulation “trials”  The real power of simulations comes from being able to consider many trials  In Excel, the Data Table concept provides a convenient means for doing so  Previously, we used the Data Table concept repeatedly analyze a spreadsheet model for different parameter values, without randomness

Repeating simulation “trials”  If our spreadsheet model contains a random input, we again can use a Data Table to repeatedly analyze the model  To do this, we define a long column of trials as the left column defining our Data Table  Each trial corresponds to the need to re-run the sheet, creating the new random number(s), and seeing how results change  It’s convenient to give each trial a # (e.g., 1,2,3,… ) but usually you don’t want to use those #’s in any formula you are using  Therefore, the Data Table’s “ column input cell ” should point to an unused cell in your spreadsheet (again, because you don’t want to use the trial-# for anything)

2 nd sim. example revisited  Let’s now use a Data Table with the prior example  The Data Table will automate the process of considering many different scenarios  In this case, the scenarios do not correspond to different interest rates (as in the last class), but rather to different random #’s  Create a Data Table that will address 200 random scenarios  At the end, we can average over those scenarios

3 rd simulation example  As a hotel manager, you are involved in a major renovation of a hotel that will have space for 100 standard hotel rooms. You are wondering whether some of that space should be used for “luxury suite” rooms, each of which would be twice the size of a standard room. For example, you could plan for 20 suites, in which case you would have remaining space for 60 standard rooms (100 – 2*20 = 60). Your overall construction costs won’t be impacted by this decision, because a suite costs about twice as much to build as a normal hotel room.  You predict being able to fetch $99/night and $169/night for standard and luxury rooms, respectively.  Anticipated demand for…  Standard rooms – mean of 50, standard deviation of 10  Luxury suites – mean of 20, standard deviation of 10  Note: you can upgrade a customer from standard  luxury, if the better room is available.  Occupied rooms incur the following nightly cost (for cleaning/upkeep/”utilities”):  Standard rooms – $12.50  Luxury suites – $25  You estimate fixed costs (including amortized building costs and other overhead such as staff salaries) at $6000 per night.

How would you deal with this problem?  Old school approaches  See what other hotels have done, hope that they had a better method than you  Use intuition  Ask colleagues / friends / family  New school approach  Do the above, but also use modeling / data  Sometimes, you won’t have any “intuitive feel” for the right answer, when things get complicated  Even worse, you might think you have the intuition, but it’s wrong  Sometimes you can develop a very accurate model, if the assumptions and inputs are quite clear

Recall: Simulation modeling steps 1.First get your model of the problem (finance/profit/cost/capacity/whatever) correct, before making certain inputs random 2.Then make the necessary inputs random 3.Then add a Data Table to automate many, many trials of your model, collecting the output(s) you want 4.Then add some summarizing statistics (e.g., average) based on the results you obtained in your Data Table

The model Model inputs Data Table (2 way) Summary statistics

What to make random?  Demand assumptions  Standard rooms – mean of 50, standard deviation of 10  =NORMINV(RAND(),50,10)  Luxury suites – mean of 20, standard deviation of 10  =NORMINV(RAND(),20,10)  To remove unwanted non-integer and negative #’s, we will use:  =MAX(0,ROUND(NORMINV(RAND(),50,10),0))  Luxury suites – mean of 20, standard deviation of 10  =MAX(0,ROUND(NORMINV(RAND(),20,10),0))  The impact of ignoring neg. #’s should be small, because neg. #’s are over 5 and 2 std deviations below the mean  See and click on “Z onwards” button