Presentation is loading. Please wait.

Presentation is loading. Please wait.

STA291 Statistical Methods Lecture 26. Chi-Square Test of Independence The table below shows the importance of personal appearance for several age groups.

Similar presentations


Presentation on theme: "STA291 Statistical Methods Lecture 26. Chi-Square Test of Independence The table below shows the importance of personal appearance for several age groups."— Presentation transcript:

1 STA291 Statistical Methods Lecture 26

2 Chi-Square Test of Independence The table below shows the importance of personal appearance for several age groups. Are Age and Appearance independent, or is there a relationship? 2

3 A stacked barchart suggests a relationship: Test for independence using a chi-square test of independence. Chi-Square Test of Independence 3

4 The test is mechanically equivalent to the test for homogeneity, but with some differences in how we think about the data and the results: Homogeneity Test: one variable ( Card Type ) measured on two or more populations (Mailings). Independence Test: Two variables ( Appearance and Age ) measured on a single population. We ask the question Are the variables independent? rather than Are the groups homogeneous? This subtle distinction is important when drawing conclusions. Chi-Square Test of Independence 4

5 Assumptions and Conditions Counted Data Condition – Data must be counts Independence Assumption – Counts need to be independent from each other. Check for randomization Randomization Condition – Random sample needed Sample Size Assumption – There must be enough data so check the following condition. Expected Cell Frequency Condition – Expect at least 5 individuals per cell. Chi-Square Test of Independence 5

6 Example : Automobile Manufacturers Consumer Reports uses surveys to measure reliability in automobiles. Annually they release survey results about problems that consumers have had with vehicles in the past 12 months and the origin of manufacturer. Is consumer satisfaction related to country of origin? State the hypotheses. Find the test statistic. Given the p-value, state your conclusion. 6 Chi-Square Test of Independence

7 Example : Automobile Manufacturers 7 Chi-Square Test of Independence

8 Example : Automobile Manufacturers Consumer Reports uses surveys to measure reliability in automobiles. Annually they release survey results about problems that consumers have had with vehicles in the past 12 months and the origin of manufacturer. Is consumer satisfaction related to country of origin? State the hypotheses. Find the test statistic. Given p-value = 0.231, state your conclusion. There is not enough evidence to conclude there is an association between vehicle problems and origin of vehicle. 8 Chi-Square Test of Independence

9 For the Appearance and Age example, we reject the null hypothesis that the variables are independent. So, it may be of interest to know how differently two age groups (teens and 30-something adults) select the very important category ( Appearance response 6 or 7). Construct a confidence interval for the true difference in proportions… 9 Chi-Square Test of Independence

10 Dont use chi-square methods unless you have counts. Beware large samples! With a sufficiently large sample size, a chi-square test can always reject the null hypothesis. Dont say that one variable depends on the other just because theyre not independent. 10

11 The Chi-Square Calculation 1.Find the expected values. These come from the null hypothesis value. 2.Compute the residuals, 3.Square the residuals, 4.Compute the components. Find for each cell. 5.Find the sum of the components, 6.Find the degrees of freedom 7.Test the hypothesis, finding the p-value or comparing the test statistic from 5 to the appropriate critical value. Goodness-of-Fit Tests

12 Comparing Chi-Square Tests 12 TestType of DataType of Question Example Good-ness of FitCounts in several categories Do the data match my model? M&Ms HomogeneityOne variable, across multiple populations Is the variable similar across all populations? Types of credit cards (variable) across mailings (populations) IndependenceTwo variables, one population Are the two variables independent or not? Problems and country of origin (variables) within cars (population)

13 Looking back o Recognize when a chi-square test of goodness of fit, homogeneity, or independence is appropriate. o Assumptionssame! o Mechanicssame! o Interpretation(slightly) different! 13


Download ppt "STA291 Statistical Methods Lecture 26. Chi-Square Test of Independence The table below shows the importance of personal appearance for several age groups."

Similar presentations


Ads by Google