MATH 4810Computational Modelling

Module 05 · Unit 5.2 · Lesson 3 of 3

Output Analysis and Warm-Up Bias

A simulation begins in an artificial state. Extracting meaningful statistics from it requires discipline, or the results will reflect the artificial starting condition rather than the steady state the model is meant to describe.

Duration ≈ 3 hours Prerequisite Lessons 1 & 2 Feeds Lab 10 · Assignment 5
  1. Lesson 1
  2. Lesson 2
  3. Lesson 3

1 Modelling context

A discrete-event simulation typically begins in an artificial state: no entities in the system, all resources idle. If the real system operates in a busy steady state, the first portion of the simulated period does not represent the system's normal behaviour. This is warm-up bias, and failing to account for it is one of the most common errors in simulation practice.

This lesson develops the output-analysis discipline required to extract meaningful statistics from a discrete-event simulation. It covers the warm-up period, the choice between single-run and replicated designs, the construction of confidence intervals for steady-state performance measures, and the reporting conventions that make simulation results trustworthy.

What the simulation is trying to estimate

Most DES studies are intended to estimate steady-state performance: the long-run mean waiting time, the average queue length, the utilisation of each resource. The transient phase — the initial period during which the system is filling up — is not part of what the study is trying to estimate, and it must be discarded.

2 Learning objectives

By the end of this lesson you will be able to

  • Identify the warm-up period of a discrete-event simulation.
  • Apply warm-up removal and replication to estimate steady-state performance.
  • Distinguish terminating simulations from steady-state simulations.
  • Construct a confidence interval for a steady-state performance measure.
  • Choose between single-run and replicated designs based on the purpose of the study.
  • Report simulation results with appropriate output analysis.

3 Prerequisite review

Transient
The initial portion of a simulation during which the system's statistics are changing from the artificial starting condition toward their long-run values.
Steady state
The condition in which the distribution of the system's state no longer changes with time. The long-run behaviour of the model.
Warm-up period
The length of the transient phase. This portion of the simulation is discarded before computing steady-state statistics.
Replication
Independent repetition of the simulation with a different random seed. Replications provide the basis for a valid standard error.
Confidence interval
A range of values that, if the experiment were repeated many times, would contain the true value in a specified proportion of the repetitions. Introduced in Module 4.

4 Mathematical formulation

Terminating versus steady-state simulations

Two kinds of simulation studies require different approaches:

  • Terminating simulations. The simulation has a natural termination point: a bank opens at 9:00 and closes at 5:00; a factory produces a fixed batch of 1000 units; an emergency department runs for 24 hours. The performance measure is defined over the fixed interval.
  • Steady-state simulations. The simulation has no natural termination; the study is concerned with long-run behaviour. A manufacturing plant operates continuously; a service system runs without a defined closing time.

For terminating simulations, warm-up is not an issue, because the transient is part of what is being measured. For steady-state simulations, warm-up must be discarded.

Warm-up removal

The simplest approach to steady-state estimation is to run the simulation for a long period and discard the first W time units:

Estimate = mean of performance measure over [W, T]

The choice of W is a modelling decision. Common approaches:

  • Visual inspection of the cumulative mean. Plot the cumulative mean of the performance measure against time. The warm-up period is the point at which the curve stabilises.
  • Rule of thumb. Warm-up is often set to 10–20 percent of the total run length, but this should be checked against the cumulative-mean plot.
  • Automated detection. Use statistical heuristics to detect the point at which the running mean stabilises within its confidence band.

Replication with warm-up

A single long run provides one estimate of the performance measure but no valid standard error, because the observations within a single run are correlated. The standard approach for steady-state estimation is replication:

  1. Run R independent replications, each with a different seed.
  2. In each replication, discard the first W time units.
  3. Compute the performance measure over the remaining period in each replication.
  4. Treat the R performance measures as independent observations; compute the sample mean and standard error.

The 95% confidence interval for the steady-state performance measure is

Ȳ ± t_{R−1, 0.975} · s / √R

where Ȳ is the mean across replications, s is the sample standard deviation across replications, and t_{R−1, 0.975} is the 97.5th percentile of the Student t distribution with R − 1 degrees of freedom.

Choosing the number of replications

For a target confidence-interval width w, the required number of replications is

R ≥ ( 2 t s / w )²

A pilot run of 10–20 replications provides an estimate of s that can be used to plan the full run.

Common performance measures

Common DES performance measures
Measure Definition
Mean wait in queue Average time an entity spends waiting before service begins
Mean time in system Average time from arrival to departure
Mean queue length Average number of entities in the queue (time-weighted)
Server utilisation Fraction of time the resource is busy
Throughput Number of entities served per unit time
Fraction of customers who wait longer than t Tail probability of the waiting-time distribution
Warm-up period and steady-state estimation A plot of the running mean of a performance measure against simulated time. The curve begins at a low value (initial empty system), rises during the warm-up period, and stabilises around the steady-state value. The warm-up period is marked by a shaded region; statistics are collected only after that period. time running mean warm-up discarded statistics collected steady state
Figure 5.7. Warm-up period and steady-state estimation. The running mean begins low (because the system starts empty), rises during the warm-up period, and stabilises around the steady-state value. Statistics are collected only after the warm-up period is discarded.

5 Worked example

Output analysis for an M/M/1 queue

Consider an M/M/1 queue with arrival rate λ = 0.8 and service rate μ = 1.0. The utilisation is ρ = 0.8, and the theoretical mean wait in queue is

W_q = ρ / ( μ (1 − ρ) ) = 0.8 / (1.0 · 0.2) = 4.0

We estimate W_q by simulation.

Step 1 — Single long run.

Run the simulation for 10,000 time units. The running mean of the wait in queue, computed over the interval [0, t], is plotted against t:

  • At t = 500: running mean ≈ 1.2 (the system is still filling up).
  • At t = 2,000: running mean ≈ 3.2.
  • At t = 5,000: running mean ≈ 3.8.
  • At t = 10,000: running mean ≈ 3.95.

The curve stabilises around 3.9–4.0 after about t = 1,000. The warm-up period is thus about 1,000 time units.

Step 2 — Replication with warm-up.

Run 20 independent replications, each for 5,000 time units, discarding the first 1,000 time units as warm-up. In each replication, compute the mean wait over the interval [1000, 5000].

Replication results (extract)
Replication Mean wait in queue
13.87
24.12
33.95
……
203.98

Step 3 — Compute summary statistics.

Mean across replications:        Ȳ = 3.97
Standard deviation across reps:  s = 0.24
Standard error:                  SE = s / √20 = 0.054
95% CI:                          Ȳ ± t_{19, 0.975} · SE
                                    = 3.97 ± 2.093 · 0.054
                                    = 3.97 ± 0.11
                                    = [3.86, 4.08]

The 95% confidence interval contains the true mean wait of 4.0.

Step 4 — Compare against theory.

The simulated mean wait of 3.97 with 95% CI [3.86, 4.08] is consistent with the theoretical value of 4.0. The simulation is verified.

Step 5 — Sensitivity to warm-up length.

Repeat the analysis with warm-up lengths of 0, 500, 1,000, and 2,000 time units. The results:

Sensitivity to warm-up length
Warm-up W Estimated mean wait Comment
02.42Warm-up bias present
5003.71Bias mostly removed
1,0003.97Close to theoretical
2,0003.98Stable

With W = 0, the estimate is biased downward by more than 40 percent. With W = 500, the bias is much reduced. With W ≥ 1,000, the estimate is stable.

The example demonstrates the importance of warm-up removal and the value of checking the estimate's sensitivity to the warm-up length.

6 Verification check

Checks to perform

  • Plot the running mean. The curve should stabilise. If it is still trending at the end, the run is too short or the warm-up period is too long.
  • Test sensitivity to the warm-up length. Recompute the performance measure with several values of W. The estimate should be stable for large enough W.
  • Use independent seeds across replications. Each replication must start from a different seed, or the replications are not independent.
  • Check the number of replications. Use at least 10; more if the variance across replications is high.
  • Compare against an analytical result where available. For M/M/1 and other simple queueing systems, the theoretical mean wait is known.
  • Check the confidence interval width. If the interval is too wide for the decision, more replications are required.

7 Interpretation

Output analysis is what separates a serious simulation study from a "run the model once and report the number" exercise. The output of a discrete-event simulation is a collection of time series; extracting a meaningful performance measure from those time series requires explicit choices about warm-up, replication, and confidence intervals.

Three interpretive points:

  • The simulation result is a distribution, not a number. The point estimate should always be accompanied by a confidence interval.
  • Warm-up is not optional. A steady-state simulation run without warm-up removal will systematically understate congestion-related measures.
  • The choice of design depends on the purpose. A terminating simulation uses different techniques from a steady-state simulation. The purpose determines the design.

Reporting template

A complete report of a DES study states: the model specification, the simulation length per replication, the warm-up length, the number of replications, the seeds used, the estimated performance measure with its standard error, and a 95% confidence interval. The claim-support scope of the model is also stated.

8 Uncertainty and limitations

Output analysis addresses a specific source of error: the effect of the simulation's artificial initial state. It does not address other sources of uncertainty.

Sources of error in DES output
Source Addressed by output analysis?
Warm-up bias Yes, via warm-up removal
Sampling error across replications Yes, via confidence intervals
Autocorrelation within a run Partially, via replication
Model form error No
Arrival or service distribution error No
Parameter estimation error No

Narrow confidence intervals do not imply a correct model

A narrow confidence interval means the simulation is precise. It does not mean the simulation is accurate. If the arrival process or service distribution is misspecified, the simulation converges confidently to the wrong answer.

9 Common implementation errors

Watch for these

  • Not removing warm-up. The single most common error. It biases congestion-related measures downward, often by substantial margins.
  • Choosing the warm-up period without checking it. A warm-up of 10 percent of the run is a rule of thumb, not a principled choice. Always verify against the running-mean plot.
  • Using the same seed for all replications. This produces identical runs, which are not independent. Use a different seed for each replication.
  • Too few replications. Fewer than 10 replications rarely provide a reliable standard error.
  • Ignoring autocorrelation. Time series from a single run are correlated. Treating them as independent samples understates the standard error.
  • Reporting a point estimate without a confidence interval. The point estimate alone conceals the simulation's uncertainty.
  • Confusing a terminating simulation with a steady-state simulation. Terminating simulations measure the transient as part of the result; steady-state simulations must discard it.

10 Independent modelling task

Your turn

  1. Use the discrete-event simulation from Lesson 2's task, or build a new one for a single-server queue.
  2. Run a single long simulation (10,000 time units). Plot the running mean of the wait in queue against time. Identify the point at which the running mean stabilises.
  3. Choose a warm-up period W based on the plot.
  4. Run 20 independent replications, each for 5,000 time units, discarding the first W units in each.
  5. Compute the mean and standard deviation of the wait-in-queue across replications. Construct a 95% confidence interval.
  6. Test sensitivity to W: recompute with W = 0, W/2, W, 2W. Discuss the effect.
  7. Compare against the analytical M/M/1 value if the queue is an M/M/1 queue.
  8. Write a one-page output-analysis report.

This exercise completes Laboratory 10 and provides the output analysis component of Assignment 5.

11 Reflection prompt

Reflect before continuing

A simulation produces a mean wait of 4.2 with a 95% confidence interval of [4.1, 4.3]. Does this mean the model is correct?

Two or three sentences. Consider the difference between simulation precision and model validity.

12 Lesson summary

Key takeaways

  • A discrete-event simulation begins in an artificial state. The initial transient is not representative of steady-state behaviour and must be discarded for steady-state studies.
  • The warm-up period is chosen by inspecting the running mean. Common practice is 10–20 percent of the run, but this must be verified.
  • Replication with independent seeds provides a valid standard error. At least 10 replications are needed; more if the variance across replications is high.
  • The 95% confidence interval is Ȳ ± t · s / √R. Report it alongside the point estimate.
  • Narrow confidence intervals do not imply a correct model. Output analysis addresses sampling variability, not model form.

Module 5 complete

You have modelled stochastic state transitions with Markov chains, constructed and simulated discrete-event systems, and analysed their output with proper attention to warm-up and uncertainty. Module 6 turns to linear programming, duality, and sensitivity.

§ Self-quiz, practice, and homework

Self-quiz

Q1

Warm-up bias arises because:

Show answer

The simulation begins in an artificial state that is not representative of steady state.

Q2

The warm-up period is:

Show answer

The initial period of the simulation that is discarded.

Q3

Replication with independent seeds is used because:

Show answer

It provides a valid standard error by making the replications independent.

Q4

A terminating simulation:

Show answer

Has a natural termination point, so warm-up is part of what is being measured.

Q5

The 95% confidence interval for a steady-state measure uses which distribution?

Show answer

Student's t with R − 1 degrees of freedom. The t distribution accounts for the finite number of replications.

Practice exercises

  1. For 20 replications with mean 4.0 and standard deviation 0.25, compute the standard error and the 95% confidence interval.
  2. For a target confidence-interval half-width of 0.1 with s = 0.25, compute the required number of replications.
  3. Sketch the running-mean plot you would expect for a simulation that starts empty and eventually reaches steady state. Mark the warm-up period.
  4. Distinguish between a terminating simulation and a steady-state simulation. Give one example of each.

Homework problems

  1. Warm-up study. For a single-server queue of your choice, run a long simulation and plot the running mean of the wait in queue. Identify the warm-up period. Recompute the performance measure with several values of W and identify the point at which the estimate stabilises. 500–700 words.
  2. Replication study. Run 30 independent replications of the same queue with a chosen warm-up period. Compute the mean, standard deviation, standard error, and 95% confidence interval of the mean wait. Compare against the theoretical value if the queue is M/M/1.
  3. Coverage study. Repeat the replication study 50 times with different seed sets. Compute the 95% confidence interval each time. Count how many intervals contain the theoretical mean. Is the empirical coverage close to 95%?

Mini project

Produce a complete output-analysis report for a discrete-event simulation. Include: the model specification, the warm-up study, the replication design, the estimated performance measure with a 95% confidence interval, and the sensitivity of the estimate to the warm-up length. Submit the spreadsheet and the report. This completes Laboratory 10 and the output-analysis component of Assignment 5.

👤