Definition · Initial transientThe initial transient is the part of a run during which the state distribution is still visibly moving away from the initial condition and toward the steady-state distribution. It is not a period of “noise”: the process is behaving correctly throughout, and it is simply not yet behaving like the system the long-run average describes.
Definition · Bias of an estimatorAn estimator T of a quantity θ has bias E[T] − θ. Bias is a property of the estimator, not of a run: it does not shrink with replications, it does not show up in a standard error, and an interval built on that standard error is centred in the wrong place.
That is the whole reason this page exists. Every technique after it attacks variance, and all of them are worthless on an estimator aimed at the wrong number. A narrow interval around a biased estimate is worse than a wide one, because it is more convincing.
The transient, as arithmetic
The number in system at the end of a slot is a Markov chain: from state n a departure happens first with probability q, then an arrival with probability p, so the chain steps to n − 1, n or n + 1, and from 0 only to 0 or 1. Starting from the point mass at zero and pushing the whole distribution forward one slot at a time gives E[Nₜ] exactly, for every t.
p = 2/5, q = 1/2, started empty
E[N₀] = 0
E[N₁] = 2/5
E[N₂] = 3/5
E[N₃] = 37/50
E[N₄] = 17/20
…
E[N₅₀] ≈ 2.0332 E[N₁₀₀] ≈ 2.2633
E[N₃₉₉] ≈ 2.3982 stationary 12/5 = 2.4
expected time average over slots 0 to 399: 2.2443
expected time average over slots 100 to 399: 2.3717
Both of those averages are exact fractions shown to four places, not rounded numbers — they are averages of finitely many rationals. The bias of the naive estimator is 2.2443 − 2.4, about −0.1557; the bias after discarding a hundred slots is about −0.0283. The discard removes roughly four fifths of what was there, and it does so in theory, before any run has been made.
Theorem · A longer run dilutes; a discard deletesLet B be the total excess or shortfall contributed by the transient. Averaging over T slots contributes B/T to the estimate, which falls like 1/T. Averaging over slots w to T instead removes the part of B that lay before w outright. Lengthening the run is therefore a 1/T effect and discarding is not.
The numbers say the same thing. At 100 slots the expected average is 1.8624, a shortfall of 0.5376; at 400 slots it is 2.2443, a shortfall of 0.1557. Four times the run divided the remaining bias by about 3.5. Discarding the first hundred of those four hundred slots takes the shortfall to 0.0283 — a further factor of about 5.5, bought with a quarter of the data rather than with four times the compute.
One run, and what it actually did
Example · Four hundred slots at seed 0The average over every slot is 169/80 = 2.1125; the average over the three hundred slots after a warm-up of one hundred is 361/150 ≈ 2.4067. The discard moved the estimate up by about 0.2942, which is the direction the theory says and rather more than the theory's 0.1274 — because one run is an observation of the expectation and not the expectation.
Reseed and the sign can change. The same settings at seed 1 give 1.3075 from slot zero and 1.2367 after the discard: the discard moved the estimate down, on a run that spent its whole length below the steady state. That is not a counterexample to the bias; it is what a single observation of a quantity with a standard error looks like, and it is exactly why the exact transient is printed beside the run rather than the run being left to make the argument.
Batch means: replications out of one run
Definition · Batch meansDiscard the warm-up, split what remains into b equal batches, and take the mean of each. A batch mean is far closer to independent of its neighbour than one slot is of the next, so the b batch means can be treated as replications: their average is the estimate and their sample variance is what an interval is built from.
On the run at seed 0 the four batches of seventy-five slots give means 34/25, 116/75, 19/25 and 149/25 — that is 1.36, 1.55, 0.76 and 5.96. Their average is 361/150, within 0.007 of the exact 12/5, and their sample variance is 10733/1875 ≈ 5.72. The point estimate could hardly be better and the four numbers behind it say the run has established almost nothing. Printing the second fact beside the first is the whole job.
That spread is also a warning about the batches themselves. A batch mean is only nearly independent of its neighbour if the batch is long compared with how fast the system forgets its state, and seventy-five slots of a queue running at 4/5 utilisation is not obviously long enough. The remedy is fewer, longer batches, and the diagnostic is to watch the batch variance as the batch count falls.