Lesson 4.3: Testing Independence in Two-way Tables

""
“Rome, tables de restaurant dans le centre historique de Rome” by Fred_78 is licensed under CC BY-SA 2.0

Lesson Learning Objectives

  • Check the conditions needed for a chi-square test of independence.
  • Carry out a chi-square test of independence.

Lesson 4.3 Checklist

Learning activity Graded? Estimated time
Read OpenIntro Statistics section 6.4 and supplementary notes No 30 mins
Watch instructional video No 15 mins
Answer two section check-in questions Yes 15 mins
Work through virtual statistical software lab No 45 mins
Answer two virtual statistical software lab questions Yes 15 mins
Work on practice exercises No 1.5 hours
Explore suggested websites No 15 mins
Complete and submit Unit 4 Assignment Yes 2 hours
Complete and submit the Midterm Exam Yes 1 hour

Learning Activities

Readings 📖 and Instructional Video 🎦

Chi-Square Test of Independence

Read Section 6.4: Testing for Independence in Two-Way Tables in OpenIntro Statistics (Diez et al., 2019) CC BY-SA 3.0. In the last lesson, we used a chi-square goodness-of-fit test to analyze the data in a one-way table of the counts or frequencies for a single categorical variable. As you read, look-up new terminology in the Glossary and self-assess your understanding by attempting the guided practice exercises.

In this lesson, we analyze the data in a two-way table (or contingency table) of the counts or frequencies for combinations of two categorical variables. In particular, we use a chi-square test of independence between the two categorical variables.

Watch the following video, 6 4 Homogeneity and Independence in Two Way Tables (Çetinkaya-Rundel, 2018), on this topic (duration 00:11:51).

Comparing Counts: Independence

Read Supplementary Notes 4.3, which works through a goodness-of-fit chi-square test example to determine if eye colour is independent of handedness.

Lesson Check-in Questions ✍

Answer the two check-in questions for Lesson 4.3 in your Moodle course. The questions are based on the material covered in the readings and instructional videos. The questions are multiple-choice, fill-in-the-blank, matching, or calculation questions, and they are auto-graded in Moodle. Once you access the questions, you have 15 minutes to submit your answers. Overall the Lesson Check-in Questions count 6% toward your total grade.

Virtual Statistical Software Lab 💻

Work through the virtual statistical software lab: Software Lab 4.3. In this lab you’ll practice two chi-square independence tests: One is for the eye colour and handedness example in Supplementary Notes 4.3, and the other is for a survey on youth risk behaviour. As you work through the lab, answer the exercises in the shaded boxes. These exercises are not graded but the solutions are available: Software Lab 4.3 Solutions. The lab should take you no more than 45 minutes to complete.

Virtual Statistical Software Lab Questions ✍

Answer the two virtual statistical software lab questions for Software Lab 4.3 in your Moodle course. The questions are based on the lab you just completed. The questions are multiple-choice, fill-in-the-blank, matching, or calculation questions, and they are auto-graded in Moodle. Once you access the questions, you have 15 minutes to submit your answers. Overall the Software Lab Questions count 6% toward your total grade.

Practice Exercises 🖊

Work on the following exercises in OpenIntro Statistics: Exercises 6.35 and 6.37 and Chapter Exercise 6.41 (Diez et al., 2019) CC BY-SA 3.0. Check your answers using these solutions (Diez et al., 2019) CC BY-SA 3.0. You’ll deepen your understanding much more effectively if you genuinely attempt the questions by yourself before checking the solutions.

Work on the WeBWorK exercises, which are linked from your Moodle course. Check your answers using the solutions provided.

Suggested Websites 🌎

  • For another take on testing independence in two-way tables, have a look at this well-written online resource: Chi-Square Test of Independence | Formula, Guide & Examples (Turney, 2023).
  • To practice chi-square goodness-of-fit test calculations, try this Chi-Square Test Calculator [Application] (Statistics Kingdom, n.d.). To use the calculator, make sure you’ve selected “independence (association) test,” set the significance level (\alpha) to 0.05, and set the continuity correction to false.
    • For the hair colour and handedness example in Supplementary Notes 4.3, “enter sample data” so that it looks like Figure 1:
      eye colour handedness data
      Figure 1: Eye colour handedness data

      Click “calculate” to see the results.

    • For the iPod problem example in Section 6.4 of the textbook, “enter sample data” so that it looks like Figure 2:
      iPod problem data
      Figure 2: iPod problem data

      Click “calculate” to see the results.

    • For the type-2 diabetes example in Section 6.4.2 of the textbook, “enter sample data” so that it looks like Figure 3:
      type 2 diabetes data
      Figure 3: Type-2 diabetes data

      Click “calculate” to see the results.

Unit Assignment ✍

Having completed the three lessons in this unit, now you should do the Unit 4 Assignment in your Moodle course, which counts 6% towards your overall grade. There are five questions—a mix of short-answer, multiple-choice, and calculation questions—and you submit your answers directly in Moodle. There is no time limit for completing the assignment, and you do not have to complete it in one sitting. Three of the questions will be auto-graded in Moodle, and two will be manually graded by your Open Learning Faculty Member. You are recommended to submit this assignment before you start the next unit. That way you can benefit from your Open Learning Faculty Member’s feedback while working on subsequent assignments.

Midterm Exam ✍

Having completed the first four units, now you should do the Midterm Exam in your Moodle course, which counts 12% towards your overall grade. There are thirteen questions based on Units 1–4. The questions are a mix of multiple-choice, fill-in-the-blank, matching, and calculation questions, and you submit your answers directly in Moodle. There is a 1-hour time limit for completing the exam, and the questions will be auto-graded in Moodle. Use your lesson check-in questions, software lab questions, and unit assignments to prepare for the exam.

Media Attributions

Rome, Tables de Restaurant dans le Centre Historique de Rome, by Fred_78 (2012), on Flickr, CC BY-SA 2.0

References

Çetinkaya-Rundel, M. (2018, Feb. 19). 6 4 Homogeneity and independence in two way tables [Video]. YouTube. https://www.youtube.com/watch?v=yjrsfNdja0U

Diez, D. M., Çetinkaya-Rundel, M., Barr, C. D. (2019). OpenIntro Statistics (4th ed.). OpenIntro. https://www.openintro.org/book/os/

Fred PO [Fred_78]. (2012). Rome, tables de restaurant dans le centre historique de Rome [Photograph]. Flickr. https://flic.kr/p/dDv5W3

Statistics Kingdom. (n.d.). Chi-square test calculator [Application]. https://www.statskingdom.com/310GoodnessChi.html

Turney, S. (2023, Jun. 22). Chi-square goodness of fit test | formula, guide & examples. Scribbr. https://www.scribbr.com/statistics/chi-square-goodness-of-fit/

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Introduction to Probability and Statistics Copyright © 2023 by Thompson Rivers University is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book