Вы находитесь на странице: 1из 12

Overview of Output Data

Analysis
Output Data Analysis • Terminating versus non-terminating simulations
o Terminating simulation:
Runs for some duration of time TE, where E is a
 Overview of Output Data Analysis specified event that stops the simulation.
Starts at time 0 under well-specified initial conditions.
 The Stochastic Process Ends at the stopping time TE.

1 __________________________ 2 _________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

Overview of Output Data Overview of Output Data


Analysis Analysis
o Bank example: Opens at 8:30 am (time 0) with no o Non-terminating simulation:
customers present and 8 of the 11 teller working (initial  Runs continuously, or at least over a very long period of time.
conditions), and closes at 4:30 pm (Time TE = 480  Examples: assembly lines that shut down infrequently,
minutes). telephone systems, hospital emergency rooms.
 Initial conditions defined by the analyst.
 Runs for some analyst-specified period of time TE.
The simulation analyst chooses to consider it a
 Study the steady-state (long-run) properties of the system,
terminating system because the object of interest is
properties that are not influenced by the initial conditions of the
one day’s operation. model.

3 __________________________ 4 _________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
Overview of Output Data The Stochastic Process
Analysis • Model output consist of one or more random variables (r.
• Whether a simulation is considered to be terminating or v.)
non-terminating depends on both • It is an input-output transformation and the input
o The objectives of the simulation study and variables are r.v.’s.
o The nature of the system.

5 __________________________ 6 _________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• M/G/1 queueing example: • M/G/1 queuing example (cont.):
o Poisson arrival rate = 0.1 per minute; service time ~ N(μ = o Batched average queue length for 3 independent
9.5, σ =1.75). replications:
o System performance: long-run mean queue length, LQ(t).
o Suppose we run a single simulation for a total of 5,000
minutes
 Divide the time interval [0, 5000) into 5 equal o Inherent variability in stochastic simulation both within
subintervals of 1000 minutes. a single replication and across different replications.
 Average number of customers in queue from time (j- o The average across 3 replications, Y1, Y2, Y3 can be
1)1000 to j(1000) is Yj . regarded as independent observations, but averages
within a replication, Y11,…, Y15, are not.

7 __________________________ 8 _________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Consider the estimation of a performance parameter, θ • Point estimation for discrete time data.
(or φ), of a simulated system. o The point estimator:
o Discrete time data: [Y1, Y2, …, Yn], with ordinary mean:
θ
o Continuous-time data: {Y(t), 0 ≤ t ≤ TE} with time-
weighted mean: φ
 Is unbiased if its expected value is θ, that is if:

 Is biased if:

9 __________________________ 10 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• Point estimation for continuous-time data. • Usually, system performance measures can be put into the
o The point estimator: common framework of θ or φ:
o e.g., the proportion of days on which sales are lost
through an out-of- stock situation, let:
 Is biased in general where:

 An unbiased or low-bias estimator is desired.

11 _________________________ 12 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Performance measure that does not fit: quantile or • To understand confidence intervals fully, it is important to
percentile: distinguish between measures of error, and measures of
risk, e.g., confidence interval versus prediction interval.

o Estimating quantiles: the inverse of the problem of • Suppose the model is the normal distribution with mean
estimating a proportion or probability. θ, variance σ2 (both unknown).
o Consider a histogram of the observed values Y: o Let Yi be the average cycle time for parts produced on
 Find θˆ such that 100p% of the histogram is to the left the ith replication of the simulation (its mathematical
of (smaller than) θˆ. expectation is θ).

13 _________________________ 14 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


o Average cycle time will vary from day to day, but over • Confidence Interval (CI):
the long-run the average of the averages will be close o A measure of error.
to θ. o Where Yi. are normally distributed.
o Sample variance across R replications:

o We cannot know for certain how far Y is from θ but CI


attempts to bound that error.
o A CI, such as 95%, tells us how much we can trust the interval
to actually bound the error between Y and θ.
o The more replications we make, the less error there is in Y
(converging to 0 as R goes to infinity).

15 _________________________ 16 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Prediction Interval (PI): o Normal-theory prediction interval:
o A measure of risk.
o A good guess for the average cycle time on a particular
day is our estimator but it is unlikely to be exactly
right.
o PI is designed to be wide enough to contain the actual o The length of PI will not go to 0 as R increases because
average cycle time on any particular day with high we can never simulate away risk.
probability.

o PI’s limit is:

17 _________________________ 18 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• A terminating simulation: runs over a simulated time • Important to distinguish within-replication data from
interval [0, TE]. across-replication data.
• A common goal is to estimate: • For example, simulation of a manufacturing system
o Two performance measures of that system: cycle time
for parts and work in process (WIP).
o Let Yij be the cycle time for the jth part produced in the
ith replication.
• In general, independent replications are used, each run o A cross-replication data are formed by summarizing
using a different random number stream and within replication data Yi.
independently chosen initial conditions.

19 _________________________ 20 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Across Replication: • Overall sample average, Y.. , and the interval replication
o For example: the daily cycle time averages (discrete sample averages, Yi, are always unbiased estimators of
time data) the expected daily average cycle time or daily average
WIP.

• Across-replication data are independent (different random


numbers) and identically distributed (same model), but
within-replication data do not have these properties.
• Within replication:
o For example: the WIP (a continuous time data)

21 _________________________ 22 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• The half-length H of a 100(1 – α)% confidence • Assume that an initial sample of size R0 (independent)
interval for a mean θ, based on the t distribution, is replications has been observed.
given by: • Obtain an initial estimate S02 of the population
variance σ2.
• Then, choose sample size R such that R ≥ R0:

• Suppose that an error criterion ε is specified with


probability 1 - α, a sufficiently large sample size • Collect R - R0 additional observations.
should satisfy: • The 100(1-α)% C.I. for θ:

23 _________________________ 24 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Call Center Example: estimate the agent’s utilization ρ o For the final sample size:
over the first 2 hours of the workday.
o Initial sample of size R0 = 4 is taken and an initial estimate
of the population variance is S02 = (0.072)2 = 0.00518.
o The error criterion is ε = 0.04 and confidence coefficient is o R = 15 is the smallest integer satisfying the error criterion,
1-α = 0.95, hence, the final sample size must be at least: so R - R0 = 11 additional replications are needed.
o After obtaining additional outputs, half-width should be
checked.

25 _________________________ 26 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• In this session, a proportion or probability is treated as • The best way is to sort the outputs and use the (R*p)th
a special case of a mean. smallest value, i.e., find θ such that 100p% of the data in
• When the number of independent replications Y1, …, a histogram of Y is to the left of θ.
YR is large enough that tα/2,n-1 = zα/2, the confidence • Example: If we have R=10 replications and we want the p
interval for a probability p is often written as: = 0.8 quantile, first sort, then estimate θ by the (10)(0.8) =
8th smallest value (round if necessary).

• A quantile is the inverse of the probability to the


probability estimation problem:

27 _________________________ 28 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Example: Suppose R = 1000 reps, to estimate the p =
• Confidence Interval of Quantiles: An approximate (1- 0.8 quantile with a 95% confidence interval.
α)100% confidence interval for θ can be obtained by
o First, sort the data from smallest to largest.
finding two values θl and θu.
o Then estimate of θ by the (1000)(0.8) = 800th
o θl cuts off 100pl% of the histogram (the Rpl smallest
smallest value, and the point estimate is 212.03.
value of the sorted data).
o θu cuts off 100pu% of the histogram (the Rpu smallest
value of the sorted data).

29 _________________________ 30 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


o And find the confidence interval:
• Consider a single run of a simulation model to
estimate a steady-state or long-run characteristics of
the system.
o The single run produces observations Y1, Y2, ...
(generally the samples of an autocorrelated time
series).

o Performance measure:

o The point estimate is The 95% c.i. is [188.96, 256.79]

31 _________________________ 32 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• The sample size is a design choice, with several • Notation: the estimation of θ from a discrete-time output
considerations in mind: process.
o Any bias in the point estimator that is due to artificial o One replication (or run), the output data: Y1, Y2, Y3, …
or arbitrary initial conditions (bias can be severe if run o With several replications, the output data for
length is too short). replication r: Yr1, Yr2,Yr3, …
o Desired precision of the point estimator.
o Budget constraints on computer resources.

33 _________________________ 34 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• Methods to reduce the point-estimator bias caused by • Intelligent initialization
using artificial and unrealistic initial conditions: o Initialize the simulation in a state that is more
o Intelligent initialization. representative of long-run conditions.
o Divide simulation into an initialization phase and data- o If the system exists, collect data on it and use these
collection phase. data to specify more nearly typical initial conditions.
o If the system can be simplified enough to make it
mathematically solvable, e.g. queuing models, solve
the simplified model to find long-run expected or most
likely conditions, use that to initialize the simulation.

35 _________________________ 36 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Divide each simulation into two phases: • M/G/1 queueing example: A total of 10 independent
o An initialization phase, from time 0 to time T0. replications were made.
o A data-collection phase, from T0 to the stopping o Each replication beginning in the empty and idle state.
time T0+TE. o Simulation run length on each replication was T0+TE =
o The choice of T0 is important: 15,000 minutes.
 After T0, system should be more nearly o Response variable: queue length, LQ(t,r) (at time t of
representative of steady-state behavior. the rth replication).
o System has reached steady state: the probability o Batching intervals of 1,000 minutes, batch means
distribution of the system state is close to the
steady-state probability distribution (bias of
response variable is negligible).

37 _________________________ 38 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• Ensemble averages: • A plot of the ensemble averages, Y..(n,d), versus 1000j,
o To identify trend in the data due to initialization bias for j = 1,2, …,15.
o The average corresponding batch means across
replications:

o The preferred method to determine deletion point.

o Illustrates the downward bias of the initial


observations.

39 _________________________ 40 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• No widely accepted, objective and proven technique to o Cumulative average becomes less variable as more data
guide how much data to delete to reduce initialization are averaged.
bias to a negligible level. o The more correlation present, the longer it takes for Yj
• Plots can, at times, be misleading but they are still to approach steady state.
recommended. o Different performance measures could approach steady
state at different rates.
o Ensemble averages reveal a smoother and more precise
trend as the # of replications, R, increases.
o Ensemble averages can be smoothed further by plotting
a moving average.

41 _________________________ 42 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• An alternative to increasing R is to increase total run o However, it is necessary to have saved the state of the
length T0+TE within each replication. model at time T0+TE and to be able to restart the model.
o Approach:
 Increase run length from (T0+TE) to (R/R0)(T0+TE),
and
 Delete additional amount of data, from time 0 to
time (R/R0)T0.

o Advantage: any residual bias in the point estimator


should be further reduced.

43 _________________________ 44 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
The Stochastic Process The Stochastic Process
• Using a single, long replication: • A continuous-time process, {Y(t), T0 ≤ t ≤ T0+TE}:
o Problem: data are dependent so the usual estimator is o k batches of size m = TE/k, batch means:
biased.
o Solution: batch means.
• Batch means: divide the output data from 1 replication • A discrete-time process, {Yi , i = d+1,d+2, …, n}:
(after appropriate deletion) into a few large batches and o k batches of size m = (n – d)/k, batch means:
then treat the means of these batches as if they were
independent.

45 _________________________ 46 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

The Stochastic Process The Stochastic Process


• No widely accepted and relatively simple method for
• Starting either with continuous-time or discrete-time data, choosing an acceptable batch size m (see text for a
the variance of the sample mean is estimated by: suggested approach). Some simulation software does it
automatically.

• If the batch size is sufficiently large, successive batch


means will be approximately independent, and the
variance estimator will be approximately unbiased.

47 _________________________ 48 ________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________
____________________________ ___________________________

Вам также может понравиться