Professional Documents
Culture Documents
1 2
3 4
MEAN OF TWO ESTIMATES MEAN OF TWO ESTIMATES
• Variance: • If MX1 and MX2 both are independent
estimates obtained with simple sampling and
M X1 + M X2
Var[MX] = Var ---------------------------- = the number of samples is the same in both
2 simulations, then we get VarMX1VarMX2
1 1 and CovMX1 MX2. Hence, (6) yields
= --- Var M X1 + --- Var M X2 +
4 4 M X1 + M X2
1 Var[MX] = Var ---------------------------- =
+ --- 2Cov M X1 M X2 . (6) 2
4
1 Var M X1
= --- Var M X1 + Var M X1 = ------------------------- . (7)
4 2
5 6
7 8
COMPLEMENTARY RANDOM COMPLEMENTARY RANDOM
NUMBERS NUMBERS
• If a random value is calculated using the • If a random value is calculated by analysing a
inverse transform method, i.e., Y= F Y– 1 U , scenario, i.e., X = g(Y), then the comple-
then the complementary random number is mentary random number is given by
given by Y* = F Y– 1 1 – U . X* = g(Y*).
- The complementary random number is calculated - Correlation coefficient: X, X* Y, Y*.
in the same way also for normally distributed
random numbers generated according to the
approximative inverse transform method.
- For symmetrical distributions we get that if
Y = Y + then Y* = Y – .
- Correlation coefficient: Y, Y* U, U*.
9 10
11 12
MULTIPLE INPUTS EXAMPLE 16 - Complementary
• Generally, the input vector Y has more than
random vector
one element. The input vector Y has the three elements A, B,
• The complementary random numbers of a C. The outcomes ai, bi, ci have been randomised
vector can be created by combining the for each element, and the corresponding
original and complementary random numbers complementary random numbers, ai*, bi*, ci*,
of each element in the vector. have been calculated.
It can be noted that each scenario yi will have Enumerate the original and complementary
more than one complementary scenario. scenarios if complementary random numbers
• It is possible to apply complementary random are applied to the following elements:
numbers only to a selection of the elements in
a) A, B, C.
Y.
b) A, B.
13 14
15 16
AUXILIARY INPUTS EXAMPLE 17 - Discrete auxiliary
• It might be possible to find a subset of the
input variable
inputs, Yi, i = 1, …, J such that there is a • In example 15, the net income is correlated to
strong correlation between YE = h(Y1, …, YJ) the demand.
(where h is an arbitrary function) and X. • The correlation between the demand for an
• When it can be worthwhile to introduce YE as individual flavour and the net income is not as
an auxiliary input variable to the system, and strong as the correlation between the total
apply complementary random numbers to YE demand and the net income.
instead of Yi, i = 1, …, J. • Hence, we can introduce the auxiliary input
Dtot = Df .
fF
17 18
19 20
EXAMPLE 18 - Normally EXAMPLE 18 - Normally
distributed auxiliary input distributed auxiliary input
• Gismo Inc. is selling their products to K • The probability distribution of Dtot is calcu-
retailers, and the demand of each retailer, Dk, lated using the addition theorems for normally
is N(k, k)-distributed. distributed random variables.
• The costs of Gismo Inc. has a stronger corre- • To generate the original scenario, randomise
lation to the total demand compared to the Dtot as well as temporary values of D1, …, DK.
demand of an individual retailer. Then scale the individual retailer demands to
• Introduce the auxiliary input variable match Dtot, i.e., let
Dtot = D1+ … + DK. D tot
Dk = ---------------- D k', where D k' is the
K
j D j' temporary value.
21 22
23 24
SIMULATION PROCEDURE SIMULATION PROCEDURE
- Complementary random numbers - Complementary random numbers
• Step 3. Repeat step 1 and 2 until enough • Step 5. Test stopping rule. If not fulfilled,
scenarios have been analysed for this batch. repeat step 1–4 for the next batch.
• Step 4. Update the sums • Step 6. Calculate estimates and present
n n results.
x i and x i2
i=1 i=1
or store all samples xi (depending on the
objective of the simulation).
25 26
27 28
DAGGER SAMPLING DAGGER SAMPLING
• We have seen that a negative correlation • Consider a two-state input variable Y with the
between the outputs from different scenarios frequency function
can have a variance reducing effect.
• When the input is a two-state probability 1 – p x = A,
distribution, we can create a negative corre-
fY x = p x = B, (8)
lation by using dagger sampling instead of
complementary random numbers. 0 all other x,
where p.
• In dagger sampling, the inverse transform
method is replaced by a dagger transform
function.
29 30
31 32
EXAMPLE 20 - Dagger transform EXAMPLE 20 - Dagger transform
The random variable Y is either equal to 2 (70% Solution: Here p = 0.3 S = 3. Moreover, we
probability) or 5 (30% probability). have A = 2 and B = 5.
a) Randomise three values of Y using dagger a)
sampling and the random value U = 0.34 from a
U(0, 1)-distribution. U
b) Randomise three values of Y using dagger 0 0.5 1
sampling and the random value U = 0.94 from a y1
U(0, 1)-distribution. y2
y3
y1=2
y2=5
y3=2
33 34
35 36
CORRELATION OF DAGGER CORRELATION OF DAGGER
SAMPLES SAMPLES
• There are two possible values for the product • Moreover, we have
YiYj: AB or AA. There are two sections there E[Yi] = E[Yj] = (1 – p)A + pB.
either Yi or Yj will be transformed to B; hence,
the probability for this event is 2p. Thus, we • The covariance can now be calculated as
get Cov[Yi, Yj] = E[YiYj] – E[Yi]E[Yj] =
E[YiYj] = 2pAB + (1 – 2p)AA. = 2pAB + (1 – 2p)AA – ((1 – p)A + pB)2 =
y1 = … = = –p2(A + B)2 < 0.
y2 • The input values are negatively correlated and
y3 we can therefore expect a negative corre-
lation in the outputs too.
37 38
39 40
MULTIPLE INPUTS SIMULATION PROCEDURE
- Dagger sampling
• Alternative 3: Reset all dagger cycles at the
Y X
end of the shortest cycle. Random
U Dagger Model MX
Scenarier number
transform g(Y) Sampling
generator YS XS
Inputs
41 42
x i and x i2
i=1 i=1
or store all samples xi (depending on the
objective of the simulation).
43 44
EXAMPLE 21 - Effectiveness of EXAMPLE 21 - Effectiveness of
ICC simulation ICC simulation
Consider the same system as in example 15. Table 7 Results of ICC simulation in example 21.
Compare the true expectation values to the Expected net Risk for missed Average
probability distribution of estimates from a Simulation income [€/day] delivery [%] simulation
method time
dagger sampling simulation using 200 samples. Min Av. Max Min Av. Max [h:min:s]
45 46
VARIANCE REDUCTION
• To achieve a variance reduction, we need to
have some information of the simulated
system.
• For complementary random numbers, we
need to identify the inputs where a negative
correlation between scenarios will result in
negative correlations for one or more outputs.
• For dagger sampling, we need to identify two-
state inputs where a negative correlation
between the scenarios will result in negative
correlations for one or more outputs.
47