Presentation is loading. Please wait.

Presentation is loading. Please wait.

Monte Carlo Simulation Random Number Generation

Similar presentations


Presentation on theme: "Monte Carlo Simulation Random Number Generation"— Presentation transcript:

1 Monte Carlo Simulation Random Number Generation
18 Simulation Chapter What is Simulation? Monte Carlo Simulation Random Number Generation Excel Add-Ins Dynamic Simulation McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved.

2 What is Simulation? A simulation is a computer model that attempts to imitate the behavior of a real system or activity. Models are simplifications that try to include the essentials while omitting unimportant details. Simulations helps to quantify relationships among variables that are to complex to analyze mathematically. 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.

3 What is Simulation? A Versatile Tool Simulation is - a rehearsal
- planning - a behavioral tool - not just a quantitative tool for operations research specialists - a general device to help people think clearly

4 What is Simulation? Applications
Whether simple or complex, simulation studies have improved - Passenger flows at Vancover International Airport - Hospital surgery scheduling at Henry Ford Hospital - Traffic flows in metropolitan Oakland County - Waiting lines at Disney World - Just-in-time scheduling in G.M. auto assembly plants

5 What is Simulation? When Do We Simulate?
In general, consider simulation when - The system is complex - Uncertainty exists in the variables - Real experiments are impossible or costly - The processes are repetitive - Stakeholders can’t agree on policy

6 What is Simulation? When Do We Simulate?
Conversely, we are less inclined to simulate when - The system is simple - Variables are stable or non-stochastic - Real experiments are cheap and no disruptive - The event will only happen once - Stakeholders agree on policy

7 What is Simulation? Advantages of Simulation
In a deterministic model, variables can’t vary. Simulation lets key variables change in random but specified ways. Simulation helps us understand the range of possible outcomes and their probabilities. Simulation allows sensitivity analysis.

8 What is Simulation? Advantages of Simulation
Simulation is useful because it - Is less disruptive than real experiments - Forces us to state our assumptions clearly - Helps us visualize the implications of our assumptions - Reveals system interdependencies - Quantifies risk by showing probabilities of events - Helps us see a range of possible outcomes - Promotes constructive dialogue among stakeholders

9 What is Simulation? Advantages of Simulation
A simulation project has the following phases: Phase I (design) – identify the problem, set objectives, design the model, collect data. Phase II (execution) – empirical modeling, specify the variables, validate the model, execute the simulation, prepare reports. Phase III (communication) – explain the findings to decision-makers.

10 What is Simulation? Risk Assessment
Risk assessment means thinking about a range of outcomes and their probabilities. Variation is inevitable. Knowing the 95% range of possible values for the decision variable as well as the “most likely” value m, is the point of risk assessment. Risk assessment is useful when the model is complex.

11 What is Simulation? Components of a Simulation Model
Deterministic variables are nonrandom and fixed. Stochastic variables are random. The distribution must be hypothesized.

12 What is Simulation? Components of a Simulation Model
In dynamic simulation models, events occur sequentially over time. Specialized software is required. In static simulation models time is not explicit and the analysis can be done in Excel spreadsheets.

13 What is Simulation? Components of a Simulation Model Table 18.1

14 What is Simulation? Components of a Simulation Model Table 18.1

15 Monte Carlo Simulation
The Monte Carlo method is used for static simulation. The computer creates the values of the stochastic random variables. The distribution and its parameters are specified. Samples are repeatedly drawn from each distribution.

16 Monte Carlo Simulation
Each sample yields one possible outcome for each stochastic variable. For each output variable, look at percentiles as well as the mean. For each input variable, look at a histogram to verify that we are sampling from the desired distribution.

17 Monte Carlo Simulation
Which Distribution? Any distribution can be used for a stochastic input variable. Four probability distributions are used more with static simulation because they correspond to real life and can be easily simulated in Excel.

18 Monte Carlo Simulation
Which Distribution?

19 Monte Carlo Simulation
Which Distribution?

20 Monte Carlo Simulation
Which Distribution?

21 Monte Carlo Simulation
Which Distribution?

22 Monte Carlo Simulation
Simulation Setup for Revenue Calculation PB PC Table 18.3

23 Random Number Generation
Basic Concept: Inverse CDF Random x from Continuous CDF Random x from Discrete CDF

24 Random Number Generation
Creating Random Data in Excel Table 18.5

25 Random Number Generation
Other Ways to Get Random Data Tools > Data Analysis > Random Number Generation Figure 18.4

26 Random Number Generation
Other Ways to Get Random Data Using MegaStat Figure 18.5

27 Random Number Generation
Other Ways to Get Random Data Using Learning Stats Figure 18.6

28 Random Number Generation
Other Ways to Get Random Data Using MINITAB Figure 18.7

29 Random Number Generation
Bootstrap Method The bootstrap 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.

30 Random Number Generation
Bootstrap Method From a sample of n observations, use Monte Carlo random integers to take repeated samples of n items with replacement from the sample. Calculate the statistic of interest for each sample.

31 Random Number Generation
Bootstrap Method The average of these statistics is the bootstrap estimator. The standard deviation from these estimates is the bootstrap standard error. The distribution of these repeated estimates is the bootstrap distribution. The percentiles of the resulting distribution of sample estimator provide the bootstrap confidence interval.

32 Random Number Generation
Bootstrap Method 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.

33 Excel Add-Ins Random data can be generated by using Excel, however, Excel does not keep track of your results. Excel add-ins offer more features such as calculating probabilities and permitting Monte Carlo simulation.

34 Excel Add-Ins @Risk Add-In
Intuitive and easy to input functions can be pasted directly into cells in and Excel spreadsheet. The input cell becomes active and will change each time you update the spreadsheet by pressing F9.

35 Excel Add-Ins @Risk Functions Table 18.6

36 Excel Add-Ins @Risk Illustration: Bob’s Stochastic Balance Sheet
Figure 18.8

37 Excel Add-Ins @Risk Illustration: Distributions Used in Bob’s Stochastic Balance Sheet Table 18.7

38 Excel Add-Ins @Risk Illustration: Buttons to Set Up the Simulation
Figure 18.9

39 Excel Add-Ins @Risk Illustration: Typical Simulation Settings
Figure 18.10

40 Excel Add-Ins @Risk Illustration: Typical Simulation Settings
Figure 18.10

41 Excel Add-Ins @Risk Illustration: Selecting a Graph Figure 18.11

42 Excel Add-Ins @Risk Illustration: Histogram of 500 Iterations of Net Worth Figure 18.12

43 Excel Add-Ins @Risk Illustration: Distribution of Net Worth for 500 Iterations Figure 18.13

44 Excel Add-Ins @Risk Illustration: Tornado Graph for Sensitivity Analysis Figure 18.14

45 Dynamic Simulation Discrete Event Simulation
In a dynamic simulation, stochastic variables may be discrete (measured only at regular time intervals) or continuous (changing smoothly over time). Discrete event simulation assesses the system state by a clock at distinct points in time. A snapshot of the system state at any given moment is observed.

46 Dynamic Simulation Discrete Event Simulation
The emphasis in discrete event simulation is on measurements such as - Arrival rates - Service rates - Length of queues - Waiting time - Capacity utilization - System throughput

47 Dynamic Simulation Queuing
Queuing theory is the study of waiting lines (the length of customer queues, mean waiting times, facility utilization, etc.). In a single-server facility, customers form a single, well-disciplined queue (first-come, first-served). The arrivals are from an infinite source and are Poisson distributed with mean a (customer arrivals per unit of time). The service times are exponentially distributed with mean s (customers served per unit of time).

48 Dynamic Simulation Queuing
Assuming that a < s then the following may be demonstrated

49 Dynamic Simulation Queuing Models Figure 18.15

50 Applied Statistics in Business & Economics
End of Chapter 18 18-50


Download ppt "Monte Carlo Simulation Random Number Generation"

Similar presentations


Ads by Google