Professional Documents
Culture Documents
Cristina Galloway
E-mail: rivech@shands.ufl.edu
Chapter 6 Content
ESI 4523 2
Time Frame of Simulations
ESI 4523 3
Terminating simulation (1)
ESI 4523 4
Terminating simulation (2)
ESI 4523 5
Steady-State Simulation
ESI 4523 6
Output analysis for Terminating simulation (1)
ESI 4523 7
Output analysis for Terminating simulation (2)
• Output Analysis
• Point estimate: summarize the sample by a single number
that is an estimate of the population parameter
• For n samples of X,
• Sample mean: 𝑋ത = ( σ 𝑋𝑖 Τ𝑛 )
• Sample variance: S2 = ( σ 𝑋𝑖 − 𝑋ത Τ 𝑛 − 1 )
ESI 4523 8
Output analysis for Terminating simulation (3)
ESI 4523 9
Confidence intervals for terminating systems (1)
𝑆 𝑆
𝑋ത − 𝑡𝑛−1,1−𝛼 ത
≤ 𝜇 ≤ 𝑋 + 𝑡𝑛−1,1−𝛼
2 𝑛 2 𝑛
𝑆
𝑡𝑛−1,1−𝛼
2 𝑛
ESI 4523 10
Half-width
ESI 4523 11
Half-width
ESI 4523 12
Confidence intervals for terminating systems (2)
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10
32.62 32.57 33.51 33.29 32.10 34.24 32.70 33.49 33.36 34.61
σ10
𝑖=1 𝑇𝑖
ത
𝑇= ≅ 33.25 0.606
𝑁 Half width = 𝑡9,1−0.05 ≅ 0.56
2 10
σ10
𝑖=1 𝑇 𝑖 − ത
𝑇 2
𝑆2 = ≅ 0.606 where 𝑡9,1−0.05 = 2.262
𝑁−1 2
ESI 4523 13
Confidence intervals for terminating systems (3)
No
ESI 4523 14
Confidence intervals for terminating systems (4)
• Interpretation of CI
Set 1
If we make a lot of sets of 10 Set 2
Set 3
replications, about 95% of these Set 4
Set 5
intervals would cover μ Set 6
Set 7
μ
ESI 4523 15
Confidence intervals for terminating systems (5)
ESI 4523 16
Confidence intervals for terminating systems (6)
ESI 4523 17
Confidence intervals for terminating systems (7)
• Approximation
ESI 4523 18
Confidence intervals for terminating systems (8)
ESI 4523 19
Replication
ESI 4523 20
Replication
ESI 4523 21
Statistical Issues with Simulation Output (1)
ESI 4523 22
Statistical Issues with Simulation Output (2)
ESI 4523 23
Statistical Issues with Simulation Output (3)
ESI 4523 24
Statistical Issues with Simulation Output (4)
ESI 4523 25
Statistical Issues with Simulation Output (5)
ESI 4523 26
Statistical Issues with Simulation Output (6)
ഥ𝒊 (a replication)
• Solution: Focus on the average 𝒚
ഥ𝟏 , 𝒚
• First, the values of 𝒚 ഥ𝟐 , …, 𝒚
ഥ𝒏 are independent each
other Different random seed
ഥ𝟏 , 𝒚
• Second, the values of 𝒚 ഥ𝟐 , …, 𝒚
ഥ𝒏 are identically
distributed
ഥ𝟏 , 𝒚
• Third, the values of 𝒚 ഥ𝟐 , …, 𝒚
ഥ𝒏 are not normally
distributed
ഥ𝒊
• But, we can use the central limit theorem because 𝒚
has a I.I.D. random value
ESI 4523 27
Statistical Issues with Simulation Output (7)
ESI 4523 28
Comparing Two Scenarios (1)
ESI 4523 29
Running Arena Without Animation
ESI 4523 30
Comparing Two Scenarios (2)
ESI 4523 31
Comparing Two Scenarios (3)
• Paired-t test
• Evaluate whether means vary over two different scenarios
• H0: The mean difference between paired observations
is zero => Both scenarios have the same characteristics
ESI 4523 32
Comparing Two Scenarios (3)
• Example
• Evaluate whether means vary over two different scenarios
Replications Y1,i Y2,i di −6
𝑑ҧ = = −1.2
1 18 22 -4 5
2 21 20 1
20.8
3 20 23 -3 𝑠𝑑 = ≅ 2.28
4
4 25 26 -1
5 23 22 1 𝑡 0.05 ≅ 2.78
4, 2
• 95% CI for the true mean difference
2.28
−1.2 + 2.78 × = 1.63
−4.03 ≤ 𝑑 ≤ 1.63 5
2.28
Accept H0 since the CI include zero −1.2 − 2.78 × = −4.03
5
ESI 4523 33
Compare Mean via Output Analyzer (1)
• Output Analyzer
• Separate application that operates on .dat files produced
by Arena
• To save output values (Expressions) of entries in Statistic
data module (Type = Output)
• Did for both Total Cost and Percent Rejected
• Will overwrite these file names next time
• .dat files are binary … can only be read by Output
Analyzer
ESI 4523 34
Compare Mean via Output Analyzer (2)
ESI 4523 35
Compare Mean via Output Analyzer (3)
ESI 4523 36
Compare Mean via Output Analyzer (4)
• Results:
ESI 4523 37
Evaluating Many Scenarios with the Process
Analyzer (1)
• With (many) more than two scenarios to compare, two
problems are
• Simple mechanics of making many parameter changes,
making many runs, keeping track of many output files
• Statistical methods for drawing reliable, useful
conclusions
ESI 4523 38
Evaluating Many Scenarios with the Process
Analyzer (2)
• PAN operates on program (.p) files
– produced when .doe file is run
(or just checked)
• Start PAN from Arena (Tools >
Process Analyzer) or via Windows
• PAN runs on its own, separate
from Arena
ESI 4523 39
Evaluating Many Scenarios with the Process
Analyzer (3)
• Create a scenario in PAN
• Load a program (.p) file
• Set of input controls that
you choose
• Chosen from Variables and
Resource capacities – think
ahead
• You fill in specific numerical
values
ESI 4523 40
Evaluating Many Scenarios with the Process
Analyzer (4)
• Create a scenario in PAN (Cont’d)
• Set of output responses that
you choose
• Chosen from automatic Arena
outputs or your own Variables
• Values initially empty … to be
filled in after run(s)
• Duplicate (right-click,
Duplicate) scenarios, then edit
for a new one
ESI 4523 41
Evaluating Many Scenarios with the Process
Analyzer (5)
• PAN Projects and Runs
• Program files can be the same .p file, or .p files from
different model .doe files
• Controls, responses can be the same or differ across
scenarios in a project – usually will be mostly the same
• Think of a project as a collection of scenario rows – a table
• Can save as a PAN (.pan extension) file
ESI 4523 42
Evaluating Many Scenarios with the Process
Analyzer (6)
• Select scenarios in project to run (maybe all)
• PAN runs selected models with specified controls
• PAN fills in output-response values in table
• Equivalent to setting up, running them all “by hand” but
much easier, faster, less error-prone
ESI 4523 43
Evaluating Many Scenarios with the Process
Analyzer (7)
• Create 7 scenarios
• Controls • Responses
• Trunk line • Total Cost
• New tech 1, 2, and 3 • Percent Rejected
• New Tech All
• New Sales
ESI 4523 44
Evaluating Many Scenarios with the Process
Analyzer (8)
• Create a chart in PAN
• Select Total Cost column, Insert > Chart (or or right-
click on column, then Insert Chart)
• Chart Type: Box and Whisker
• Next, Total Cost; Next defaults
• Next, Identify Best Scenarios
• Smaller is Better, Error
Tolerance = 0 (not the default)
• Show Best Scenarios; Finish
ESI 4523 45
Evaluating Many Scenarios with the Process
Analyzer (9)
• Vertical boxes: 95% confidence
intervals
• Red scenarios statistically
significantly better than blues
• More precisely, red
scenarios are 95% sure to
contain the best one
Numerical values (including C.I. • Narrow down red set –
half widths) in chart – right click
on chart, Chart Options, Data more replications, or Error
So which scenario is “best”? Tolerance > 0
(Criteria disagree) Reduce risk
Combine them somehow?
ESI 4523 46