Simulation Output Analysis
Bruno Tuffin
INRIA Rennes - Bretagne Atlantique
PEV: Performance EValuation M2RI - Networks and Systems Track Rennes
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 1 / 47
Simulation Output Analysis Bruno Tuffin INRIA Rennes - Bretagne - - PowerPoint PPT Presentation
Simulation Output Analysis Bruno Tuffin INRIA Rennes - Bretagne Atlantique PEV: Performance EValuation M2RI - Networks and Systems Track Rennes Bruno Tuffin (INRIA) Output Analysis PEV - 2010 1 / 47 Outline Introduction 1 Very basic
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 1 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 2 / 47
1
2
3
4
5
6
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 3 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 4 / 47
◮ 2 different simulations give 2 different results; ◮ We need, and there exist efficient tools providing an idea of the error.
◮ Example: opinion polls in media. Bruno Tuffin (INRIA) Output Analysis PEV - 2010 5 / 47
◮ It means that we can only say that µ is in (A, B) with probability
◮ No insurance that it is true (100α% chances to be out of it). ◮ We can increase the confidence level 1 − α, but at the expense of the
◮ Usually, the more we simulate, the smaller the interval width.
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 6 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 7 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 8 / 47
◮ 1 − α = 90% gives z1−α/2 = 1.64, ◮ 1 − α = 95% gives z1−α/2 = 1.96, ◮ 1 − α = 99% gives z1−α/2 = 2.58. Bruno Tuffin (INRIA) Output Analysis PEV - 2010 9 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 10 / 47
n
i − n(¯
i=1 Xi, and the other for n i=1 X 2 i .
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 11 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 12 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 13 / 47
1
2
3
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 14 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 15 / 47
◮ Use a sample of size n0 (typically n0 ≥ 50), estimate σ2, then compute
ε2
◮ Then generate a sample of size n, for which absolute error should
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 16 / 47
◮ Use a sample of size n0 (typically n0 ≥ 50), estimate σ2, then compute
¯ Xn0ε2
◮ Then generate a sample of size n, for which absolute error should
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 17 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 18 / 47
◮ Transient measures, which look at a system evolving over a finite time.
◮ Steady-state measures which look at a system evolving over an infinite
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 19 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 20 / 47
◮ a pre-specified sample size n ◮ a pre-spcecified absolute or relative error ε ◮ a pre-specified CPU budget c.
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 21 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 22 / 47
◮ Replication-deletion techniques ◮ Regenerative techniques ◮ Batch Means techniques ◮ Standardized Time Series techniques Bruno Tuffin (INRIA) Output Analysis PEV - 2010 23 / 47
◮ Ex: Xi Number of users of a wifi spot in day i.
◮ Ex: Xt number of customers in a queue at time t. ◮ How is is computed in practice? Just look at instants
m−1
ti .
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 24 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 25 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 26 / 47
◮ An M/M/1 queue is a regenerative process: entrance in any specific
◮ Even an M/G/1 queue is a regenerative process, entrance time into the
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 27 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 28 / 47
◮ µ ≈ ¯
◮ Var(Y1) ≈
1 n−1
i=1(Yi − ¯
◮ Var(Z1) ≈
1 n−1
i=1(Zi − ¯
◮ Cov(Y1, Z1) ≈
1 n−2
i=1(Yi − ¯
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 29 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 30 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 31 / 47
◮ A tendency to yield a wider confidence interval ◮ statistical fluctuations for the confidence interval d not diminish
◮ A tendency to under-estimate the variance Bruno Tuffin (INRIA) Output Analysis PEV - 2010 32 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 33 / 47
◮ Remind that standard Brownian motion is W = (W (t))t≥0 such that
◮ Standard Brownian bridge: a standard Brownian motion, but
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 34 / 47
◮ Separate X1, . . . , Xn in k = n/b blocks of size b. ◮ For n sufficiently large, the Ai = b−1
j=0 ((n + 1)/2 − j)X(i−1)b+j
◮ An estimator of E[A2] is
A =
k
i .
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 35 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 36 / 47
◮ to reduce the variance of a single replication ◮ or to reduce the average time to generate such a replication.
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 37 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 38 / 47
j=1Cj.
1 , · · · , X (j) nj
k
k
k
nj
i
k
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 39 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 40 / 47
◮ reliability analysis (ex: computer systems, a network, a nuclear plant) ◮ finance ◮ ruin of an insurance company ◮ collisions in air traffic management ◮ Telecommunications (loss of some kind of packets...) Bruno Tuffin (INRIA) Output Analysis PEV - 2010 41 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 42 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 43 / 47
◮ In the setting of computing an integral, it just consists in a chnage of
◮ Ex: for an M/M/1 queue, if trying to look at the probability that the
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 44 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 45 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 46 / 47
Bruno Tuffin (INRIA) Output Analysis PEV - 2010 47 / 47