mcgraw-hill/irwin copyright © 2013 by the mcgraw-hill companies, inc. all rights reserved. a...

16
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to A PowerPoint Presentation Package to Accompany Accompany Applied Statistics in Applied Statistics in Business & Economics, Business & Economics, 4 4 th th edition edition David P. Doane and Lori E. David P. Doane and Lori E. Seward Seward Prepared by Lloyd R. Jaisingh Prepared by Lloyd R. Jaisingh

Upload: ella-hurley

Post on 26-Mar-2015

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved.

A PowerPoint Presentation Package to AccompanyA PowerPoint Presentation Package to Accompany

Applied Statistics in Business & Applied Statistics in Business & Economics, Economics, 44thth edition edition

David P. Doane and Lori E. Seward David P. Doane and Lori E. Seward

Prepared by Lloyd R. Jaisingh Prepared by Lloyd R. Jaisingh

Page 2: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-2

SimulationSimulation

Chapter ContentsChapter Contents

18.1 What is Simulation?18.1 What is Simulation?

18.2 Monte Carlo Simulation18.2 Monte Carlo Simulation

18.3 Random Number Generation18.3 Random Number Generation

18.4 Excel Add-Ins18.4 Excel Add-Ins

18.5 Dynamic Simulations18.5 Dynamic Simulations

Ch

apter 18

Page 3: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-3

Chapter Learning Objectives (LO’s)Chapter Learning Objectives (LO’s)

LO18-1: LO18-1: List characteristics of situations where simulation is appropriate.List characteristics of situations where simulation is appropriate.

LO18-2:LO18-2: Distinguish between stochastic and deterministic variables.Distinguish between stochastic and deterministic variables.

LO18-3:LO18-3: Explain how Monte Carlo simulation is used and why it is called static.Explain how Monte Carlo simulation is used and why it is called static.

LO18-4:LO18-4: Explain how to generate random data by using a discrete or continuous CDF.Explain how to generate random data by using a discrete or continuous CDF.

LO18-5:LO18-5: Use Excel to generate random data for several common distributions.Use Excel to generate random data for several common distributions.

LO18-6:LO18-6: Describe functions and features of commercial modeling tools for Excel.Describe functions and features of commercial modeling tools for Excel.

LO18-7:LO18-7: Explain the main reasons for using dynamic simulation and queuing models.Explain the main reasons for using dynamic simulation and queuing models.

Ch

apter 18

SimulationSimulation

Page 4: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-4

18.1 What is Simulation?18.1 What is Simulation?

• A A simulationsimulation is a computer model that attempts to imitate the behavior of a real is a computer model that attempts to imitate the behavior of a real system or activity.system or activity.

• ModelsModels are simplifications that try to include the essentials while omitting are simplifications that try to include the essentials while omitting unimportant details.unimportant details.

• Simulations helps to quantify relationships among variables that are too complex Simulations helps to quantify relationships among variables that are too complex to analyze mathematically.to analyze mathematically.

• If the simulation’s predictions differ from what really happens, refine the model in a If the simulation’s predictions differ from what really happens, refine the model in a systematic way until its predictions are in close enough agreement with reality.systematic way until its predictions are in close enough agreement with reality.

Ch

apter 18

• In general, consider simulation whenIn general, consider simulation when- The system is complex- The system is complex- Uncertainty exists in the variables- Uncertainty exists in the variables- Real experiments are impossible or costly- Real experiments are impossible or costly- The processes are repetitive- The processes are repetitive- Stakeholders can’t agree on policy- Stakeholders can’t agree on policy

LO18-1LO18-1

LO18-1: LO18-1: List characteristics of situations where simulation isList characteristics of situations where simulation is appropriate.appropriate.

Page 5: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-5

• Deterministic Deterministic variables are nonrandom and fixed.variables are nonrandom and fixed.• StochasticStochastic variables are random. The distribution must be hypothesized. variables are random. The distribution must be hypothesized.• There are two broad areas of simulation: There are two broad areas of simulation: dynamicdynamic and and staticstatic..• In In dynamic simulation dynamic simulation models, events occur sequentially over time. Specialized models, events occur sequentially over time. Specialized

software is required.software is required.• In In static simulation static simulation models time is not explicit and the analysis can be done in models time is not explicit and the analysis can be done in

Excel spreadsheets.Excel spreadsheets.

Components of a Simulation ModelComponents of a Simulation Model

Ch

apter 18

18.1 What is Simulation?18.1 What is Simulation?LO18-2LO18-2

LO18-2: LO18-2: Distinguish between stochastic and deterministic variables.Distinguish between stochastic and deterministic variables.

Page 6: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-6

Components of a Simulation ModelComponents of a Simulation Model

Table 18.1

Ch

apter 18

18.1 What is Simulation?18.1 What is Simulation?LO18-2LO18-2

Page 7: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-7

Components of a Simulation ModelComponents of a Simulation Model

Table 18.1

Ch

apter 18

18.1 What is Simulation?18.1 What is Simulation?LO18-2LO18-2

Page 8: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-8

• The The Monte CarloMonte Carlo method is used for static simulation. method is used for static simulation.• The computer creates the values of the stochastic random variables.The computer creates the values of the stochastic random variables.• The distribution and its parameters are specified.The distribution and its parameters are specified.• Samples are repeatedly drawn from each distribution.Samples are repeatedly drawn from each distribution.• Each sample yields one possible outcome for each stochastic variable.Each sample yields one possible outcome for each stochastic variable.• For each For each outputoutput variable, look at percentiles as well as the mean. variable, look at percentiles as well as the mean.• For each For each inputinput variable, look at a histogram to verify that we are sampling from variable, look at a histogram to verify that we are sampling from

the desired distribution.the desired distribution.

Ch

apter 18

18.2 Monte Carlo Simulation18.2 Monte Carlo Simulation

Which Distribution?Which Distribution?

• Any distribution can be used for a stochastic input variable. For example: Any distribution can be used for a stochastic input variable. For example: normal, triangular, uniform, exponential etc.normal, triangular, uniform, exponential etc.

LO18-3LO18-3

LO18-3: LO18-3: Explain how Monte Carlo simulation is used and why it is Explain how Monte Carlo simulation is used and why it is called static.called static.

Page 9: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-9

Creating Random Data in ExcelCreating Random Data in Excel

Ch

apter 18

LO18-5: LO18-5: Use Excel to generate random data for several commonUse Excel to generate random data for several common distributions.distributions.

LO18-5LO18-5 18.3 Random Number Generation18.3 Random Number Generation

Page 10: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-10

Other Ways to Get Random DataOther Ways to Get Random Data

• (Also With EXCEL): Tools > Data Analysis > Random Number Generation(Also With EXCEL): Tools > Data Analysis > Random Number Generation• (With MegaStat): (With MegaStat): MegaStat > Random Numbers • (With MINITAB): (With MINITAB): Calc > Random Data• For general Monte Carlo simulation, it is best to use a specialized package such as @Risk or Crystal Ball that offers many built-in functions to create random data and keep track of your simulation results.

Ch

apter 18

18.3 Random Number Generation18.3 Random Number Generation

Bootstrap MethodBootstrap Method

• The bootstrap methodbootstrap method resample to estimate unknown parameters.• This method can be applied to just about any parameter.• It requires specialized software.• Bootstrap principle: The sample reflects everything we know about the

population.

Page 11: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-11

Bootstrap MethodBootstrap Method

• From a sample of From a sample of nn observations, use Monte Carlo random integers to take observations, use Monte Carlo random integers to take repeated samples of repeated samples of nn items items with replacementwith replacement from the sample. from the sample.

• Calculate the statistic of interest for each sample. Calculate the statistic of interest for each sample. • The average of these statistics is the The average of these statistics is the bootstrap estimatorbootstrap estimator. . • The standard deviation from these estimates is the The standard deviation from these estimates is the bootstrap standard errorbootstrap standard error. . • The distribution of these repeated estimates is the The distribution of these repeated estimates is the bootstrap distributionbootstrap distribution..• The percentiles of the resulting distribution of sample estimator provide the The percentiles of the resulting distribution of sample estimator provide the

bootstrap confidence interval.bootstrap confidence interval.• The accuracy of the bootstrap estimator increases with the number of resample.• The bootstrap method is an excellent choice when data are badly skewed.• There are bootstrap estimators for most common statistics.

Ch

apter 18

18.3 Random Number Generation18.3 Random Number Generation

Page 12: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-12

• Random data can be generated by using Excel, however, Excel does Random data can be generated by using Excel, however, Excel does not keep track of your results.not keep track of your results.

• Excel add-ins offer more features such as calculating probabilities and Excel add-ins offer more features such as calculating probabilities and permitting Monte Carlo simulation.permitting Monte Carlo simulation.

Ch

apter 18

18.4 Excel Add-Ins18.4 Excel Add-Ins

LO18-6: LO18-6: Describe functions and features of commercial modelingDescribe functions and features of commercial modeling tools for Excel.tools for Excel.

Using @Risk Add-InUsing @Risk Add-In

• Intuitive and easy to use, @Risk Intuitive and easy to use, @Risk inputinput functions can be pasted functions can be pasted directly into cells in and Excel spreadsheet.directly into cells in and Excel spreadsheet.

• The input cell becomes The input cell becomes activeactive and will change each time you and will change each time you update the spreadsheet by pressing update the spreadsheet by pressing F9F9..

LO18-6LO18-6

Page 13: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-13

Ch

apter 18

18.4 Excel Add-Ins18.4 Excel Add-InsLO18-6LO18-6

Page 14: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-14

• In a dynamic simulation, stochastic variables may be discrete (measured only at In a dynamic simulation, stochastic variables may be discrete (measured only at regular time intervals) or continuous (changing smoothly over time).regular time intervals) or continuous (changing smoothly over time).

• Discrete event simulationDiscrete event simulation assesses the system state by a clock at distinct points in assesses the system state by a clock at distinct points in time.time.

• A A snapshotsnapshot of the system state at any given moment is observed. of the system state at any given moment is observed.

Discrete Event SimulationDiscrete Event Simulation

Ch

apter 18

18.5 Dynamic Simulation18.5 Dynamic Simulation

• The emphasis in discrete event simulation is on measurements such asThe emphasis in discrete event simulation is on measurements such as- Arrival rates- Arrival rates- Service rates- Service rates- Length of queues- Length of queues- Waiting time- Waiting time- Capacity utilization- Capacity utilization- System throughput- System throughput

LO18-7LO18-7

LO18-7: LO18-7: Explain the main reasons for using dynamic simulation andExplain the main reasons for using dynamic simulation and queuing models.queuing models.

Page 15: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-15

• Queuing theoryQueuing theory is the study of waiting lines (the length of customer queues, mean is the study of waiting lines (the length of customer queues, mean waiting times, facility utilization, etc.).waiting times, facility utilization, etc.).

• In a In a single-serversingle-server facility, customers form a facility, customers form a single, well-disciplined queuesingle, well-disciplined queue (first- (first-come, first-served).come, first-served).

• The The arrivalsarrivals are from an are from an infinite sourceinfinite source and are Poisson distributed with mean and are Poisson distributed with mean (customer arrivals per unit of time).(customer arrivals per unit of time).

• The The service timesservice times are exponentially distributed with mean are exponentially distributed with mean 1/1/ (customers served (customers served per unit of time).per unit of time).

QueuingQueuing

Ch

apter 18

18.5 Dynamic Simulation18.5 Dynamic Simulation

• Assuming that Assuming that < < then the following may be demonstrated then the following may be demonstrated

LO18-7LO18-7

Page 16: McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics

18-16

Queuing ModelsQueuing Models

Figure 18.15

Ch

apter 18

18.5 Dynamic Simulation18.5 Dynamic SimulationLO18-7LO18-7