Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chi-Square Tests Categorical data 1-sample, compared to theoretical distribution –Goodness-of-Fit Test 2+ samples, 2+ levels of response variable –Chi-square.

Similar presentations


Presentation on theme: "Chi-Square Tests Categorical data 1-sample, compared to theoretical distribution –Goodness-of-Fit Test 2+ samples, 2+ levels of response variable –Chi-square."— Presentation transcript:

1 Chi-Square Tests Categorical data 1-sample, compared to theoretical distribution –Goodness-of-Fit Test 2+ samples, 2+ levels of response variable –Chi-square Test Chi-Square TestsSlide #1

2 Chi-squareSlide #2 Chi-Square -- Examples Does the dominant plants in plots differ between two locations? Does the frequency of females in majors differ between majors in the natural sciences, social sciences, and humanities? Does the occurrence of a food item in the stomachs of lake trout and chinook salmon differ?

3 Chi-squareSlide #3 What do those examples have in common? A categorical response variable –dominant plant in a plot –sex of student (male or female) –occurrence of a food item (Y/N) Compare response frequencies among >2 groups –between two locations –among three divisions –between lake trout and chinook salmon

4 Chi-squareSlide #4 An Illustrative Example When Chinook Salmon were first introduced to Lake Superior there was concern that they would compete with native Lake Trout for Lake Herring. Preliminarily, fisheries biologists classified the diets of 50 Lake Trout and 40 Chinook Salmon as containing Lake Herring or not. They found 36 Lake Trout and 24 Chinook Salmon contained Lake Herring. Test (at the 10% level) if there is a difference in the proportion of Lake Trout and Chinook Salmon that had Lake Herring.

5 Chi-squareSlide #5 Observed Table –Recall – “… the diets of 50 Lake Trout and 40 Chinook Salmon … found 36 Lake Trout and 24 Chinook Salmon contained Lake Herring” 50 40 3614 24 16 306090

6 Chi-squareSlide #6 Observed Table If there is no difference between rows (i.e., the H o ) then the total row could represent either row. Thus, the proportion of predator (regardless of type) that consumed Lake Herring is estimated to be 60/90 or 0.67

7 Chi-squareSlide #7 Expectations if H o is true If there is no difference and the common proportion is estimated by 0.67 then how many …. LT do we expect to have LH = 50*0.67 LT … … to not have LH = 50*0.33 CS … … to have LH = 40*0.67 CS … … to not have LH = 40*0.33

8 Chi-squareSlide #8 Create Expected Table LT to have LH = = 33.3 33.3

9 Chi-squareSlide #9 Create Expected Table LT to NOT have LH = = 16.7 16.7 26.7 33.3 13.3 16.7 Expected counts are the product of the marginal totals divided by the table total.

10 Chi-Square TestsSlide #10 A New Test Statistic df = (rows-1)*(cols-1)

11 Chi-Square TestsSlide #11 Chi-Square Distribution Right-skewed (all values are positive) Less sharply skewed with increasing df –df are related to the size of the table, not n All p-values are “right-ofs” – no “one- tailed” tests with chi-square Examine HO – page 1 01020304050 Chi-square Chi(3) Chi(10) Chi(20)

12 Chi-squareSlide #12 Chi-Square Test H o : “distribution of individuals into the levels is same for each population” H A : “distribution of individuals into levels is different for at least one pair of populations” Assume: at least 5 in each cell of expected table Statistic: Observed frequency table Test Statistic: df: (rows-1)*(columns-1) When: categorical variable, 2+ populations/groups

13 Chi-squareSlide #13 A Full Example When Chinook Salmon were first introduced to Lake Superior there was concern that they would compete with native Lake Trout for Lake Herring. Preliminarily, fisheries biologists classified the diets of 50 Lake Trout and 40 Chinook Salmon as containing Lake Herring or not. They found 36 Lake Trout and 24 Chinook Salmon contained Lake Herring. Test (at the 10% level) if there is a difference in the proportion of Lake Trout and Chinook Salmon that had Lake Herring.

14 Chi-squareSlide #14 Modification -- the researchers recorded what the dominant food item was. Do the dominant food items in Lake Trout and Chinook Salmon differ at the 5% level? See R HO Page 2. Another Full Example


Download ppt "Chi-Square Tests Categorical data 1-sample, compared to theoretical distribution –Goodness-of-Fit Test 2+ samples, 2+ levels of response variable –Chi-square."

Similar presentations


Ads by Google