Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables.

Similar presentations


Presentation on theme: "Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables."— Presentation transcript:

1

2 Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables

3  2 Hypothesis Test Goodness-of-Fit Independence Homogeneity

4 Analyzing an Exam Question How does a teacher determine if students were “clueless” on an exam question vs. students were unprepared for that particular exam question?

5 Goodness-of-Fit Test If you need to test whether populations are distributed evenly (or “preset” proportions), then use Goodness-of-Fit test. 1.This requires a one-way frequency (count) table. 2.Random sample is required for counts. 3.Expected cell counts greater than 5. What’s an expected cell count?

6 Expected Cell Count? Suppose 300 students answered a multiple choice question with the following distribution. Did the students randomly select answers (I.e. are the answers equally distributed)? The expected cell count for A is 300(1/5) = 60. As the same is true for B thru E. If we assume the answers are equally distributed (null hypothesis), then we “share” the 300 responses equally. ABCDE

7 Observed vs. Expected The observed values are the actual sampled counts (occurrences). The expected values are the hypothesized outcomes based on the null hypothesis. In this example, we are assuming the each answer was equally selected by students. ABCDE Observed Expected60

8  2 Statistic The computer (or calculator) will calculate the chi-squared statistic for you, and determine the degrees of freedom and p-value. What is degrees of freedom?

9 Chi-Squared Statistic and p-value  2 = 6.5, df = 4, P(  2 > 6.5) =.16479

10  2 Statistic H o :  A =  B =  C =  D =  E H a : at least one  is different  2 = 12.7, df = 4, P(  2 > 12.7) =.0128 ABCDE Observed Expected60

11 Goodness-of-Fit Test What if the hypothesized proportions were not all the same? Example: Does the color of your car influence the chance it will be stolen? Suppose it is known that all cars in the world consist of 15% white, 30% black, 35% red, 15% blue, and 5% other colors.

12 Color of Stolen Car H o :  W =.15,  B =.30,  R =.35,  U =.30,  E =.05 H a : at least one  is different WhiteBlackRedBlueOther Obsv Expect  2 = 66.33, df = 4, P(  2 > 66.33) = 1.3x10 -13

13 Two-Way Tables Homogeneity—tests for equal category proportions for all populations (because separate random samples were used to collect information). Independence—tests for an independence (no association) between 2 categorical variables. Don’t worry; same test!

14 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?

15 Homogeneity Test Gender DrinkingMenWomen None (158.6)(167.4) Low (554.0)(585.0) Moderate (230.1)(242.9) High6316 (38.4)(40.6)

16 College Students’ Drinking Levels H o : True proportions for the 4 drinking levels are the same for males and females. H a : At least one true proportion is different.  2 = 96.53, df = (4 – 1)(2 – 1) = 3 P(  2 > 96.53) = 8.68 x Reject H o ; data indicates that males and females differ with respect to drinking levels.

17 Sexual Risk-Taking Factors Among Adolescents Each person in a random sample of sexually active teens was classified according to gender and contraceptive use. Is there a relationship between gender and contraceptive use by sexually active teens?

18 Independent (No Association) Test Gender Contraceptive Use FemaleMale Rarely/Never (224)(336) Sometimes/ Most Times (204)(306) Always (372)(558)

19 Sexual Risk-Taking Factors Among Adolescents H o : Gender and contraceptive use have no association (independent). H a : Gender and contraceptive use have an association (dependent).  2 = 6.572, df = (3 – 1)(2 – 1) = 2 P(  2 > 6.572) =.035 Reject H o and conclude there is an association between gender and contraceptive use.

20 Expected (Cell) Count for Two-Way Tables

21 Conditions (Requirements) for  2 Test with 2-Way Tables 1)Random Sample 2)At least 80% of Expected Cell Counts are greater than 5. 3)All Expected Cell Counts and Observed values are greater than or equal to 1.

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

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


Download ppt "Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables."

Similar presentations


Ads by Google