In the print dialog, choose "Save as PDF" as the destination.
Modeling and Simulation - Lesson 4
Estimate parameters from data, test a candidate distribution and measure dependence: Exercise 4 solved step by step.
E, Var, Cov and Cor for jointly continuous variablesPart 1
Six questions, four jobs
| Job | Questions |
|---|---|
| Estimate parameters from data | Q1, Q3 |
| Test a candidate distribution | Q4 |
| Check dependence | Q2, Q5 |
| Measure correlation | Q5, Q6 |
Part 2
Q1: arrivals recorded for 100 days
Question 1
10 minutes for example), arrivals are recorded100 days, classified by arrivals per dayQuestion 1
| m | Frequency f | f × m | f × m² |
|---|---|---|---|
| 0 | 12 | 0 | 0 |
| 1 | 10 | 10 | 10 |
| 2 | 19 | 38 | 76 |
| 3 | 17 | 51 | 153 |
| 4 | 10 | 40 | 160 |
Question 1
| m | Frequency f | f × m | f × m² |
|---|---|---|---|
| 5 | 8 | 40 | 200 |
| 6 | 7 | 42 | 252 |
| 7 | 5 | 35 | 245 |
| 8 | 5 | 40 | 320 |
| 9 | 3 | 27 | 243 |
Question 1
| m | Frequency f | f × m | f × m² |
|---|---|---|---|
| 10 | 3 | 30 | 300 |
| 11 | 1 | 11 | 121 |
| Total | 100 | 364 | 2080 |
Question 1
Question 1
Q1
Part 3
Q2: a joint probability function
Question 2
x = 0, 1, 2y = 0, 1, 2, 3p(x, y) = 0Question 2
Question 2
Question 2
Question 2
| Point | p(x, y) | Product | Match |
|---|---|---|---|
| (0, 0) | 0 / 150 | 3 / 150 | No |
| (1, 2) | 15 / 150 | 15 / 150 | Yes |
| (2, 3) | 25 / 150 | 28 / 150 | No |
Part 4
Q3: the rate of return on 10 investments
Question 3
18.8, 27.9, 21, 6.1, 37.45, 22.9, 1, 3.1, 8.3Question 3
| x | ln x | x | ln x |
|---|---|---|---|
| 18.8 | 2.9 | 5 | 1.6 |
| 27.9 | 3.3 | 22.9 | 3.1 |
| 21 | 3 | 1 | 0 |
| 6.1 | 1.8 | 3.1 | 1.1 |
| 37.4 | 3.6 | 8.3 | 2.1 |
Question 3
Question 3
Q3
Part 5
Q4: is the arrival data Poisson?
Question 4
Q1: n = 100 daysH0: the data is Poisson distributedα = 3.64Question 4
f(x) applies at x = 0, 1, 2, ...f(x) = 0E is the frequency expected if H0 is trueQuestion 4
Q4: the two values
Question 4
| x | Observed O | f(x) | Expected E |
|---|---|---|---|
| 0 | 12 | 0.0263 | 2.6 |
| 1 | 10 | 0.0956 | 9.6 |
| 2 | 19 | 0.1739 | 17.4 |
| 3 | 17 | 0.2110 | 21.1 |
| 4 | 10 | 0.1920 | 19.2 |
Question 4
| x | Observed O | f(x) | Expected E |
|---|---|---|---|
| 5 | 8 | 0.1398 | 14.0 |
| 6 | 7 | 0.0848 | 8.5 |
| 7 | 5 | 0.0441 | 4.4 |
| 8 | 5 | 0.0201 | 2.0 |
| 9 | 3 | 0.0081 | 0.8 |
Question 4
| x | Observed O | f(x) | Expected E |
|---|---|---|---|
| 10 | 3 | 0.0030 | 0.3 |
| 11 | 1 | 0.0010 | 0.1 |
Question 4
| Interval x | O | E |
|---|---|---|
| 0, 1 | 12 + 10 = 22 | 2.6 + 9.6 = 12.2 |
| 7 to 11 | 17 | 7.6 |
Question 4
| Interval x | O | E | (O - E)² / E |
|---|---|---|---|
| 0, 1 | 22 | 12.2 | 7.87 |
| 2 | 19 | 17.4 | 0.15 |
| 3 | 17 | 21.1 | 0.80 |
| 4 | 10 | 19.2 | 4.41 |
| 5 | 8 | 14.0 | 2.57 |
Question 4
| Interval x | O | E | (O - E)² / E |
|---|---|---|---|
| 6 | 7 | 8.5 | 0.26 |
| 7 to 11 | 17 | 7.6 | 11.63 |
Question 4
Question 4
k = 7: the class intervals after combinings = 1: the number of estimated parametersα = 0.05: the level of significanceQuestion 4
The full table is on the lesson page
| ν | χ² 0.025 | χ² 0.05 | χ² 0.10 |
|---|---|---|---|
| 3 | 9.35 | 7.81 | 6.25 |
| 4 | 11.14 | 9.49 | 7.78 |
| 5 | 12.8 | 11.1 | 9.2 |
| 6 | 14.4 | 12.6 | 10.6 |
| 7 | 16.0 | 14.1 | 12.0 |
Question 4
Q4: the statistic
The chi-square table
Part 6
Q5: dependence, covariance and correlation
Question 5
0 ≤ x ≤ 1 and 1 ≤ y ≤ 2; otherwise f(x, y) = 0X and YE(X), Var(X), E(Y), Var(Y), Cov(X, Y) and Cor(X, Y)Question 5
Question 5
Question 5
Question 5
Question 5
Question 5
Question 5
Question 5
Question 5
Question 5
Question 5
Q5
Question 5
Question 5
Part 7
Q6: lead time and demand
Question 6
X1: average lead time, in months. X2: annual demand. 10 years.
| X1 | X2 | X1 | X2 |
|---|---|---|---|
| 6.5 | 103 | 6.9 | 104 |
| 4.3 | 83 | 5.8 | 106 |
| 6.9 | 116 | 7.3 | 109 |
| 6 | 97 | 4.5 | 92 |
| 6.9 | 112 | 6.3 | 96 |
Question 6
Question 6
Question 6
Question 6
Question 6
Q6
Part 8
and practice
f m², not (f m)²x!k - s - 1, with k counted after combiningH0 is rejectedQ2: compare p(x, y) with the product of the two distributions at (2, 0)Q4: compute f(2) and E from the formulaQ4: repeat the decision at α = 0.01Q5: integrate f(x, y) over its whole rangeQ3: repeat with logarithms at two decimalsΣ f m, the variance uses Σ f m²E = n f(x), combine small intervals, compare at k - s - 1Var(X) is E(X²) minus [E(X)]², and Cov is E(XY) minus E(X)E(Y)Cor = Cov / (σ1 σ2): close to 1 means strongly positiveMahmoud Abas|Input Modeling: Estimation, Testing and Correlation