Chapter 11. Output Analysis for a Single Model Prof. Dr. Mesut Güneş Ch. 11 Output Analysis for a Single Model

Similar documents
Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Slides 12: Output Analysis for a Single Model

Chapter 11 Estimation of Absolute Performance

Chapter 11 Output Analysis for a Single Model. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Output Analysis for a Single Model

EE/PEP 345. Modeling and Simulation. Spring Class 11

Overall Plan of Simulation and Modeling I. Chapters

B. Maddah INDE 504 Discrete-Event Simulation. Output Analysis (1)

Output Data Analysis for a Single System

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Network Simulation Chapter 6: Output Data Analysis

ESTIMATION AND OUTPUT ANALYSIS (L&K Chapters 9, 10) Review performance measures (means, probabilities and quantiles).

Modeling and Performance Analysis with Discrete-Event Simulation

Redacted for Privacy

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Simulation. Where real stuff starts

Simulation. Where real stuff starts

2WB05 Simulation Lecture 7: Output analysis

Output Data Analysis for a Single System

Construction Operation Simulation

SEQUENTIAL ESTIMATION OF THE STEADY-STATE VARIANCE IN DISCRETE EVENT SIMULATION

IE 581 Introduction to Stochastic Simulation. Three pages of hand-written notes, front and back. Closed book. 120 minutes.

Simulation of stationary processes. Timo Tiihonen

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Chapter 11 Output Analysis for a Single Model. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

Performance Evaluation of Queuing Systems

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Chapter 6 Queueing Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

Review of Queuing Models

Slides 9: Queuing Models

Summarizing Measured Data

Unit 5a: Comparisons via Simulation. Kwok Tsui (and Seonghee Kim) School of Industrial and Systems Engineering Georgia Institute of Technology

14 Random Variables and Simulation

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Computer Networks More general queuing systems

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

Session-Based Queueing Systems

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

Performance Evaluation

CS 147: Computer Systems Performance Analysis

Data analysis and stochastic modeling

Link Models for Circuit Switching

SUMMARIZING MEASURED DATA. Gaia Maselli

The New MDL Procedure How To s. Presented by: Marcy Bolek - Alloway

7 Variance Reduction Techniques

arxiv: v1 [stat.me] 14 Jan 2019

Variance reduction techniques

Dynamic Call Center Routing Policies Using Call Waiting and Agent Idle Times Online Supplement

PBW 654 Applied Statistics - I Urban Operations Research

ec1 e-companion to Liu and Whitt: Stabilizing Performance

Homework 2. For the homework, be sure to give full explanations where required and to turn in any relevant plots.

Initial Transient Phase of Steady state Simulation: Methods of Its Length Detection and Their Evaluation in Akaroa2

Variance reduction techniques

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

A STAFFING ALGORITHM FOR CALL CENTERS WITH SKILL-BASED ROUTING: SUPPLEMENTARY MATERIAL

Non Markovian Queues (contd.)

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

Systems Simulation Chapter 6: Queuing Models

Time series models in the Frequency domain. The power spectrum, Spectral analysis

Discrete-Event System Simulation

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Bias Variance Trade-off

CS418 Operating Systems

Probability Models in Electrical and Computer Engineering Mathematical models as tools in analysis and design Deterministic models Probability models

THE ROYAL STATISTICAL SOCIETY 2009 EXAMINATIONS SOLUTIONS GRADUATE DIPLOMA MODULAR FORMAT MODULE 3 STOCHASTIC PROCESSES AND TIME SERIES

Psychology 282 Lecture #4 Outline Inferences in SLR

Name of the Student:

ARD: AN AUTOMATED REPLICATION-DELETION METHOD FOR SIMULATION ANALYSIS

A Study on M x /G/1 Queuing System with Essential, Optional Service, Modified Vacation and Setup time

Business Statistics: A Decision-Making Approach 6 th Edition. Chapter Goals

Statistical inference

HITTING TIME IN AN ERLANG LOSS SYSTEM

More on Input Distributions

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours.

Probabilities & Statistics Revision

Analysis of Simulated Data

Sandwich shop : a queuing net work with finite disposable resources queue and infinite resources queue

Circle a single answer for each multiple choice question. Your choice should be made clearly.

Part I Stochastic variables and Markov chains

λ λ λ In-class problems

Engineering Mathematics : Probability & Queueing Theory SUBJECT CODE : MA 2262 X find the minimum value of c.

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

Sequential Estimation of Quantiles

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6

Markov Processes and Queues

Analysis of an M/M/1/N Queue with Balking, Reneging and Server Vacations

ISyE 6644 Fall 2014 Test #2 Solutions (revised 11/7/16)

Formal Statement of Simple Linear Regression Model

CHAPTER 3 STOCHASTIC MODEL OF A GENERAL FEED BACK QUEUE NETWORK

Network Simulation Chapter 5: Traffic Modeling. Chapter Overview

Stochastic Models in Computer Science A Tutorial

COSC460 Honours Report: A Sequential Steady-State Detection Method for Quantitative Discrete-Event Simulation

Confidence Intervals in Ridge Regression using Jackknife and Bootstrap Methods

M.Sc. (Final) DEGREE EXAMINATION, MAY Final Year. Statistics. Paper I STATISTICAL QUALITY CONTROL. Answer any FIVE questions.

CPU scheduling. CPU Scheduling

Introduction to Queueing Theory

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

Dynamic Control of Parallel-Server Systems

Ch3. TRENDS. Time Series Analysis

Transcription:

Chapter Output Analysis for a Single Model.

Contents Types of Simulation Stochastic Nature of Output Data Measures of Performance Output Analysis for Terminating Simulations Output Analysis for Steady-state Simulations.

Purpose Output analysis: examination of the data generated by a simulation Objective: Predict performance of system Compare performance of two (or more) systems If θ is the system performance, the result of a simulation is an estimator θˆ The precision of the estimator θˆ can be measured by: The standard error of θˆ The width of a confidence interval (CI) for θ.3

Purpose Purpose of statistical analysis: To estimate the standard error and/or confidence interval To figure out the number of observations required to achieve a desired error or confidence interval Potential issues to overcome: Autocorrelation, e.g., arrival of subsequent packets may lack statistical independence. Initial conditions, e.g., the number of packets in a router at time 0 would most likely influence the performance/delay of packets arriving later..4

Types of Simulations.5

Types of Simulations Terminating (transient) Non-terminating (steady state) Transient phase Steady-state phase T 0 T E T 0 T T E.6

Types of Simulations: Terminating Simulations Terminating (transient) simulation: Runs for some duration of time T E, where E is a specified event that stops the simulation. Starts at time 0 under well-specified initial conditions. Ends at the stopping time T E. Bank example: Opens at 8:30 am (time 0) with no customers present and 8 of the teller working (initial conditions), and closes at 4:30 pm (Time T E = 480 minutes). The simulation analyst chooses to consider it a terminating system because the object of interest is one day s operation. T E may be known from the beginning or it may not Several runs may result in T E, T E, T3 E, Goal may be to estimate E(T E ).7

Types of Simulations: Non-terminating Simulations Non-terminating simulation: Runs continuously or at least over a very long period of time. Examples: assembly lines that shut down infrequently, hospital emergency rooms, telephone systems, network of routers, Internet. Initial conditions defined by the analyst. Runs for some analyst-specified period of time T E. Objective is to study the steady-state (long-run) properties of the system, properties that are not influenced by the initial conditions of the model..8

Types of Simulations Whether a simulation is considered to be terminating or non-terminating depends on both The objectives of the simulation study and The nature of the system Simulation Goal of study? Nature of system? Terminating Non-Terminating.9

Stochastic Nature of Output Data.0

Stochastic Nature of Output Data Model output consist of one or more random variables because the model is an input-output transformation and the input variables are random variables. M/G/ queueing example: Poisson arrival rate = 0. per time unit and service time ~ N(µ = 9.5, σ =.75 ). System performance: long-run mean queue length, L Q (t). Suppose we run a single simulation for a total of 5000 time units Divide the time interval [0, 5000) into 5 equal subintervals of 000 time units. Average number of customers in queue from time (j-)000 to j(000) is j. Waiting line Server L Q = λ µ = ρ ( µ λ) ρ.

Stochastic Nature of Output Data M/G/ queueing example (cont.): Batched average queue length for 3 independent replications: Replication Batching Interval Batch j j j 3j [0, 000) 3,6,9 7,67 [000, 000) 3, 9,00 9,53 [000, 3000) 3,8 6,5 0,36 [3000, 4000) 4 6,9 4,53 8, [4000, 5000) 5,8 5,9,6 [0, 5000) 3,75 5,56 3,66 Across replication Inherent variability in stochastic simulation both within a single replication and across different replications.,, 3 The average across 3 replications, can be regarded as independent observations, but averages within a replication,,, 5, are not. Within replication,.

Stochastic Nature of Output Data Measures of performance.3

Measures of performance Consider the estimation of a performance parameter, θ (or φ), of a simulated system. Discrete time data: {,,, n }, with ordinary mean: θ Continuous-time data: {(t), 0 t T E } with time-weighted mean: φ Point estimation for discrete time data. The point estimator: n θˆ = n i= i Is unbiased if its expected value is θ, that is if: Is biased if: E( ˆ) θ θ and E( ˆ) θ θ is called bias of E( ˆ) θ = θ θˆ Desired Reality.4

Measures of performance: Point Estimator Point estimation for continuous-time data. The point estimator: φˆ = T E ( t) dt T 0 ˆ) φ φ Is biased in general where: E( An unbiased or low-bias estimator is desired. E.5

Measures of performance: Point Estimator Usually, system performance measures can be put into the common framework of θ or φ: Example: The proportion of days on which sales are lost through an out-of-stock situation, let: ( i) =, 0, if out of stock on day i otherwise Example: Proportion of time that the queue length is larger than k 0, if L (t) > k t) = Q 0, otherwise ( 0.6

Measures of performance: Point Estimator Performance measure that does not fit: quantile or percentile: P ( θ ) = p Estimating quantiles: the inverse of the problem of estimating a proportion or probability. Consider a histogram of the observed values : Find θˆ such that 00p% of the histogram is to the left of (smaller than). θˆ A widely used performance measure is the median, which is the 0.5 quantile or 50-th percentile..7

Measures of performance: Confidence-Interval Estimation Suppose X, X,, X n are an independent sample from a normally distributed population with mean µ and variance σ. Given the sample mean and sample variance as X X = n Then has Student s t-distribution with n- T = S n degrees of freedom / µ n X i S = i= n n ( X i X ) If c is the p-th quantile of this distribution, then P(-c < T < c) = p Consequently i= S S P X c < µ < X + c = n n p.8

Measures of performance: Confidence-Interval Estimation To understand confidence intervals fully, distinguish between measures of error and measures of risk: confidence interval versus prediction interval Suppose the model is the normal distribution with mean θ, variance σ (both unknown). Let i be the average cycle time for parts produced on the i-th replication of the simulation (its mathematical expectation is θ ). Average cycle time will vary from day to day, but over the long-run the average of the averages will be close to θ. Sample variance across R replications: S = R R i= ( i ).9

Measures of performance: Confidence-Interval Estimation Confidence Interval (CI): A measure of error. Where i are normally distributed. ± tα, R S R Quantile of the t distribution with R- degrees of freedom. We cannot know for certain how far bound that error. is from θ but CI attempts to A CI, such as 95%, tells us how much we can trust the interval to actually bound the error between and θ. The more replications we make, the less error there is in (converging to 0 as R goes to infinity)..0

Measures of performance: Confidence-Interval Estimation Prediction Interval (PI): A measure of risk. A good guess for the average cycle time on a particular day is our estimator but it is unlikely to be exactly right. PI is designed to be wide enough to contain the actual average cycle time on any particular day with high probability. Normal-theory prediction interval: ± t R α, S + R The length of PI will not go to 0 as R increases because we can never simulate away risk. Prediction Intervals limit is: θ ± z ασ.

Measures of performance: Confidence-Interval Estimation 90 95 00 05 0 0 5 0 5 0 5 30.

Measures of performance: Prediction-Interval Estimation 90 95 00 05 0 0 5 0 5 0 5 30.3

Measures of performance: Confidence-Interval Estimation 0 4 6 8 0 z α t n, α 5 0 5 0.4

.5 Measures of performance: Confidence-Interval Estimation 3 0 3 0.0 0. 0. 0.3 0.4 N(0,) df= df= df=8

Output Analysis for Terminating Simulations.6

Output Analysis for Terminating Simulations A terminating simulation: runs over a simulated time interval [0, T E ]. A common goal is to estimate: θ = φ = E n E TE n i= 0 T E i, ( t) dt, for discrete output for continuous output ( t), 0 t T E In general, independent replications are used, each run using a different random number stream and independently chosen initial conditions..7

Statistical Background Important to distinguish within-replication data from acrossreplication data. For example, simulation of a manufacturing system Two performance measures of that system: cycle time for parts and work in process (WIP). Let ij be the cycle time for the j-th part produced in the i-th replication. Across-replication data are formed by summarizing within-replication data. i R Within-Replication Data R R n n Rn R Across-Rep. Data,,, R, S S, S, S, R, H H H H R Within replication performance measure Across replication performance measure.8

Statistical Background Across Replication: Discrete time data The average: = The sample variance: i= i The confidence-interval half-width: R R S = R R i= ( i H ) = t α,r S R Within replication: Continuous time data The average: i = The sample variance: T E i T 0 S Ei i ( t) dt i = T Ei T Ei 0 ( i ( t) i ) dt.9

Statistical Background Overall sample average,, and the interval replication sample averages, i, are always unbiased estimators of the expected daily average cycle time or daily average WIP. Across-replication data are independent and identically distributed Same model Different random numbers for each replications Within-replication data are not independent and not identically distributed One random number stream is used within a replication.30

Output Analysis for Terminating Simulations Confidence Intervals with Specified Precision.3

Confidence Intervals with Specified Precision The half-length H of a 00( α)% confidence interval for a mean θ, based on the t distribution, is given by: H t, R S S is the sample variance = α R is the number of R replications Suppose that an error criterion ε is specified with probability -α, a sufficiently large sample size should satisfy: P ( θ ε ) < α.3

Confidence Intervals with Specified Precision Assume that an initial sample of size R 0 (independent) replications has been observed. Obtain an initial estimate S 0 of the population variance σ. H S0 tα ε R, R = Then, choose sample size R such that R R 0 Solving for R R t α S /, R ε 0.33

Confidence Intervals with Specified Precision Since t R z α /, α /, an initial estimate for R is given by R z S ε α / 0 For large R, zα / is the standard normal distribution. t R α /, α / R is the smallest integer satisfying R R 0 Collect R - R 0 additional observations. z 0 4 6 8 0 z α t α n, 5 0 5 0 The 00(- α)% confidence interval for θ : S ± tα /, R R.34

Confidence Intervals with Specified Precision Call Center Example: estimate the agent s utilization ρ over the first hours of the workday. Initial sample of size R 0 = 4 is taken and an initial estimate of the population variance is S 0 = (0.07) = 0.0058. The error criterion is ε = 0.04 and confidence coefficient is -α = 0.95, hence, the final sample size must be at least: For the final sample size: z.05s 0 0 = ε.96 0.0058 = 0.04.44 R 3 4 5 t 0.05, R-,8,6,4 ( t S ) α /, R 0 /ε 5,39 5, 4,83 R = 5 is the smallest integer satisfying the error criterion R so R - R 0 = additional replications are needed. After obtaining additional outputs, half-width should be checked. t α S /, R ε 0.35

Output Analysis for Terminating Simulations Quantiles.36

Quantiles Here, a proportion or probability is treated as a special case of a mean. When the number of independent replications,, R is large enough that t α/,r- z α/, the confidence interval for a probability p is often written as: pˆ ± zα / pˆ( pˆ) R The sample proportion A quantile is the inverse of the probability estimation problem: Find θ such that P( θ ) = p p is given.37

Quantiles The best way is to sort the outputs and use the (R p)-th smallest value, i.e., find θ such that 00p% of the data in a histogram of is to the left of θ. Example: If we have R=0 replications and we want the p = 0.8 quantile, first sort, then estimate θ by the (0)(0.8) = 8-th smallest value (round if necessary). 5.6 7. 8.8 8.9 9.5 9.7 0...5.9 ß sorted data ß this is our point estimate.38

Quantiles Confidence Interval of Quantiles: An approximate (-α)00% confidence interval for θ can be obtained by finding two values θ l and θ u. θ l cuts off 00p l % of the histogram (the R p l smallest value of the sorted data). θ u cuts off 00p u % of the histogram (the R p u smallest value of the sorted data). where p = p z α / p( R p) p u = p + z α / p( p) R.39

Quantiles Example: Suppose R = 000 replications, to estimate the p = 0.8 quantile with a 95% confidence interval. First, sort the data from smallest to largest. Then estimate of θ by the (000)(0.8) = 800-th smallest value, and the point estimate is.03. And find the confidence interval: 0.8( 0.8) p = 0.8.96 = 0.78 000 Output Rank p u = 0.8 +.96 The CI isthe 780 0.8( 0.8) 000 and 80 The point estimate is.03 The 95% CI is [88.96, 56.79] th th = 0.8 smallest values p l p u A portion of the 000 sorted values: 80.9 779 88.96 780 90.55 78 08.58 799.03 800 6.99 80 50.3 89 56.79 80 56.99 8.40

Output Analysis for Steady-State Simulation.4

Output Analysis for Steady-State Simulation Consider a single run of a simulation model to estimate a steady-state or long-run characteristics of the system. The single run produces observations,,... (generally the samples of an autocorrelated time series). Performance measure: lim n θ = i, for discrete measure (with probability ) n n i= TE φ = lim ( t) dt, for continuous measure (with probability ) T 0 T E E Independent of the initial conditions..4

Output Analysis for Steady-State Simulation The sample size is a design choice, with several considerations in mind: Any bias in the point estimator that is due to artificial or arbitrary initial conditions (bias can be severe if run length is too short). Desired precision of the point estimator. Budget constraints on computer resources. Notation: the estimation of θ from a discrete-time output process. One replication (or run), the output data:,, 3, With several replications, the output data for replication r: r, r, r3,.43

Output Analysis for Steady-State Simulation Initialization Bias.44

Initialization Bias Methods to reduce the point-estimator bias caused by using artificial and unrealistic initial conditions:. Intelligent initialization.. Divide simulation into an initialization phase and data-collection phase..45

Initialization Bias Intelligent initialization Initialize the simulation in a state that is more representative of longrun conditions. If the system exists, collect data on it and use these data to specify more nearly typical initial conditions. If the system can be simplified enough to make it mathematically solvable, e.g., queueing models, solve the simplified model to find long-run expected or most likely conditions, use that to initialize the simulation..46

Initialization Bias Divide each simulation into two phases: An initialization phase, from time 0 to time T 0. A data-collection phase, from T 0 to the stopping time T 0 +T E. The choice of T 0 is important: After T 0, system should be more nearly representative of steadystate behavior. System has reached steady state: the probability distribution of the system state is close to the steady-state probability distribution (bias of response variable is negligible)..47

Initialization Bias: Example M/G/ queueing example: A total of 0 independent replications were made. Each replication begins in the empty and idle state. Simulation run length on each replication: T 0 +T E = 5000 time units. Response variable: queue length, L Q (t,r) (at time t of the r-th replication). Batching intervals of 000 minutes, batch means rj = j 000 ( j ) 000 Ensemble averages: To identify trend in the data due to initialization bias The average corresponding batch means across replications: = L R Q. j rj R r= ( t, r) dt.48

Initialization Bias: Example A plot of the ensemble averages, j, versus 000j, for j =,,,5..49

Initialization Bias: Example Cumulative average sample mean (after deleting d observations): ( n, d) = n d n j j= d + Not recommended to determine the initialization phase. It is apparent that downward bias is present and this bias can be reduced by deletion of one or more observations..50

Initialization Bias No widely accepted, objective and proven technique to guide how much data to delete to reduce initialization bias to a negligible level. Plots can be misleading but they are still recommended Ensemble averages reveal a smoother and more precise trend as the number of replications (R) increases. Ensemble averages can be smoothed further by plotting a moving average. Cumulative average becomes less variable as more data are averaged. The more correlation present, the longer it takes for j to approach steady state. Different performance measures could approach steady state at different rates What to do?.5

Output Analysis for Steady-State Simulation Error Estimation.5

Error Estimation If {,, n } are not statistically independent, then S /n is a biased estimator of the true variance. Almost always the case when {,, n } is a sequence of output observations from within a single replication (autocorrelated sequence, time-series). Suppose the point estimator θ is the sample mean n n = n = i= i V ( ) cov( i, j ) n n i= j= Variance of is very hard to estimate. For systems with steady state, produce an output process that is approximately covariance stationary (after the transient phase). The covariance between two random variables in the time series depends only on the lag, i.e., the number of observations between them..53

.54 Error Estimation For a covariance stationary time series, {,, n }: Lag-k autocovariance is: Lag-k autocorrelation is: If a time series is covariance stationary, then the variance of is: The expected value of the variance estimator is: ), cov( ), cov( k i i k k + + = = γ, = k k k ρ σ γ ρ + = = ) ( n k k n k n V ρ σ / where ), ( = = n c n B V B n S E c

Error Estimation (a) ρ k > 0 for most Stationary time series i exhibiting positive autocorrelation. Series slowly drifts above and then below the mean. k (b) ρ < 0 k for most Stationary time series i exhibiting negative autocorrelation. k (c) Non-stationary time series with an upward trend.55

Error Estimation The expected value of the variance estimator is: E S n = B V ( ), where B = n / c andv ( ) is the variance of n If i are independent Æ ρ k =0, then S /n is an unbiased estimator of V ( ) If the autocorrelation ρ k are primarily positive, then S /n is biased low as an estimator of. V ( ) If the autocorrelation ρ k are primarily negative, then S /n is biased high as an estimator of. V ( ).56

Output Analysis for Steady-State Simulation Replication Method.57

Replication Method Use to estimate point-estimator variability and to construct a confidence interval. Approach: make R replications, initializing, and deleting from each one the same way. Important to do a thorough job of investigating the initial-condition bias: Bias is not affected by the number of replications, instead, it is affected only by deleting more data (i.e., increasing T 0 ) or extending the length of each run (i.e. increasing T E ). Basic raw output data { rj, r =,..., R; j =,, n} is derived by: Individual observation from within replication r. Batch mean from within replication r of some number of discrete-time observations. Batch mean of a continuous-time process over time interval j. Replication R R,,, Observations d d +, d, d +, d, d + R, d R, d + d ( d + ) n,, R, n n n n Replication Averages ( n, d) ( n, d) R ( n, d) ( n, d).58

Replication Method Each replication is regarded as a single sample for estimating θ. For replication r: ( n, d) = The overall point estimator: If d and n are chosen sufficiently large: θ n,d ~ θ. ( n, d) is an approximately unbiased estimator of θ. r n d rj j= d + R ( n, d) = r ( n, d) and E[ ( n, d)] = θn, d R r= n.59

Replication Method To estimate the standard error of variance and standard error:, compute the sample S R R ( r ) = r R and s. e.( ) = R r= R r= = S R Mean of the undeleted observations from the r-th replication. Mean of ( n, d),, R ( n, d) Standard error.60

Replication Method Length of each replication (n) beyond deletion point (d): ( n d ) > 0d or T E > 0T 0 Number of replications (R) should be as many as time permits, up to about 5 replications. For a fixed sample size (n), as fewer data are deleted ( d): Confidence interval shifts: greater bias. Standard error of ( n, d) decreases: decrease variance. Reducing bias Trade off Increasing variance.6

Replication Method: Example M/G/ queueing example: Suppose R=0, each of length T E =5000 time units, starting at time 0 in the empty and idle state, initialized for T 0 = 000 time units before data collection begins. Each batch means is the average number of customers in queue for a 000-time-unit interval. The -st two batch means are deleted (d=). The point estimator and standard error are: = The 95% CI for long-run mean queue length is: S S tα /, R θ + tα /, R R R 8.43.6(.59) L 8.43 +.6(.59) Q ( (5,)). 59 ( 5,) 8.43 and s. e. = A high degree of confidence that the long-run mean queue length is between 4.84 and.0 (if d and n are large enough)..6

Output Analysis for Steady-State Simulation Sample Size.63

Sample Size To estimate a long-run performance measure, θ, within with confidence 00(- α)%. M/G/ queuing example (cont.): We know: R 0 = 0, d = deleted and S 0 = 5.30. To estimate the long-run mean queue length, L Q, within ε = customers with 90% confidence (α = 0%). Initial estimate: ± ε Hence, at least 8 replications are needed, next try R = 8,9, using R t R 0.05, R ε S 0 R = 9 z.05s 0 0 = ε.645 5.30 =. We found that: t 7. Additional replications needed is R R 0 = 9-0 = 9. 0.05,9 ε S 0 =.73 5.3 4 = 8.93.64

Sample Size An alternative to increasing R is to increase total run length T 0 +T E within each replication. Approach: Increase run length from (T 0 +T E ) to (R/R 0 )(T 0 +T E ), and delete additional amount of data, from time 0 to time (R/R 0 )T 0. Advantage: any residual bias in the point estimator should be further reduced. However, it is necessary to have saved the state of the model at time T 0 +T E and to be able to restart the model..65

Output Analysis for Steady-State Simulation Batch Means.66

Batch Means for Interval Estimation Using a single, long replication: Problem: data are dependent so the usual estimator is biased. Solution: batch means. Batch means: divide the output data from replication (after appropriate deletion) into a few large batches and then treat the means of these batches as if they were independent. A continuous-time process, {(t), T 0 t T 0 +T E }: k batches of size m = T E / k, batch means: jm = t T dt j k j m ( + ),,, 0 = ( j ) m A discrete-time process, { i, i = d+,d+,, n}: k batches of size m = (n d)/k, batch means: jm j = i + d j =,,, k m i= ( j ) m+.67

Batch Means for Interval Estimation,..., d, d +,..., d + m, d + m+,..., d + m,..., d + ( k ) m+,..., d + km deleted Starting either with continuous-time or discrete-time data, the variance of the sample mean is estimated by: k S k = k k j= ( ) j k = k j= j k k( k ) If the batch size is sufficiently large, successive batch means will be approximately independent, and the variance estimator will be approximately unbiased. No widely accepted and relatively simple method for choosing an acceptable batch size m. Some simulation software does it automatically..68

The Art of Data Presentation.69

The art of data presentation Always get the following statistical sample data Min Max Mean Median Standard deviation Confidence interval half width st-quartile 3rd-quartile.70

Histograms.7

Box Plot Various types of Box Plots Standard Variable-width Box Plot Notched Box Plot Variable-width Notched Box Plot Max Quartile Median Quartile Min.7

Box Plot Max Quartile Median Mean Quartile Min.73

Box Plot 0 0 0 40 0 0 0 40 0 0 0 40 G G3 G5 G G3 G5 G G3 G5 0 0 0 40 0 0 0 40 0 0 0 40 G G3 G5 G G3 G5 G G3 G5.74

Mean with confidence interval.75

Summary Stochastic discrete-event simulation is a statistical experiment. Purpose of statistical experiment: obtain estimates of the performance measures of the system. Purpose of statistical analysis: acquire some assurance that these estimates are sufficiently precise. Distinguish simulation runs with respect to output analysis: Terminating simulations and Steady-state simulations. Steady-state output data are more difficult to analyze Decisions: initial conditions and run length Possible solutions to bias: deletion of data and increasing run length Statistical precision of point estimators are estimated by standarderror or confidence interval Method of independent replications was emphasized. Batch mean for a long run replication Art of data representation.76