You are on page 1of 5

John Mora Carrillo

SIMULATION

HOMEWORK 3 CHAPTER 3
ANALYSIS OF SIMULATION INPUT

1. The time required for 50 different employees to compute and record the number of hours worked during
the week was measured, with the following result in minutes:

Employee Time (min) Employee Time (min)


1 1.88 26 0.04
2 0.54 27 1.49
3 1.90 28 0.66
4 0.15 29 2.03
5 0.02 30 1.00
6 2.81 31 0.39
7 1.50 32 0.34
8 0.53 33 0.01
9 2.62 34 0.10
10 2.67 35 1.10
11 3.53 36 0.24
12 0.53 37 0.26
13 1.80 38 0.45
14 0.79 39 0.17
15 0.21 40 4.29
16 0.80 41 0.80
17 0.26 42 5.50
18 0.63 43 4.91
19 0.36 44 0.35
20 2.03 45 0.36
21 1.42 46 0.90
22 1.28 47 1.03
23 0.82 48 1.73
24 2.16 49 0.38
25 0.05 50 0.48

Use the chi-square test to test the hypothesis that these service times are exponentially distributed. Let the
number of class intervals be k = 6. Use the level of significance a = 0.05.

𝐻0 : 𝑇ℎ𝑒 𝑑𝑎𝑡𝑎 𝑎𝑟𝑒 𝑛𝑜𝑟𝑚𝑎𝑙𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑒𝑑


𝐻1 : 𝑇ℎ𝑒 𝑑𝑎𝑡𝑎 𝑎𝑟𝑒 𝑛𝑜𝑡 𝑛𝑜𝑟𝑚𝑎𝑙𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑒𝑑

Grouping
Interval Oi P(Li) P(Ls) Ei Oi Ei (Oi-Ei)^2 (Oi-Ei)^2/Ei
0.010 0.925 29 0.0083 0.5356 26.3663 29 26.3663 6.9361 0.2631
0.925 1.840 9 0.5356 0.7825 12.3469 9 12.3469 11.2017 0.9073
1.840 2.755 7 0.7825 0.8982 5.7818 12 10.3510 2.7192 0.2627
2.755 3.670 2 0.8982 0.9523 2.7075
3.670 4.585 1 0.9523 0.9777 1.2679
4.585 5.500 2 0.9777 0.9895 0.5937
50 50 1.4330

𝑋 2 = 1.4330
Degrees of freedom k-s-1=1
2 2
𝑋(𝑘−𝑠−1,0.05) = 𝑋(1,0.05) = 3.84
John Mora Carrillo
Decision
2
𝑋 2 < 𝑋(𝑘−𝑠−1,0.05)

The hypothesis is not rejected with a significance of 0.05. The data are normally distributed.

2. Studentwiser Beer Company is trying to find out the distribution of the breaking strength of their glass
bottles. Fifty bottles are selected at random and tested for breaking strength, with the following results (in
pounds per square inch):

218.95 232.75 212.80 231.10 215.95


237.55 235.45 228.25 218.65 212.80
230.35 228.55 216.10 229.75 229.00
199.75 225.10 208.15 213.85 205.45
219.40 208.15 198.40 238.60 219.55
243.10 198.85 224.95 212.20 222.90
218.80 203.35 223.45 213.40 206.05
229.30 239.20 201.25 216.85 207.25
204.85 219.85 226.15 230.35 211.45
227.95 229.30 225.25 201.25 216.10

Apply test for normality.


Apply chi-square test; apply it with at least two different choices for the number of intervals.

𝐻0 : 𝑇ℎ𝑒 𝑑𝑎𝑡𝑎 𝑎𝑟𝑒 𝑛𝑜𝑟𝑚𝑎𝑙𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑒𝑑


𝐻1 : 𝑇ℎ𝑒 𝑑𝑎𝑡𝑎 𝑎𝑟𝑒 𝑛𝑜𝑡 𝑛𝑜𝑟𝑚𝑎𝑙𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑒𝑑

Grouping
(Oi-
Interval Oi Zi Zs P(Zi) P(Zs) Ei Oi Ei (Oi-Ei)^2/Ei
Ei)^2
198.400 207.340 10 -1.79 -1.03 0.0367 0.1515 5.7400 10 5.7400 18.1476 3.1616
207.340 216.280 11 -1.03 -0.26 0.1515 0.3974 12.2950 11 12.2950 1.6770 0.1364
216.280 225.220 11 -0.26 0.50 0.3974 0.6915 14.7050 11 14.7050 13.7270 0.9335
225.220 234.160 13 0.50 1.26 0.6915 0.8962 10.2350 18 14.3650 13.2132 0.9198
234.160 243.100 5 1.26 2.03 0.8962 0.9788 4.1300
50 50 4.2315

𝑋 2 = 4.2315
Degrees of freedom k-s-1=2
2 2
𝑋(𝑘−𝑠−1,0.05) = 𝑋(1,0.05) = 3.84

Decision
2
𝑋 2 > 𝑋(𝑘−𝑠−1,0.05)

The H0 is rejected with a significance of 0.05. The data are not normally distributed.
John Mora Carrillo
𝐻0 : 𝑇ℎ𝑒 𝑑𝑎𝑡𝑎 𝑎𝑟𝑒 𝑛𝑜𝑟𝑚𝑎𝑙𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑒𝑑
𝐻1 : 𝑇ℎ𝑒 𝑑𝑎𝑡𝑎 𝑎𝑟𝑒 𝑛𝑜𝑡 𝑛𝑜𝑟𝑚𝑎𝑙𝑙𝑦 𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑒𝑑

Grouping
Interval Oi Zi Zs P(Zi) P(Zs) Ei Oi Ei (Oi-Ei)^2 (Oi-Ei)^2/Ei
198.400 204.786 6 -1.79 -1.24 0.0367 0.1075 3.5400 12 10.2650 3.0102 0.2933
204.786 211.171 6 -1.24 -0.70 0.1075 0.2420 6.7250
211.171 217.557 10 -0.70 -0.15 0.2420 0.4404 9.9200 10 9.9200 0.0064 0.0006
217.557 223.943 8 -0.15 0.39 0.4404 0.6517 10.565 8 10.565 6.5792 0.6227
223.943 230.329 11 0.39 0.94 0.6517 0.8264 8.7350 11 8.7350 5.1302 0.5873
230.329 236.714 5 0.94 1.48 0.8264 0.9306 5.2100 9 7.6200 1.9044 0.2499
236.714 243.100 4 1.48 2.03 0.9306 0.9788 2.4100
50 50 1.7538

𝑋 2 = 1.7538
Degrees of freedom k-s-1=2
2 2
𝑋(𝑘−𝑠−1,0.05) = 𝑋(2,0.05) = 5.99

Decision
2
𝑋 2 < 𝑋(𝑘−𝑠−1,0.05)

The H0 is not rejected with a significance of 0.05. The data are normally distributed.

Do all the tests reach the same conclusion?


No, with 5 intervals we rejected 𝐻0 and with 7 intervals we do not reach the same conclusion.

3. The Crosstowner was a bus that cut a diagonal path from northeast Atlanta to southwest Atlanta. The time
required to complete the route was recorded by the bus operator. The bus runs from Monday through
Friday. The times of the last fifth runs, in minutes, are as follows:

92.3 92.8 106.8 108.9 106.6


115.2 94.8 106.4 110.0 90.9
104.6 72.0 86.0 102.4 99.8
87.5 111.4 105.9 90.7 99.2
97.8 88.3 97.5 97.4 93.7
99.7 122.7 100.2 106.5 105.5
80.7 107.9 103.2 116.4 101.7
84.8 101.9 99.1 102.2 102.5
111.7 101.5 95.1 92.8 88.5
74.4 98.9 111.9 96.5 95.9

• Do a scatter plot
John Mora Carrillo
• Use Stat::Fit, or any other software, and do a histogram of the best distribution

Histograma

15
frequency

10
5
0

70 80 90 100 110 120 130

The histogram reveals that the data are normally distributed

• Use Stat::Fit, or any other software, and do a Goodness of fit test, and find the best distribution

Using the rriskDistribution library from R we evaluate the data to find the best distribution. As we can see
in the diagnostic plots the data fits to normal distribution.
John Mora Carrillo

Also, the library shows us the best distribution fitted to our data.

• Use Stat::Fit, or any other software, and find the best distribution parameters

The previous analysis provides the parameters for the distribution chosen. So, the data mean and standard
deviation are 100.33 and 9.89 respectively.

You might also like