Download presentation
Presentation is loading. Please wait.
Published byElwin Sullivan Modified over 9 years ago
1
1 Outline input analysis goodness of fit randomness independence of factors homogeneity of data Model 05-01
2
2 Chi-Square Test arbitrary data grouping possibly good fit in one but bad in other groupings
3
3 Kolmogorov-Smirnov Test advantages no arbitrary data grouping as in the Chi-square test goodness of fit test for continuous distributions universal, same criterion for all continuous distributions disadvantages not designed for discrete distributions, being distribution dependent in that case not designed for unknown parameters, biased goodness of fit decision for estimated parameters
4
4 KS Test F(x): underlying (continuous) distribution F n (x): empirical distribution of n data points F(x) & F n (x) being close in some sense define D n = sup x |F(x) - F n (x)| if D n being too large: data not from F(x)
5
5 Idea of KS Test continuous distribution F F n empirical distribution of F for n data points F (x) = p |F n (x) - F(x)| ~ |Y p - p| for Y p ~ Bin(n, p) sup x |F n (x) - F(x)| ~ sup p |Y p - p|
6
6 Test for Randomness Do the data points behave like random variates from i.i.d. random variables?
7
7 Test for Randomness graphical techniques run test run up and run down test
8
8 Background random variables X 1, X 2, …. (assumption X i constant) if X 1, X 2, … being i.i.d. j-lag covariance Cov(X i, X i+j ) c j = 0 V(X i ) c 0 j-lag correlation j c j /c 0 = 0
9
9 Graphical Techniques estimate j-lag correlation from sample check the appearance of the j-lag correlation
10
10 Run Test Does the following pattern of A and B appear to be random? AAAAAAAAAAAAAAABBBBBAAAAA Any statistical test for the randomness of the pattern? # of permutations with 20A’s & 5B’s = 53130 # of permutations with 5B’s together = 21 an event of probability 0.000395
11
11 Run Test for Two Types of Items for two types of items R: number of runs AABBBABB: 4 runs by this 8 items for n a of item A and n b of item B E(R) = 2n a n b /(n a +n b ) + 1 V(R) = if min(n a, n b ) > 10, R ~ normal
12
12 Run Test for Continuous Data (43.2, 7.4, 5.4, 25.3, 27.3, 13.9, 67.5, 35.4) sign changes: + + + 3 runs down & 2 runs up, a total 5 runs R: number of runs, for n sample values E(R) = (2n-1)/3 V(R) = (16n-29)/90 Dist(R) normal
13
13 Test for Independence It is easier to simulate a system if the classifications are independent. Are the classifications of the random quantities independent?
14
14 Tax reform Income level LowMediumHighTotal For182213203598 Against154138110402 Total3363513131000 Test for Independence for two classifications e.g., Is voting behavior independent of income levels easier to simulate for independent voting opinion and income levels 2 ╳ 3 Contingency Table
15
15 Test for Independence independent income level and opinion generate income level: 3 types (i.e., m types) generate opinion: 2 types (i.e., n types) generate an entity: 5 types (m+n types) dependent income level and opinion generate income level: 3 types (i.e., m types) generate opinion: 2 types (i.e., n types) generate an entity: 6 types (mn types) for k factors (classifications) independent: m 1 + m 2 + … + m k dependent: m 1 m 2 … m k
16
16 Test for Independence H 0 : voting opinion and income levels are independent H 1 : voting opinion and income levels are dependent
17
17 Test for Independence marginal distribution: If H 0 is true,
18
18 Test for Independence expected frequency: cell probability multiplies the total number of observations in general, the expected frequency of any cell is:
19
19 Test for Independence Observed and Expected Frequencies d.o.f. associated with the chi-squared test is Tax reform Income level LowMediumHighTotal For182(200.9)213(209.9)203(187.2)598 Against154(135.1)138(141.1)110(125.8)402 Total3363513131000 r number of rows c number of columns
20
20 dependent voting opinion and income levels Test for Independence Calculate for the r ╳ c Contingency Table reject H 0 if ; otherwise accept
21
21 Test for Homogeneity Are the entities of the same type?
22
22 Test for Homogeneity 3 ╳ 3 Contingency Table Abortion law Political affiliation DemocratRepublicIndependentTotal For827062214 Against936267222 Undecided25182164 Total200150 500 predetermined
23
23 Test for Homogeneity row (or column) totals are predetermined H 0 : same proportion in each row (or column) H 1 : different proportions across rows (or columns) analysis: same as the test of independence
24
24 H 0 : Democrats, Republicans, and Independents give the same opinion (proportion of options) H 1 : Democrats, Republicans, and Independents give different opinion (proportion of options) = 0.05 critical region: χ 2 > 9.488 with v = 4 d.o.f. computations: find the expected cell frequency Test for Homogeneity
25
25 Observed and Expected Frequencies Decision: Do not reject H 0. Abortion law Political affiliation DemocratRepublicIndependentTotal For82(85.6)70(64.2)62(64.2)214 Against93(88.8)62(66.6)67(66.6)222 Undecided25(25.6)18(19.2)21(19.2)64 Total200150 500 Test for Homogeneity
26
26 Model 5-1: An Automotive Maintenance and Repair Shop additional maintenance and repair facility in the suburban area customer orders (calls) by appointments, from one to three days in advance calls arrivals ~ Poisson process, mean 25 calls/day distribution of calls: 55% for the next day; 30% for the days after tomorrow; 15% for two days after tomorrow response missing a desirable day: 90% choose the following day; 10% leave
27
27 An Automotive Repair and Maintenance Shop service Book Time, (i.e., estimated service time) ~ 44 + 90*BETA(2, 3) min Book Time also for costing promised wait time to customers wait time = Book Time + one hour allowance actual service time ~ GAMM(book time/1.05, 1.05) min first priority to wait customers customer behavior 20% wait, 80% pick up cars later about 60% to 70% of customers arrive on time 30% to 40% arrive within 3 hours of appointment time
28
28 Costs and Revenues schedule rules at most five wait customers per day no more than 24 book hours scheduled per day (three bays, eight hours each) normal cost: $45/hour/bay, 40-hour per week overtime costs $120/hour/bay, at most 3 hours revenue from customers: $78/ book hour penalty cost each incomplete on-going car at the end of a day: $35 no penalty for a car whose service not yet started
29
29 System Performance simulate the system 20 days to get average daily profit average daily book time average daily actual service time average daily overtime average daily number of wait appointments not completed on time
30
30 Relationship Between Models Model 5-1: An Automotive Maintenance and Repair Shop a fairly complicated model non-queueing type Model 5-2: Enhancing the Automotive Shop Model two types of repair bays for different types of cars customer not on time
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.