You are on page 1of 5

Assignment 4

(Statistical Models in Simulation)


1. Choose an event
Event: Service time at Burger King Melaka
Time period: 7.58 pm 10.00 pm
2. Collect 60 data of the event
Customer
No.

Inter-arrival
Time(mins)

Service Time
(seconds)

Customer
No.

Inter-arrival
Time(mins)

Service Time
(seconds)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

7:58 PM
7:59 PM
8:00 PM
8:01 PM
8:02 PM
8:04 PM
8:05 PM
8:07 PM
8:08 PM
8:10 PM
8:11 PM
8:12 PM
8:14 PM
8:15 PM
8:16 PM
8:18 PM
8:20 PM
8:21 PM
8:23 PM
8:24 PM
8:25 PM
8:26 PM
8:28 PM
8:29 PM
8:31 PM
8:32 PM
8:33 PM
8:34 PM
8:36 PM
8:37 PM

107
33
70
57
68
54
46
51
47
82
88
62
29
47
59
64
39
91
63
98
48
56
43
69
39
42
50
57
66
78

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

8:38 PM
8:49 PM
8:58 PM
9:00 PM
9:02 PM
9:04 PM
9:05 PM
9:08 PM
9:10 PM
9:11 PM
9:14 PM
9:16 PM
9:17 PM
9:19 PM
9:23 PM
9:24 PM
9:30 PM
9:31 PM
9:32 PM
9:33 PM
9:34 PM
9:36 PM
9:37 PM
9:39 PM
9:40 PM
9:42 PM
9:43 PM
9:44 PM
9:46 PM
9:48 PM

60
48
44
40
55
47
63
89
52
99
60
77
45
51
77
82
90
101
43
44
43
50
78
34
51
41
52
48
42
44

3. Plot the distribution for the data


i) Rearrange the data of service time from smaller to bigger and list the frequency.
Service time
29
33
34
39
40
41
42
43
44
45
46
47
48
50
51
52
54
55
56
57

Frequency
1
1
1
2
1
1
2
3
3
1
1
3
3
2
3
2
1
1
1
2

Service time
59
60
62
63
64
66
68
69
70
77
78
82
88
89
90
91
98
99
101
107
Total Customer

Frequency
1
2
1
2
1
1
1
1
1
2
2
2
1
1
1
1
1
1
1
1
60

ii) To find the cell boundaries and cell midpoint.


Range Determination
R = X h- Xl

R= range

Xh = highest number

Xl = lowest number

Thus, R= 107 29
= 78
Cell Interval
i=
R / ( 1 + 3.322 log n)
=
78/ ( 1 + 3.322 log 60)
= 11.29
Cell Midpoints
MPl = Xl + (i/2)
= 29 + (11.29/2)
= 34.645
CELL BOUNDARIES
29-40.29
40.3-51.59

MPl = midpoint for lowest cell


CELL MIDPOINT
34.645
45.945

FREQUENCY
6
22

51.60-62.89
62.90-74.19
74.20-85.49
85.5-96.79
96.8-108.09

57.245
68.545
79.845
91.145
102.445
TOTAL

11
7
6
4
4
60

iii) Create the histogram from the frequency.

iv) Create the distribution pattern of data.

4. Analyse and discuss the distribution pattern that seems to be closely describing the
plotted data.

After the data is plotted, we can see that this graph have a Poisson distribution. It expresses the
probability that a number of events occurring in the period of time. Poisson mean models the
number of independent events that occur in a fixed amount of time or space.
5. Calculate (estimate) the relevant parameters for the selected distribution pattern.
By using formula, we can get the mean:

X=355360

X=59.2167

So, the parameter is and the suggested estimator = X or = 59.2167.

To test the model fitness, we must use Chi-square test. The hypothesis of a chi-square test is:
H0: The random variable, X, conforms to the distributional assumption with the
parameter(s) given by the estimate(s).
H1: The random variable X does not conform.
The pmf for the distribution was given
px=e-aaxx!, x=0,1,2.. &0, otherwise
By using the new = X = 133/60 = 2.217, n = 60.
p(0) = 0.11
p(1) = 0.242
p(2) = 0.268
p(3) = 0.198
p(4) = 0.11
p(5) = 0.049
p(6) = 0.018
The value of Ei is given by np(0) = 60(0.11) = 6.6. Since Ei = 3.1, 1.1 < 5, E4,5,6 are combined.

Xi
0
1
2
3
4
5
6
Total

Observed
Frequency
Oi
6
22
11
7
6
4
4
60

XiOi
0
22
22
21
24
20
24
133

Expected
Frequency
Ei
6.6
14.5
16.2
11.9
6.6
3.1
1.1
60

(Oi Ei)2
Ei
0.055
3.879
1.669
2.018
0.948
8.569

The calculated X02= 8.569. The degree of freedom for tabulated value of X 2 is k s 1 = 5 1
1 = 3. Here, s = 1, since one parameter, a, was estimated from the data. At the level of
significance 0.05, the critical value X0.05,32 = 7.81.
X02= 8.569 > X0.05,32 = 7.81.
Thus, Ho would be rejected at level significance 0.05. The analyst, therefore, might want to
search for better-fitting model or use the empirical distribution of the data.

You might also like