In: Statistics and Probability
Suppose you ran your elevator simulation program N times with
different random number seeds to generate N independent
measurements of the average travel time
X1, X2,⋅⋅⋅, XN
a. State the correct formula for the 95% confidence interval for
the global average travel time across all N runs assuming that each
run of your simulation program was long enough to assume that the
average travel times across different runs have an i.i.d. normal
distribution. [HINT: Remember to use the t-distribution, because
your formula only has access to the sample variance.]
b. Suppose you increase the total number of runs, N, from 9 to 36. How does that affect the confidence interval in part (a), assuming the sample mean and sample variance do not change significantly.
c. Now suppose you must reduce the width of the confidence interval to 1/10th of its size when N = 36. Estimate how many additional runs of your simulation will be needed to satisfy this requirement.
Solution
Back-up Theory
Given X ~ N(μ, σ2),
100(1 - α) % Confidence Interval for μ, when σ is not known is: Xbar ± (tn- 1, α /2)s/√n ………… (1)
where
Xbar = sample mean,
tn – 1, α /2 = upper (α /2)% point of t-distribution with (n - 1) degrees of freedom,
s = sample standard deviation and
n = sample size.
Now to work out the solution,
Part (a)
Vide (1),
the correct formula for the 95% confidence interval for the global average travel time across all N runs assuming that each run of your simulation program was long enough to assume that the average travel times across different runs have an i.i.d. normal distribution
= Xbar ± (tn- 1, 0.025)s/√n Answer
Part (b)
Vide (1), width of the Confidence Interval = 2(tn- 1, α /2)s/√n
When n = 9, the width, W1 = 2 x 2.306s/3 [t8, 0.025 from standard t-distribution table]
When n = 36, the width, W2 = 2 x 2.030s/6 [t35, 0.025 Using Excel Function: Statistical TINV]
So, W2/W1 = 0.4402
=> when the sample size increases from 9 to 36,
the width of the confidence interval reduces by 56%. Answer
Part (c)
Continuing the same analysis as in Part (b), we want n such that:
{2(tn- 1, 0.025)s/√n}/(2 x 2.030s/6) = 1/10 = 0.1
Or, (tn- 1, 0.025)/√n = 0.0338
Solution to the above is obtained using Excel calculations and the value of n is 3350 Answer
Excel Calculations Details
α = 0.05 |
t = t(n - 1, α/2) |
|||
n |
n - 1 |
√n |
t |
t/√n |
36 |
35 |
6 |
2.030107915 |
0.338351 |
100 |
99 |
10 |
1.9842169 |
0.198422 |
500 |
499 |
22.36068 |
1.964729307 |
0.087865 |
1000 |
999 |
31.6227766 |
1.962341416 |
0.0620547 |
2000 |
1999 |
44.7213595 |
1.96115137 |
0.0438527 |
3000 |
2999 |
54.7722558 |
1.960755267 |
0.0357983 |
3500 |
3499 |
59.1607978 |
1.960642148 |
0.0331409 |
3400 |
3399 |
58.30952 |
1.960662108 |
0.033625 |
3,350 |
3,349 |
57.87918 |
2 |
0.033875 |
DONE