Intro to Simulation (using Excel)



Similar documents
Lab 11. Simulations. The Concept

Probability, statistics and football Franka Miriam Bru ckler Paris, 2015.

Stat 20: Intro to Probability and Statistics

Ch. 13.2: Mathematical Expectation

The New Mexico Lottery

Introduction to the Rebate on Loss Analyzer Contact:

MATH 140 Lab 4: Probability and the Standard Normal Distribution

Easy Casino Profits. Congratulations!!

Risk Analysis Overview

How to use Ez Trade Builder

RADIOTHERAPY COST ESTIMATOR USER GUIDE

The overall size of these chance errors is measured by their RMS HALF THE NUMBER OF TOSSES NUMBER OF HEADS MINUS NUMBER OF TOSSES

Introduction to Simulation

Advanced Excel Charts : Tables : Pivots : Macros

Collaborative Supply Chain Management Learning Using Web-Hosted Spreadsheet Models ABSTRACT

Call Centre Helper - Forecasting Excel Template

How to Make the Most of Excel Spreadsheets

In the situations that we will encounter, we may generally calculate the probability of an event

The Stationary Beer Game

tutor2u tutor2u Interactive Business Simulations Finance: Cash Flow Management

In-Depth Guide Advanced Spreadsheet Techniques

Understanding Confidence Intervals and Hypothesis Testing Using Excel Data Table Simulation

Recall this chart that showed how most of our course would be organized:

Chapter 12 Simulation 537

Probability and Expected Value

Ch5: Discrete Probability Distributions Section 5-1: Probability Distribution

Simple Inventory Management

Money Unit $$$$$$$$$$$$$$$$$$$$$$$$ First Grade

Problem of the Month: Fair Games

Chapter 9 Monté Carlo Simulation

6 3 The Standard Normal Distribution

2. How many ways can the letters in PHOENIX be rearranged? 7! = 5,040 ways.

Optimization: Optimal Pricing with Elasticity

In This Issue: Excel Sorting with Text and Numbers

Preparing cash budgets

Example of the Glicko-2 system

Betting with the Kelly Criterion

NEXT-ANALYTICS lets you specify more than one profile View in a single query.

3. What is the difference between variance and standard deviation? 5. If I add 2 to all my observations, how variance and mean will vary?

Find an expected value involving two events. Find an expected value involving multiple events. Use expected value to make investment decisions.

Standard Deviation Estimator

REPEATED TRIALS. The probability of winning those k chosen times and losing the other times is then p k q n k.

TEACHER S GUIDE TO RUSH HOUR

Lesson 4.3: Using the VLOOKUP Function

Gaming the Law of Large Numbers

TIBCO Spotfire Guided Analytics. Transferring Best Practice Analytics from Experts to Everyone

Linear Programming Notes VII Sensitivity Analysis

Your Guide To Crowdfunding With Superior Ideas

Economics. Worksheet Circular Flow Simulation

Pigeonhole Principle Solutions

ICAEW IT FACULTY TWENTY PRINCIPLES FOR GOOD SPREADSHEET PRACTICE

Math Games For Skills and Concepts

5 IN THIS CHAPTER. Working Capital and Cash Flow Analysis

Chapter 3 RANDOM VARIATE GENERATION

Excel macros made easy

Hooray for the Hundreds Chart!!

MBA350 INTEGRATIVE CAPSTONE COURSE

Variable Cost increases in direct proportion to Volume Fixed Costs do not change as Volume changes (in a relevant range).

6.042/18.062J Mathematics for Computer Science. Expected Value I

Building and Using Spreadsheet Decision Models

Tommy B. Harrington 104 Azalea Drive Greenville, NC

Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver

The rest of this document describes how to facilitate a Danske Bank Kanban game.

A Statistical Analysis of Popular Lottery Winning Strategies

Monte Carlo Simulation. SMG ITS Advanced Excel Workshop

THE WISDOM OF 14 ACCOUNTING TEXTBOOKS.

Played With Five Standard Six-Sided Dice. by Paul Hoemke

(Refer Slide Time: 2:03)

A target cost is arrived at by identifying the market price of a product and then subtracting a desired profit margin from it.

Mail Merge Creating Mailing Labels 3/23/2011

The Battle for the Right Features or: How to Improve Product Release Decisions? 1

EN AVANT! EN MASSE! Game Control Rules August 2008

One pile, two pile, three piles

Simple Investment Strategy During a Global Crisis

Probabilistic Strategies: Solutions

ECON 459 Game Theory. Lecture Notes Auctions. Luca Anderlini Spring 2015

AP Stats - Probability Review

Creating Excel Link reports with efficient design

Simulation and Lean Six Sigma

Mathematical goals. Starting points. Materials required. Time needed

WEEK #23: Statistics for Spread; Binomial Distribution

Simulation and Risk Analysis

CHAPTER 14 Understanding an App s Architecture

6.3 Conditional Probability and Independence

There are a number of superb online resources as well that provide excellent blackjack information as well. We recommend the following web sites:

Calc Guide Chapter 9 Data Analysis

Microsoft Dynamics NAV

CALCULATIONS & STATISTICS

Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

$ ( $1) = 40

Markov Chains for the RISK Board Game Revisited. Introduction. The Markov Chain. Jason A. Osborne North Carolina State University Raleigh, NC 27695

10. Comparing Means Using Repeated Measures ANOVA

Worldwide Casino Consulting Inc.

CASH FLOW STATEMENT & BALANCE SHEET GUIDE

Here is a Trial Balance sample, generated and exported into an Excel spreadsheet, by an accounting software*

A Sales Strategy to Increase Function Bookings

Working with whole numbers

Financial Planning with Your Retirement Portfolio

Transcription:

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 1

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? 2

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 3

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 4

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 5

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 6

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 7

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 8

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 Model inputs The model Data Table (2 way) Summary statistics 9

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 http://www.mathsisfun.com/data/standard-normal-distribution-table.html and click on Z onwards button 10