skip day u nit 5 i nference for categorical variables
play

Skip Day? U nit 5: I nference for categorical variables The table - PowerPoint PPT Presentation

Goodness of Fit Test Example Skip Day? U nit 5: I nference for categorical variables The table below shows the number of pupils absent on particular days L ecture 3: C hi - square T est of I ndependence in the week. Day of the Week M T W Th


  1. Goodness of Fit Test Example Skip Day? U nit 5: I nference for categorical variables The table below shows the number of pupils absent on particular days L ecture 3: C hi - square T est of I ndependence in the week. Day of the Week M T W Th F S tatistics 101 Number of Absences 125 88 85 94 108 Nicole Dalzell A principal believes that students are equally likely to be absent on any day of the week. Based on this data, does it seem like students June 10, 2015 are equally likely to be absent on any given day of the week? Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 2 / 10 Goodness of Fit Test Example Chi-square test of independence Obesity and marital status Skip Day? Obesity and marital status A study reported in the medical journal Obesity in 2009 analyzed data from the National Longitudinal Study of Adolescent Health. Obesity was defined as having a BMI of 30 or more. What are the hypotheses we are testing here? The research subjects were followed from adolescence to adulthood, and all the people in the sample were categorized in Day of the Week M T W Th F terms of whether they were obese and whether they were dating, Number of Absences 125 88 85 94 108 cohabiting, or married. Does there appear to be a relationship between weight and Under the null hypothesis, what is the probability of being absent on relationship status? Monday? Tuesday? Dating Cohabiting Married Obese 81 103 147 Not Obese 359 326 277 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 3 / 10 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 4 / 10

  2. Chi-square test of independence Obesity and marital status Chi-square test of independence Obesity and marital status Chi-square test of independence Participation question The hypotheses are: If relationship status is the explanatory and weight status is the re- H 0 : Weight and relationship status are independent. Obesity rates do sponse variable, which of the following is the correct representation of not vary by relationship status. the relationship? H A : Weight and relationship status are dependent. Obesity rates do vary by relationship status. (a) (b) The test statistic is calculated as k ( O − E ) 2 dating cohabiting married obese not obese � χ 2 df = where df = ( R − 1 ) × ( C − 1 ) , obese dating E i = 1 cohabiting where k is the number of cells, R is the number of rows, and C is the number of columns. not obese married Note: We calculate df differently for one-way and two-way tables. The p-value is the area under the χ 2 df curve, above the calculated test statistic. Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 5 / 10 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 6 / 10 Chi-square test of independence Expected counts in two-way tables Chi-square test of independence Expected counts in two-way tables Expected counts in two-way tables Dating Cohabiting Married Total Obese 81 103 147 331 Not Obese 359 326 277 962 Total 440 429 424 1293 What proportion of the individuals in this sample are obese? Expected counts in two-way tables If in fact weight and relationship status are independent (i.e. if in fact H 0 Expected Count = ( row total ) × ( column total ) is true) how many of the dating people would we expect to be obese? table total How many of the cohabiting and married? 113 + 110 + 108 = 331 � Dating Cohabiting Married Obese 81 103 147 Not Obese 359 326 277 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 7 / 10 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 8 / 10

  3. Chi-square test of independence Expected counts in two-way tables Chi-square test of independence Expected counts in two-way tables inference(weight,mar_stat,est="proportion", type = "ht", method = "theoretical", alternative = "greater") Application exercise: Chi-square test of independence Response variable: categorical, Explanatory variable: categorical Test the hypothesis that relationship status and obesity are associated Chi-square test of independence using a signify acne level of 0.05. Can we conclude from these data Summary statistics: x that living with someone jus making some people obese and that mar- y dating cohabiting married Sum obese 81 103 147 331 rying jus making people even more obese? Can we conclude that not obese 359 326 277 962 Sum 440 429 424 1293 obesity affects relationship status? H_0: Response and explanatory variable are independent. H_A: Response and explanatory variable are dependent. Check conditions: expected counts Dating Cohabiting Married x y dating cohabiting married Obese 81 103 147 obese 112.64 109.82 108.54 Not Obese 359 326 277 not obese 327.36 319.18 315.46 Pearson’s Chi-squared test data: y_table X-squared = 30.8286, df = 2, p-value = 2.021e-07 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 9 / 10 Statistics 101 (Nicole Dalzell) U5 - L3: Chi-square tests June 10, 2015 10 / 10

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend