0% found this document useful (0 votes)
13 views

HW5 Output Analysis

1) The document provides data from a simulation of customer waiting times at a hair shop. It asks to calculate confidence intervals for the expected waiting time and 0.8 quantile and identify conservative and risky estimates. 2) Additional data is provided from a simulation of customer numbers in a queue. The document asks to calculate a 95% confidence interval for the average number of customers using the batch means method and identify its advantage over the replication method. 3) Data from a simulation of inventory policies is given and the document asks to use a paired t-test to identify the best policy and compare the best two policies.

Uploaded by

Mathabah Omer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

HW5 Output Analysis

1) The document provides data from a simulation of customer waiting times at a hair shop. It asks to calculate confidence intervals for the expected waiting time and 0.8 quantile and identify conservative and risky estimates. 2) Additional data is provided from a simulation of customer numbers in a queue. The document asks to calculate a 95% confidence interval for the average number of customers using the batch means method and identify its advantage over the replication method. 3) Data from a simulation of inventory policies is given and the document asks to use a paired t-test to identify the best policy and compare the best two policies.

Uploaded by

Mathabah Omer
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

HW 5 – OUTPUT ANALYSIS (a group of maximum 2 students)

Calculate your factor f as the very first thing in answering hw questions.

f= max [0.2, (The last two digits of your id)/100] , If individual

f=max[0.2,(75/100)]=0.75

You will use f in adjusting question data as directed in the questions BEFORE answering them

Q1. A hair shop receives about 50 customers per day on the average. We simulate the hair shop with
32 replications (each replication corresponds to a day). Average waiting times of individual customers
from each replication are given below. Answer the following questions.
a. Estimate the expected waiting time of each customer and compute a 95% confidence interval
of the expected waiting time
b. We are interested in the 0.8 quantile of average waiting times for one day operation. Compute
a point estimate and a 95% confidence interval for the 0.8 quantile.
c. What would be a conservative estimate for the average waiting time? What would be a risky
estimate for the average waiting time?

Waiting time
Rep Waiting time (Y-Ybar)^2
(sorted)
1 8.919 9.053329 3.676
2 8.228 5.372545 3.728
3 5.082 0.685791 3.921
4 7.397 2.210797 4.362
5 4.903 1.014301 4.427
6 8.811 8.415076 4.509
7 8.585 7.154956 4.587
8 4.729 1.395056 4.729
9 3.676 4.991315 4.903
10 6.721 0.657518 4.942
11 7.96 4.201988 5.063
12 9.25 11.15477 5.082
13 5.675 0.055284 5.25
14 4.942 0.937266 5.347
15 5.555 0.126114 5.552
16 4.427 2.19966 5.555
17 5.552 0.128254 5.675
18 6.427 0.26716 5.778
19 5.934 0.00057 5.805
20 6.038 0.016352 5.934
21 5.25 0.435765 5.936
22 5.347 0.31711 6.027
23 5.778 0.017457 6.038
24 4.509 1.963151 6.427
25 5.805 0.011051 6.721
26 3.728 4.76167 7.397
27 4.362 2.396691 7.96
28 4.587 1.75066 8.228
29 3.921 3.956618 8.585
30 5.936 0.00067 8.811
31 6.027 0.01366 8.919
32 5.063 0.717621 9.25
Average =
76.38022 25.6
5.910125
s2 2.463878
s 1.569674

1
a. 𝑌 ± 𝑡𝛼,𝑅−1 𝑆√1 + 𝑅
2

0.95 = 1 − 𝛼
𝛼 0.05
𝛼 = 1 − 0.95 = 0.05 , = = 0.025
2 2
2.463878 2.463878
5.910125 − 𝑡0.025,31 ∗ < 𝑌̅ < 5.910125 + 𝑡0.025,31 ∗
√31 √31
2.463878 2.463878
5.910125 − 2.040 ∗ < 𝑌̅ < 5.910125 + 2.040 ∗
√31 √31
̅
5.007373 < 𝑌 < 6.812877
b. p=0.8 ,
0.8 ∗ 31 = 25.5 ≈ 26 ⟹ 𝑝𝑜𝑖𝑛𝑡 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 = 6.721

𝑝(1 − 𝑝) 𝑝(1 − 𝑝)
𝑝𝑙 = 𝑝 − 𝑧𝛼 √ , 𝑝𝑢 = 𝑝 + 𝑧𝛼 √
2 𝑅−1 2 𝑅−1
𝑃{𝑍 < 𝑧0.025} = 1 − 0.025 = 0.975 ⟹ 𝑧0.025 = 1.96

0.8(1 − 0.8)
𝑝𝑙 = 0.8 − 1.96√ = 0.659
32 − 1

0.8(1 − 0.8)
𝑝𝑢 = 0.8 − 1.96√ = 0.9408
32 − 1
𝑅𝑝𝑙 = 32 ∗ 0.659 = 21.088 ≈ 21 , 𝑅𝑝𝑢 = 32 ∗ 0.9408 = 30.1056 ≈ 30
95% CI [5.936 , 8.585]

c. The upper bound of the 95% confidence interval for the mean can be used as a conservative
estimate of the average waiting time because it gives a higher degree of confidence that the
true mean is less than this value.
The point estimate by itself, without taking the uncertainty (confidence interval) into account,
may be a risky estimate. Because it doesn't take into consideration the unpredictability in the
data, this could be risky.

Q2. Based on a simulation result we obtained the following average number of customers in the system. Each
number represent an average over 2000 min. Assuming first two batches is under the influence of initial
conditions, find a 95% C.I. for the average number of customers in the system. (Just use batch averages like
replication averages). What is the advantage of batch means method over the replication (deletion) method?

Average number of customers in queue for 2000 min (15 batches)

4.6 6.96 10.74 10.1 8.89 9.55 9.63 7.28 9.52 12.18 12 11.68 8 6.46 7.01
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

TE+TO=2000 min, k= 13 batches of size m = (n-d)/k = using batch mean method:

First, delete the data collected during the initialization phase:

Average number of customers in queue for 2000 min (15 batches)

10.74 10.1 8.89 9.55 9.63 7.28 9.52 12.18 12 11.68 8 6.46 7.01
3 4 5 6 7 8 9 10 11 12 13 14 15
𝑘 ̅𝑗
∑𝑗=1 𝑌 𝑘
∑𝑗=1 𝑌̅𝑗
𝑌̅ = = = 9.464615385
𝑘 𝑘
𝑘 13
̅𝑗 −
(𝑌 𝑌̅ )2 ̅𝑗 − 9.464615385)2
(𝑌
𝑠2 =∑ =∑ = 3.58984359 ⟹ 𝑠 = √3.58984359 = 1.894688257
𝑘−1 13 − 1
𝑗=1 𝑗=1
95%CI:
𝑠
𝑌̅ ± 𝑡𝛼,𝑅−1 , 𝑡0.025,12 = 2.179
2 √𝑘
1.894688257 1.894688257
9.464615385 − 2.179 ∗ < 𝑤 < 9.464615385 + 2.179 ∗
13 13
9.147 < 𝑤 < 9.7822
The advantage of batch means method over the replication (deletion) method is that we remove the data
collected during the initialization phase one time.

Q3. In an inventory system simulation analysis, we compare four (S,s) inventory policies and obtained following
results in terms of the average costs per month. Each simulation is 120 months with 30 months of warm up
period?
a) Statistically speaking is there a best policy, use paired t test? (Hint: Compare the best two policies)
n=4

n=4 1 2 3 4 z z z
rep (50,30) (50,40) (100,30) (100,40) 1,2 1,3 1,4
1 412.11 405.69 419.57 398.78 6.42 -7.46 13.33
2 437.6 409.54 492.82 410.6 28.06 7.78 27
3 411.26 399.3 470.17 416.37 11.96 -58.91 -5.11
4 455.75 418.01 466.55 438.95 37.74 -10.8 16.8
Ybar 429.18 408.135 462.2775 416.175 21.045 -17.3475 13.005 𝑍̅(n)
s 21.52032 7.821443 30.75343 16.85631 14.42638 28.8644249 13.39802
̂ [𝑍̅(n)]
√𝑉𝑎𝑟
s2 463.1242 61.17497 945.7736 284.1351 208.1204 833.155025 179.507 ̂ [𝑍̅(n)]
𝑉𝑎𝑟

𝑍̅ (n)±𝑡𝑛−1,1−𝛼 √𝑉𝑎𝑟
̂ [𝑍̅(n)] ,𝛼 = 0.05
2
𝑡4−1,1−0.025 = 𝑡3,0.975 = 2.353

21.045 − 2.353√208.1204 < 𝜃1 − 𝜃2 < 21.045 + 2.353√208.1204


−12.9 < 𝜃1 − 𝜃2 < 54.99

−17.3475 − 2.353√833.155 < 𝜃1 − 𝜃3 < −17.3475 + 2.353√833.155


−85.265 < 𝜃1 − 𝜃3 < 50.57

13.005 − 2.353√179.507 < 𝜃1 − 𝜃4 < 13.005 + 2.353√179.507


−18.52 < 𝜃1 − 𝜃4 < 44.53
No best policy, because all diffrences contaions zeros
b) Statistically speaking is there a best policy, use two-sample t test?

463.1242 61.17497 2
( + )
𝑓̂1,2 = 4 4 ∗ 3 = 3.7793
463.1242 2 61.17497 2
( ) + ( )
4 4
𝛼 = 0.05, 𝑡4,0.975 = 2.132
463.1242 61.17497 463.1242 61.17497
21.045 − 2.132 ∗ √ + < 𝜃1 − 𝜃2 < 21.045 − 2.132 ∗ √ +
4 4 4 4
−3.3638 < 𝜃1 − 𝜃2 < 45.4538

463.1242 945.7736 2
( + )
4 4
𝑓̂1,3 = ∗ 3 = 5.828021021
463.1242 2
945.7736 2
( ) +( )
4 4
𝛼 = 0.05, 𝑡6,0.975 = 1.943

463.1242 945.7736 463.1242 945.7736


−17.3475 − 1.943 ∗ √ + < 𝜃1 − 𝜃2 < −17.3475 − 1.943 ∗ √ +
4 4 4 4
−53.813 < 𝜃1 − 𝜃2 < 19.118

463.1242 284.1351 2
( + )
𝑓̂1,3 = 4 4 ∗ 3 = 5.674438242
463.1242 2 284.1351 2
( ) + ( )
4 4
𝛼 = 0.05, 𝑡7,0.975 = 1.895

463.1242 284.1351 463.1242 284.1351


13.005 − 1.895 ∗ √ + < 𝜃1 − 𝜃2 < 13.005 − 1.895 ∗ √ +
4 4 4 4
−12.8959 < 𝜃1 − 𝜃2 < 38.905
No best policy, because all diffrences contaions zeros

c) Why do you think that the replication results are normally distributed and independent?
According to the Central Limit Theorem, regardless of the initial distribution of the variables, the
distribution of the sample mean of a sufficiently large number of independent, identically distributed
random variables will be roughly normally distributed.

It is assumed that the outcomes of each replication are unrelated to one another in the context of
simulation. This independence is frequently attained by making sure that identical circumstances are
followed for each replication and that the results of one replication do not influence those of another.

You might also like