Presentation is loading. Please wait.

Presentation is loading. Please wait.

Variance Reduction Techniques

Similar presentations


Presentation on theme: "Variance Reduction Techniques"— Presentation transcript:

1 Variance Reduction Techniques
Simulation

2 What is VRT? Techniques that seek to reduce variance in the response of a simulation experiment by inducing correlations between sets of data. Two approaches are described Common Random Numbers Antithetic Variates

3 Common Random Numbers By inducing positive correlation between two sets of data we can reduce variance. This can be useful when comparing two systems to see if there is a difference in their means. also known as ‘correlated sampling’ and as ‘matched streams’ or ‘matched pairs’

4 How CRN works In using CRN when one model generates a sample that is ‘high’ (in the extreme end of the distribution used) then the second model also samples a ‘high’ value; likewise when A samples ‘low’ B samples ‘low’. This induces positive correlation that reduces variance.

5 Simulation of CRN effect
Using Common Random Numbers

6 Difference between Zippy & Klunky with and without use of CRN

7 CRN vs. Paired-t There’s no conflict
The use of CRNs reduces the variance in the difference (Zi) compared with entirely independent results for A & B Z without CRN with CRN

8 How this affects comparisons
Fig 11.4 (Law & Kelton) INDEPENDENT n=20 CRN n=10 n=5 n=1 Zj

9 FlexSim: Repeat Random Streams
If deselected then every run will produce a different result because it won’t start from the same place in a stream. If selected then each run will use the same sequence of samples. Equivalent to triggering this FlexScript for every stream used: randinit(num stream, num seedvalue);

10 Initialising FlexSim streams
Done automatically for streams 0 to 99 when FlexSim opens not necessarily when you begin a run unless you program this in an OnReset trigger randinit(num stream, num seedvalue); Examples: randinit(7,0); initialise stream 7 with its default seed randinit(12,2302); initialise stream 12 with 2302 as seed Beware: if you don’t specify a stream when you sample from a distribution then FlexSim will allocate stream 0.

11 Applying CRN in FlexSim
Don’t let FlexSim allocate streams i.e. don’t do this exponential(1.0); Use the same streams for the same behaviours in each model Initialise them with the same seeds Recall, streams 0 to 99 are automatically initialised For example, if IAT is exponential with β=1.0 If system A’s IAT is specified as exponential(1.0,12); Then so too should system B’s IAT

12 Antithetic Variates When attempting to estimate the mean value of some uncertain variable in a single system we can use Antithetic Variates (AV). In this case, rather than induce positive correlation, as in the case for CRNs, we seek to induce negative correlation. Over a number of independent replications we would expect the average of two results to be a better estimate than for a single result. S2 for an average over 2 runs using AV < S2 for an average over 2 runs not using AV

13 Antithetic Variates If a normal variate is specified as U[0,1] then the AV=1-U[0,1] --is its complement. Examples Normal: 0.3, 0.4, 0.6, 0.9, 0.1 Antithetic: 0.7, 0.6, 0.4, 0.1, 0.9

14 Antithetic Variates Output from a Witness simulation model into Excel for analysis

15 Antithetic Variate procedure
The procedure when using AV is to: Make replication 1 using normal variates Repeat replication 1 using antithetic variates Calculate the average of the two runs Repeat 1-3 as many times as time and the requirements of your problem indicate If more than one replication has been made then calculate the mean across all replications Calculate the approximate confidence interval

16 FlexSim: randantithetic(num on/off)
Description: Makes number streams antithetic. Using this command, users can switch random streams to generate numbers between 1 and 0; rather than the default of 0 to 1. This is helpful for determining if random numbers are having a big affect on the results of the model. It's also useful when experimenting with massive models and there isn't sufficient time to run the model for multiple iterations as required for good statistical sampling. The user can then choose to do just one regular run and one antithetic run of the model to obtain two diametrically apposed results. These two results can be averaged for an approximation that is somewhat better than if each run of the model used random stream generators without antithetic sampling. Example: randantithetic(1);

17 Using the Script and Console Windows


Download ppt "Variance Reduction Techniques"

Similar presentations


Ads by Google