1 / 13

Chi-square Test of Independence

Chi-square Test of Independence. Presentation 10.2. Another Significance Test for Proportions. But this time we want to test multiple variables . With this test we can determine if two variables are independent of not. This is sometimes called inference for two-way tables.

kirsi
Download Presentation

Chi-square Test of Independence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chi-square Test of Independence Presentation 10.2

  2. Another Significance Test for Proportions • But this time we want to test multiple variables. • With this test we can determine if two variables are independent of not. • This is sometimes called inference for two-way tables.

  3. Chi-square Test of Independence Formulas The null and alternate hypotheses are always the same with a Test of Independence. Null Hypothesis (assumes independent) Alternate Hypothesis (not independent) Test Statistic (that symbol is called “Chi-squared”) O is the observed count for each cell in the table and E is the expected count for each cell in the table. Instead of a normal or t distribution, we now have a chi-squared distribution

  4. The Titanic • Look at the data of the passengers, their ticket, and whether or not they survived.

  5. Conditions for the Test of Independence • None of the observed counts should be less than 1 • No more than 20% of the counts should be less than 5 • Same as for the Goodness of Fit test • These are simple checks to make sure that the sample size is sufficient.

  6. The Titanic • Check the conditions • Since all counts are much greater than 5, we are ok to conduct the test • Write Hypotheses (these are always the same!) • Null: Ho: Observed = Expected • That is, what we observed should be the same as what we expected given the variables are independent • Alternate: Ha: Observed ≠ Expected • That is, the observed data is just too different from what is expected to be attributed to random chance.

  7. The TitanicCalculations • Find the expected values (assume independence) Expected Observed To find an expected count, 849 out of 1317 total passengers were rescued (64.46%), so 849/1317 or 64.46% of the 326 first class passengers should have been rescued. This logic follows for each cell in the table.

  8. The TitanicCalculations • Then, do the sum of just like with the Goodness of Fit Test • Our degrees of freedom are: • Finally, use chi-square cdf: X2cdf(99.69,99999,2)

  9. The TitanicCalculations • Using the calculator • First go to the Matrix menu (2nd x-1) • Go to edit and press enter • Enter the number of row x column • Your matrix should fit the look of your table • Enter in the data • Make the calculator match the table • Then go to your stats tests and choose chi-test

  10. The TitanicCalculations • Using the calculator • Since you entered the data into matrix [A], you can just go right to: • Calculate • Draw • Leave the expected alone as the calculator will calculate those for you (see next slide)

  11. The TitanicCalculations • Using the calculator • Let’s go check out the expected table • Go back to matrix • Edit [B] to see the values • How cool is that!

  12. The TitanicCalculations • Conclusions • The p-value represents the chance of the data occurring given the variables are independent. • For the Titanic, this was a 0.00000000000000000002% chance • REJECT THE NULL! • There is a ton of evidence to suggest that there is an association between survival rate and the type of ticket.

  13. Chi-square Goodness of Fit Test This concludes this presentation.

More Related