1 / 17

Class 11

Class 11. Chi-Squared Test of Independence. EMBS Section 11.3. Chi-squared GOF test. One row (column) of Observed Counts One row (column) of Expected Counts determined based on H0 All categories are equally likely (Roulette Wheel, Soccer birth months)

latika
Download Presentation

Class 11

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. Class 11 Chi-Squared Test of Independence EMBS Section 11.3

  2. Chi-squared GOF test • One row (column) of Observed Counts • One row (column) of Expected Counts determined based on H0 • All categories are equally likely (Roulette Wheel, Soccer birth months) • Categories have specified p’s (M&M colors) • #girls in 4 is binomial(n=4,p=.5) (Denmark Fams) • Expected Bin counts from NORMAL distribution (Lorex) • Calculated chi-squared, dof, chidist, pvalue, reject or not.

  3. Supermarket Survey • A random sample of 160 employees of a national Supermarket chain were asked about a proposed wage freeze. • There were two categorical variables in the resulting 160-element data set. • JOB (Stacker, Sales, Admin) • RESPONSE (favorable, unfavorable, no comment)

  4. The data set

  5. To examine the relationship between 2 categorical variables, start with a contingency table Response Are RESPONSE and JOB independent? Job

  6. H0: Response and Job are independent Response What are the expected counts given H0? Job

  7. H0: Response and Job are independent Response What are the expected counts given H0? Job (11.9)

  8. Calculate the Expected Counts under H0. Response Expected Counts if independent. Job

  9. We know what to do now with our table of Observed and Expected Counts… The calculated chi-squared statistic The sum of the distances.

  10. Calculate the table of distances.. Response Job

  11. Get the p-value Dof =(#rows-1)(#cols-1) =2*2 =4 Response P-value =Chidist(37.44,4) =1.46E-07 Job

  12. =CHITEST will do the last two steps • =CHITEST(range containing the Os, range containing the Es) • Calculates the chisquared, compares it to the chidistusing the appropriate dof, and reports the p-value. • =CHITEST(for our data) = 1.46E-07 • So…..You just have to calculate the Es. CHITEST will also work for the GOF test!!

  13. Excel Demo if time…

  14. Statistically Significant? May 13, 1999 Web posted at: 11:38 a.m. EDT (1538 GMT) (CNN) -- Young children who sleep with a light on may have a substantially higher risk of developing nearsightedness as they get older, says a new study in the journal Nature. The collaborative study of 479 children by researchers at the University of Pennsylvania Medical Center and The Children's Hospital of Philadelphia found 55 percent (of the 100) children who slept with a room light on before age 2 had myopia, or nearsightedness, between ages 2 and 16. Of the (112) children who slept with a night-light before age 2, 34 percent were myopic, while just 10 percent of children who slept in darkness were nearsighted.

  15. 1. Create the Contingency Table of Observed Counts Earlier we would have asked P(Light│Myopic) =55/120 Now we want to test H0: Sleep Conditions and Subsequent Eyesight are independent Statistically Significant =chidist(84.21,2) = 5.19E-19 H0: P(M) is equal for all three sleeping conditions.

  16. Suppose we Flip the contingency table? Calculated chi-squared = 84.21 Calculated chi-squared = P-value = 5.19E-19 P-value =

  17. Assignment 12 • Use the class data to test the independence of ATHLETE and HS STAT. • Use the Denmark Family data to test independence of “Gender Mix of first 3” and “Have 4?”

More Related