1 / 12

Topic 8

Topic 8. Association between Two Qualitative Variables: Chis-quare Test. Example. This is called a (2-way) contingency table .

naiara
Download Presentation

Topic 8

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. Topic 8 Association between Two Qualitative Variables: Chis-quare Test

  2. Example This is called a (2-way) contingency table. • Daniel B Mark (1994, NEJM) reported quality of life of patients in Canada and the United States. The study looked at many outcomes a year after the heart attack. There was no significant difference in the patients’ survival rate. Another key outcome was the patients’ own assessment of their quality of life relative to what it had been before the heart attack. Here are the data for the patients who survived a year:

  3. Questions Regarding the Previous Example • Identify two variables from the example. Are they qualitative? Which one is the response variable? Which is the explanatory variable? • Find the distribution of quality of life for patients from Canada. • Find the distribution of quality of life for patients from US. • Is there a significant difference between the two distributions?

  4. Layout of a r x c Contingency Table • A contingency table, having r rows and c columns—rc total cells, looks like this:

  5. Expected Counts in Two-Way Tables

  6. Expected Counts for the Quality of Life Example Keep at least 2 decimal places!!

  7. The Chi-square Test of Homogeneity H0: Homogeneity Against H1: Not Test Statistic P-value • Found with chi-square table using degrees of freedom = (r – 1)(c – 1) r is the number of rows and c is the number of columns • Chi-square tests are always right-sided and P-value is the area of the right tail under the chi-square curve beyond the value of the test statistic. Where O for observed cell frequency and E for expected cell frequency.

  8. Example: Quality of Life • Test the claim that the distribution of quality of life is the same in Canada and the United States. Use a chi- square test at a significance level of 0.05.

  9. The Chi-square Test for Goodness-of-Fit • H0: p1 = p10 , p2 = p20 , …,pk= pk0 against H1: at least one pi ≠ pi0 (called Goodness-of-Fit Test) • Test Statistic where k = number of categories, and Ei = npi0, called expected counts. • P-value Large values of the test statistic suggests rejection of the null hypothesis, so goodness-of-fit tests are always right-tailed and P-value is the area of the right tail under the chi-square curve beyond the value of the test statistic.

  10. Example: Goodness-of-Fit Test • Toss a die 300 times with the following results. Is the die fair or biased? • We test: H0: p1= p2 = … = p6 = 1/6 (die is fair) H1: at least one pi is different from 1/6 (die is biased)

  11. Example: Fisher’s Reexamination of Mendel’s Data • Mendel crossed 556 smooth, yellow male peas with wrinkled, green female peas. According to now established genetic theory, the relative frequencies of the progeny should be as given in the following table. Observed Type Counts Smooth yellow 315 Smooth green 108 Wrinkled yellow 102 Wrinkled green 31 Relative Type Frequency Smooth yellow 9/16 Smooth green 3/16 Wrinkled yellow 3/16 Wrinkled green 1/16 Are the data consistent with the Mendelian expected ratios of 9:3:3:1 for the four types?

  12. When Can We Safely Use the Chi-square Test? All expected cell counts are at least 1 and no more than 20% are less than 5.

More Related