Power 14 Goodness of Fit Contingency Tables II Goodness of Fit Chi Square Rolling a Fair Die The Multinomial Distribution Experiment 600 Tosses The Expected Frequencies Outcome Probability 1 2 3 4 5 6 1 6 1 6 1 6 1 6 1 6 1 6 Expected Frequency 100 100 100 100 100 100 The Expected Frequencies Empirical Frequencies Outcome 1 2 3 4 5 6 Expected Frequencies 100 100 100 100 100 100 Empirical Frequency Expected Frequency 114 94 84 101 107 107 Hypothesis Test Null H0 Distribution is Multinomial Statistic Oi Ei 2 Ei observed minus expected squared divided by expected Set Type I Error 5 for example Distribution of Statistic is Chi Square One Throw side one comes up multinomial distribution n n P n1 1 n2 0 n3 0 n4 0 n5 0 n6 0 n n j p j n j j 1 j 1 P n1 1 n2 0 n3 0 n4 0 n5 0 n6 0 1 1 0 0 0 0 0 1 6 1 1 6 0 1 6 0 1 6 0 1 6 0 1 6 0 Chi Square x2 Oi Ei 2 6 15 Face Observed Oj Expected Ej Oj Ej 2 Ej Oj E j 1 114 100 14 196 100 1 96 2 92 100 8 64 100 0 64 3 84 100 16 256 100 2 56 4 101 100 1 1 100 0 01 5 107 100 7 49 100 0 49 6 107 100 7 49 100 0 49 Sum 6 15 0 20 DENSITY 0 15 0 10 0 05 5 0 00 0 5 10 CHI 15 11 07 Chi Square Density for 5 degrees of freedom Contingency Table Analysis Tests for Association Vs Independence For Qualitative Variables Does Consumer Knowledge Affect Purchases Frost Free Refrigerators Use More Electricity Purchase Frost Free Not Frost Free Totals Consumer Inform Cons Not Inform Totals Marginal Counts Purchase Frost Free Not Frost Free Totals Consumer Inform 540 Cons Not Inform 180 Totals 432 288 720 1 Marginal Distributions f x f y Purchase Frost Free Not Frost Free Totals Consumer Inform 0 75 Cons Not Inform 0 25 Totals 0 6 0 4 1 1 Joint Disribution Under Independence f x y f x f y Purchase Frost Free Not Frost Free Totals Consumer Inform 0 45 0 3 0 75 Cons Not Inform 0 15 0 1 0 25 Totals 0 6 0 4 1 1 Expected Cell Frequencies Under Independence Purchase Frost Free Not Frost Free Totals Consumer Inform 324 216 540 Cons Not Inform 108 72 180 Totals 432 288 720 1 Observed Cell Counts Purchase Frost Free Not Frost Free Totals Consumer Inform 314 226 Cons Not Inform 118 62 Totals 1 Contribution to Chi Square observed Expected 2 Expected Purchase Frost Free Not Frost Free Totals Consumer Inform 0 31 0 46 Cons Not Inform 0 93 1 39 Totals Upper Left Cell 314 324 2 324 100 324 0 31 Chi Sqare 0 31 0 93 0 46 1 39 3 09 m 1 n 1 1 1 1 degrees of freedom 1 Figure 4 Chi Square Dens ity One Degree of Freedom 1 0 0 8 Dens ity 0 6 0 4 0 2 5 0 0 0 2 4 6 5 02 8 10 Chi Square Variable 12 14 Conclusion No association between consumer knowledge about electricity use and consumer choice of a frost free refrigerator 1 Using Goodness of Fit to Choose Between Competing Probability Models Men on base when a home run is hit 1 Men on base when a home run is hit 0 Observed 421 Fraction 1 2 3 Sum 227 96 21 765 0 550 0 298 0 125 0 027 1 1 Conjecture Distribution is binomial 2 Average of men on base 0 1 2 3 fraction 0550 0 298 0 125 0 027 product 0 0 298 0 250 0 081 Sum of products n p 0 298 0 250 0 081 0 63 p np n 0 63 3 0 21 2 Using the binomial k men on base n of trials P k 0 3 0 3 0 21 0 0 79 3 0 493 P k 1 3 1 2 0 21 1 0 79 2 0 393 P k 2 3 2 1 0 21 2 0 79 1 0 105 P k 3 3 3 0 0 21 3 0 79 0 0 009 2 Assuming the binomial The probability of zero men on base is 0 493 the total number of observations is 765 so the expected number of observations for zero men on base is 0 493 765 377 1 2 Goodness of Fit 0 1 2 3 Sum Observed 421 227 96 21 765 binomial 377 1 300 6 80 3 6 9 764 4 Oj Ej 43 9 73 6 15 7 14 1 18 0 2 6 28 8 54 5 2 Oj Ej Ej 5 1 2 Chi Square 3 degrees of freedom 0 25 DENSITY 0 20 0 15 0 10 5 0 05 0 00 0 5 10 CHI 7 81 15 20 Conjecture Poisson where np 0 63 P k 3 1 P k 2 P k 1 P k 0 P k 0 e k k e 0 63 0 63 0 0 0 5326 P k 1 e k k e 0 63 0 63 1 1 0 3355 P k 2 e k k e 0 63 0 63 2 2 0 1057 2 Average of men on base 0 1 2 3 fraction 0550 0 298 0 125 0 027 product 0 0 298 0 250 0 081 Sum of products n p 0 298 0 250 0 081 0 63 p np n 0 63 3 0 21 2 Conjecture Poisson where np 0 63 P k 3 1 P k 2 P k 1 P k 0 P k 0 e k k e 0 63 0 63 0 0 0 5326 P k 1 e k k e 0 63 0 63 1 1 0 3355 P k 2 e k k e 0 63 0 63 2 2 0 1057 2 Goodness of Fit 0 1 2 3 Sum Observed 421 227 96 21 765 Poisson 407 4 256 7 80 9 20 0 765 Oj Ej Ej 0 454 3 44 2 82 0 05 6 76 2 2 Chi Square 3 degrees of freedom 0 25 DENSITY 0 20 0 15 0 10 5 0 05 0 00 0 5 10 CHI 7 81 15 20 Likelihood Functions Review OLS Likelihood Proceed in a similar fashion for the probit 3 Likelihood function The joint density of the estimated residuals can be written as g e 0 e 1 e 2 e n 1 If the sample of observations on the dependent variable y and the independent variable x is random then the observations are independent of one another If the errors are also identically distributed f i e i i d then 3 Likelihood function Continued If i i d then g e 0 e …
View Full Document
Unlocking...