1 / 32

Power 14 Goodness of Fit & Contingency Tables

Power 14 Goodness of Fit & Contingency Tables. Outline. I. Parting Shots On the Linear Probability Model II. Goodness of Fit & Chi Square III.Contingency Tables. The Vision Thing. Discriminating BetweenTwo Populations Decision Theory and the Regression Line. education. Players. Mean

Download Presentation

Power 14 Goodness of Fit & Contingency Tables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Power 14Goodness of Fit& Contingency Tables

  2. Outline • I. Parting Shots On the Linear Probability Model • II. Goodness of Fit & Chi Square • III.Contingency Tables

  3. The Vision Thing • Discriminating BetweenTwo Populations • Decision Theory and the Regression Line

  4. education Players Mean Educ Players Discriminating line Non-players Mean educ. non income mean income non Mean income Players mx = a, sx2 > sy2 my = b rx, y > 0

  5. Expected Costs of Misclassification • E CMC = C(n/p)*P(n/p)*P(p) + C(p/n)*P(n/p)*P(p) • where P(n) = 23/100 • Suppose C(n/p) = C(p/n) • then E CMC = C*P(n/p)*3/4 + C*P(p/n)*1/4 • And the two costs of misclassification will be balanced if P(p/n) =3/4 = Bern

  6. The Regression Line-Discriminant Function • Bern = 3/4 • Bern = c + b1 *educ + b2 *income • Bern = 3/4 = 1.39 - 0.0216*educ -0.0105* income, or • 0.0216*educ =0.64 - 0.0105*income • Educ = 29.63 - 0.486*income, • the regression line

  7. Lottery: Players and Non-Players Vs. Education & Income 25 Discriminant Function or Decision Rule: Bern = ¾ = 1.39 – 0.0216*education – 0.0105*income 20 15 Education (Years) 10 Legend: Non-Players Players 5 Mean-Players Mean- Nonplayers 0 0 10 20 30 40 50 60 70 80 90 100 Income ($000)

  8. II. Goodness of Fit & Chi Square • Rolling a Fair Die • The Multinomial Distribution • Experiment: 600 Tosses

  9. The Expected Frequencies

  10. The Expected Frequencies & Empirical Frequencies Empirical Frequency

  11. 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 P(n1 =1, n2 =0, n3 =0, n4 =0, n5 =0, n6 =0) = n!/ 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

  12. Chi Square: x2 =  (Oi - Ei)2 = 6.15

  13. 5 % 11.07 Chi Square Density for 5 degrees of freedom

  14. Contingency Table Analysis • Tests for Association Vs. Independence For Qualitative Variables

  15. Does Consumer Knowledge Affect Purchases? Frost Free Refrigerators Use More Electricity

  16. Marginal Counts

  17. Marginal Distributions, f(x) & f(y)

  18. Joint Disribution Under Independence f(x,y) = f(x)*f(y)

  19. Expected Cell Frequencies Under Independence

  20. Observed Cell Counts

  21. Contribution to Chi Square: (observed-Expected)2/Expected 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

  22. 5% 5.02

  23. Using Goodness of Fit to Choose Between Competing Proabaility Models • Men on base when a home run is hit

  24. Men on base when a home run is hit

  25. Conjecture • Distribution is binomial

  26. Average # of men on base Sum of products = n*p = 0.298+0.250+0.081 = 0.63

  27. Using the binomialk=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

  28. Goodness of Fit

  29. Chi Square, 3 degrees of freedom 5% 7.81

  30. Conjecture: Poisson where m=np = 0.63 • P(k=3) = 1- P(k=2)-P(k=1)-P(k=0) • P(k=0) = e-m mk /k! = e-0.63 (0.63)0/0! = 0.5326 • P(k=1) = e-m mk /k! = e-0.63 (0.63)1/1! = 0.3355 • P(k=2) = e-m mk /k! = e-0.63 (0.63)2/2! = 0.1057

  31. Goodness of Fit

More Related