0% found this document useful (0 votes)
11 views6 pages

Take n1 30f 30 0.75 23, n2 70+30f 70+30 0.75 93 (Round) : Hw4 - Computer System Simulation Fall 2023

1) The document discusses homework assignments for a computer systems simulation course. It states that Homework 3 can be done in groups of up to 2 students, with individual students receiving a 20% bonus. 2) It presents a partial chi-square table and asks the reader to complete the chi-square test to check the goodness of fit for a normal distribution. 3) It provides two data sets and asks several questions about fitting distributions, calculating parameters, and applying chi-square tests of goodness of fit.

Uploaded by

Mathabah Omer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views6 pages

Take n1 30f 30 0.75 23, n2 70+30f 70+30 0.75 93 (Round) : Hw4 - Computer System Simulation Fall 2023

1) The document discusses homework assignments for a computer systems simulation course. It states that Homework 3 can be done in groups of up to 2 students, with individual students receiving a 20% bonus. 2) It presents a partial chi-square table and asks the reader to complete the chi-square test to check the goodness of fit for a normal distribution. 3) It provides two data sets and asks several questions about fitting distributions, calculating parameters, and applying chi-square tests of goodness of fit.

Uploaded by

Mathabah Omer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Hw4 – Computer system simulation Fall 2023

– HW3 can be done as a group of 2 students, maximum. Individual submissions will get 20%
bonusf= max [0.2, (75)/100] = max [0.2, 0.75] =0.75 , If individual

Take n1=30f=30*0.75=23, n2=70+30f =70+30*0.75=93 (round)


Q1. Following is a partial Chi-square table to check the goodness-of-fit for a normal distribution (mean=250,
standard dev. = 40), Assume that the number of data points is N=125. Complete the Chi-square test.
Note:Sum of the Oi s may not be equal to 125 in this question.

i Interval i Oi Ei = p*i = (Oi-Ei)^2/Ei


(1/10) *125
1 "-infinity" 198.74 13 12.5 (13-12.5)^2/12.5=
0.02
2 198.74 216.34 14 12.5 (14-12.5)^2/12.5=
0.18
3 216.34 229.02 17 12.5 (17-12.5)^2/12.5=
1.62
4 229.02 239.87 18 12.5 (18-12.5)^2/12.5=
2.42
5 239.87 250 13 12.5 (13-12.5)^2/12.5=
0.02
6 250 260.13 10 12.5 (10-12.5)^2/12.5=
0.5
7 260.13 270.98 16 12.5 (16-12.5)^2/12.5=
0.98
8 270.98 283.66 17 12.5 (17-12.5)^2/12.5=
1.62
9 283.66 301.26 12 12.5 (12-12.5)^2/12.5=
0.02
10 301.26 "+infinity" 20 12.5 (20-12.5)^2/12.5=
4.5
sum 125 11.88
dof = 10-2-1=7
2
𝑥0.05,7 = 14.07 > 𝑥0 = 11.88

Null Hypothesis Ho is accepted at the 0.05 level of significance. Good fit.

Q2. Using Data set 1 about the number of calls to an agent in a call centre between 9:00 AM and 11:00 AM
taken in the last 100 days (from data day 23 to day 93).

- Draw a histogram of your data and comment on if it looks like to be close to Poisson distribution or
discrete uniform distribution.
The histogram doesn’t look like normal nor possion distributions

- Assume it follows Poisson distribution, calculate lambda parameter

500
𝑋̅ = =5
100
𝜆̅ = 𝑋̅ = 5

- Apply Chi-square test to check the goodness-of-fit using the significance level = 0.05.

from data day 23 to day 93:


𝟕𝟎
√𝟕𝟎 = 𝟖. 𝟑𝟔 ≈ 𝟖 𝒕𝒐 𝟓
= 𝟏𝟒
∑𝑘𝑗=1 𝑓𝑗 𝑋𝑗 500
𝑋̿ = = =5
𝑛 100
𝐸𝑖 = 𝑛 ∗ 𝑝(𝑥𝑖) = ((𝐸𝑋𝑃(−5) ∗ (5^𝑥𝑖)/𝑥𝑖! ∗ 100

(Oi-
xi*Oi xi Oi Ei
Ei)^2/Ei
8 1 8 3.368973
18 11.79141 3.269044
20 2 10 8.422434
45 3 15 14.03739 0.066011
60 4 15 17.54674 0.369634
50 5 10 17.54674 3.245802
72 6 12 14.62228 0.470266
49 7 7 10.44449 1.135957
112 8 14 6.527804 8.553216
54 9 6 3.626558
9 5.439837 2.32999
30 10 3 1.813279
500 100 19.43992

Number of intervals = 8
Degree of freedom = k – s – 1 = 8 – 1 – 1 = 6

𝑥02 = 19.43992 > 𝑥0.05,6


2
= 12.59

Null Hypothesis Ho is rejected at the 0.05 level of significance. Not a good fit.

Q3. Using Data set 2 about the process times taken for the last 100 parts (from data part 23 to part 93).

- Draw a histogram of your data and comment on if it looks like to be close to Normal distribution

The histogram looks like normal distribution.


- Assume it follows normal distribution, calculate its parameters and draw Quantile-Quantile plot and
comment about the plot.
∑50
𝑥=1 𝑥
𝜇= = 4.0664
50
2
∑50
𝑥=1(𝑋 − 𝑋 )
̿ ∑50
𝑖=1(𝑋 𝑖 − 4.0664)
2
𝜎2 = = = 0.574564
𝑛−1 50 − 1
𝜎 = 0.758

Quantile-Quantile plot R² = 0.992


7

0
2 2.5 3 3.5 4 4.5 5 5.5 6

The points in the middle fall approximately in a straight line, the variance at the extremes (as shown
from point [2,3) and (4.8,5.5)) is higher that the middle

Draw scatter diagram (XY plot in excel) between two successive data (X axis is Xi is, Y axis is Xi+1) and
comment about the dependency of successive data points.

scatter diagram R² = 0.992


7
6
5
4
3
2
1
0
2 2.5 3 3.5 4 4.5 5 5.5 6

The correlation coefficient = 0.992, which is close to 1. it indicates that there is a strong positive
correlation, as we increase one value, the other value also increases.

- Calculate the correlation between two successive data (Xi is one column, Xi+1 is the other column of
data) and comment about the dependency of successive data points. (You can use the correlation
function of excel, or formulae given our classes.)
Correlation coefficient = 0.992

- Apply Chi-square test to check the goodness-of-fit using the significance level = 0.05. What is the p-
value of your test?
𝟕𝟎
- √𝟕𝟎 = 𝟖. 𝟑𝟔 ≈ 𝟖 𝒕𝒐 𝟓
= 𝟏𝟒
Ei = np

(Oi-
interval start interval end Oi Ei Ei)^2/Ei
0 2.640758445 4 4.6 0.078261
2.640758445 3.136691685 10 4.6 6.33913
3.136691685 3.506354088 0 4.6 4.6
3.506354088 3.774327086 8 4.6 2.513043
3.774327086 4.009345445 0 4.6 4.6
4.009345445 4.238879092 5 4.6 0.034783
4.238879092 4.485865617 0 4.6 4.6
4.485865617 4.789657262 9 4.6 4.208696
4.789657262 5.313199049 10 4.6 6.33913
5.313199049 infinity 0 4.6 4.6
46 46 37.91304

dof = 10-1-1=8

𝑥02 = 37.91304 > 𝑥0.05,8


2
= 15.51

Null Hypothesis Ho is rejected at the 0.05 level of significance. Not a good fit. p value is closest to 0, because
we reject.

Q4. Fill in the gap

- Time to failure for a computer network which fails when a computer and two backup computers fail
and each has a time to failure that is exponentially, is expected to follow Erlang distribution.
- Process time in a machining centre depends on several random factors that affect it in positive or
negative fashion is expected to follows a normal distribution.
- Manual assembly processes usually follows Weibull distribution
- Time between failures in a milling machine that fails mainly due to mechanical wear is expected to
follow normal distribution
- Life time of a microchip (single component) is expected to follow exponential distribution.
- Lead time of orders in an inventory system is expected to follow gamma distribution.
- If for a process there are clear min and maximum values, and most of the process time concentrates
around a particular value than we can expect the process time to follows triangular distribution
- Chi-square test should not be used if does not meet the assumptions of independence and normality
- Shape-wise two very flexible distributions are normal distribution and the t-distribution.

To be submitted:

- All of your answers as a word file (embed results, calculations, plots etc. from your excel file). This
word file will be graded, not excel file.
- Also submit your excel file (We might look at it, what will be graded is the word file. So you must
submit a word file)
Data Set 1

Number Number
Day of calls Day of calls
1 10 51 1
2 3 52 3
3 8 53 9
4 10 54 6
5 10 55 4
6 6 56 6
7 5 57 3
8 3 58 5
9 9 59 2
10 5 60 6
11 4 61 8
12 8 62 3
13 2 63 2
14 8 64 8
15 6 65 6
16 4 66 3
17 5 67 5
18 2 68 1
19 8 69 1
20 4 70 8
21 7 71 2
22 8 72 4
23 6 73 2
24 8 74 6
25 3 75 8
26 1 76 9
27 6 77 3
28 1 78 6
29 4 79 4
30 4 80 1
31 9 81 3
32 7 82 5
33 6 83 5
34 4 84 1
35 2 85 5
36 5 86 8
37 7 87 4
38 4 88 3
39 2 89 9
40 8 90 3
41 2 91 3
42 4 92 7
43 4 93 4
44 1 94 2
45 8 95 7
46 6 96 7
47 8 97 3
48 5 98 4
49 3 99 9
50 7 100 3
Data set 2

Process times Process


Part No (min) Part No times (min)
1 3.64 51 2.6
2 4.68 52 4.68
3 3.64 53 4.16
4 3.12 54 3.64
5 4.16 55 3.64
6 3.12 56 5.2
7 3.64 57 4.68
8 5.2 58 3.64
9 4.16 59 4.16
10 4.16 60 3.64
11 4.68 61 4.68
12 4.68 62 4.68
13 5.2 63 4.16
14 3.64 64 4.16
15 4.16 65 5.2
16 3.64 66 3.64
17 4.68 67 2.6
18 2.6 68 5.2
19 3.12 69 3.12
20 3.12 70 3.12
21 5.2 71 2.6
22 4.68 72 4.68
23 5.2 73 3.64
24 2.6 74 5.2
25 3.12 75 2.6
26 4.68 76 3.64
27 5.2 77 3.64
28 4.68 78 4.68
29 3.64 79 5.2
30 3.64 80 4.68
31 5.2 81 3.64
32 2.6 82 2.6
33 3.12 83 5.2
34 3.64 84 3.64
35 4.16 85 3.12
36 2.6 86 3.64
37 4.68 87 3.64
38 4.68 88 3.12
39 4.68 89 4.68
40 3.12 90 5.2
41 5.2 91 4.16
42 4.16 92 2.6
43 3.12 93 4.68
44 5.2 94 4.68
45 3.12 95 4.68
46 3.12 96 4.16
47 5.2 97 5.2
48 5.2 98 3.64
49 3.64 99 4.68
50 5.2 100 5.2

You might also like