#  2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent)

## Presentation on theme: " 2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent)"— Presentation transcript:

 2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent) or not associated (independent)

Assumptions & formula remain the same!

Hypotheses – written in words H 0 : two variables are independent H a : two variables are dependent Be sure to write in context!

A beef distributor wishes to determine whether there is a relationship between geographic region and cut of meat preferred. If there is no relationship, we will say that beef preference is independent of geographic region. Suppose that, in a random sample of 500 customers, 300 are from the North and 200 from the South. Also, 150 prefer cut A, 275 prefer cut B, and 75 prefer cut C.

If beef preference is independent of geographic region, how would we expect this table to be filled in? NorthSouthTotal Cut A150 Cut B275 Cut C75 Total300200500 9060 165110 4530

Expected Counts Assuming H 0 is true,

Degrees of freedom Or cover up one row & one column & count the number of cells remaining!

Now suppose that in the actual sample of 500 consumers the observed numbers were as follows: (on your paper) Is there sufficient evidence to suggest that geographic regions and beef preference are not independent? (Is there a difference between the expected and observed counts?)

Assumptions: Have a random sample of people All expected counts are greater than 5. H 0 : geographic region and beef preference are independent H a : geographic region and beef preference are dependent P-value =.0226df = 2  =.05 Since p-value < , I reject H 0. There is sufficient evidence to suggest that geographic region and beef preference are dependent. Expected Counts: N S A90 60 B165110 C45 30

More Example Problems

 2 test for homogeneity single categorical two (or more) independent samplesUsed with a single categorical variable from two (or more) independent samples Used to see if the two populations are the same (homogeneous)

Assumptions & formula remain the same! Expected counts & df are found the same way as test for independence. Only Only change is the hypotheses!

Hypotheses – written in words H 0 : the two (or more) distributions are the same H a : the distributions are different Be sure to write in context!

College Students’ Drinking Levels The data on drinking behavior for independently chosen random samples of male and female students was collected. Does there appear to be a gender difference with respect to drinking behavior?

Homogeneity Test Gender DrinkingMenWomen None140186 Low478661 Moderate300173 High6316

Assumptions: Have 2 random sample of students All expected counts are greater than 5. H 0 : drinking behavior is the same for female & male students H a : drinking behavior is not the same for female & male students P-value =.000df = 3  =.05 Since p-value < , I reject H 0. There is sufficient evidence to suggest that drinking behavior is not the same for female & male students. Expected Counts: M F 0158.6167.4 L554.0585.0 M230.1243.0 H38.440.6

Titanic Moviemakers of Titanic imply that lower- class passengers were treated unfairly. Was that accurate?

Likelihood of Survival on Titanic? H o :  C = 109/1318,  W = 402/1318,  M = 807/1318 H a : at least one  is different  2 = 225.16, df = 2, P(  2 > 225.16) = 0.000 Reject H o and conclude at least one proportion is different. ChildrenWomenMen Observed57296146 Expected41.269152.199305.533

Download ppt " 2 test for independence Used with categorical, bivariate data from ONE sample Used to see if the two categorical variables are associated (dependent)"

Similar presentations