{"id":1420,"date":"2023-06-22T02:23:01","date_gmt":"2023-06-22T02:23:01","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/chi-square-test-of-independence-learn-it-1\/"},"modified":"2025-05-16T23:44:46","modified_gmt":"2025-05-16T23:44:46","slug":"chi-square-test-of-independence-learn-it-1","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/chi-square-test-of-independence-learn-it-1\/","title":{"raw":"Chi-Square Test of Independence \u2013 Learn It 1","rendered":"Chi-Square Test of Independence \u2013 Learn It 1"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Complete a chi-square test of independence&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Complete a chi-square test of independence<\/span><\/li>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Write the conclusion of a chi-square test of independence in context of the problem&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Write the conclusion of a chi-square test of independence in context of the problem<\/span><\/li>\r\n<\/ul>\r\n<\/section>\r\n<p>The difference between the chi-square test of homogeneity and the chi-square test of independence is subtle. They differ primarily in study design.<\/p>\r\n<section class=\"textbox proTip\">\r\n<ul>\r\n\t<li>In the test of <strong>independence<\/strong>, we select individuals at random from a population and record data for two categorical variables. The null hypothesis says that the variables are independent.<\/li>\r\n\t<li>In the test of <strong>homogeneity<\/strong>, we select random samples from each subgroup or population separately and collect data on a single categorical variable. The null hypothesis says that the distribution of the categorical variable is the same for each subgroup or population.<\/li>\r\n<\/ul>\r\n<\/section>\r\n<p>Let's take a closer look at it through an example!<\/p>\r\n<p>The Pew Research Center[footnote]https:\/\/www.pewresearch.org\/[\/footnote] is a non-partisan fact tank that conducts polls and social science research. One survey that they conduct periodically is called the Core Trends Survey, which measures variables of a wide variety for a representative sample of American adults, including demographic information and information on Internet and social media use.<\/p>\r\n<p>Two of the variables included in the survey are <em>Education level<\/em> and <em>Income level<\/em>.<\/p>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1 ]2879[\/ohm2_question]<\/section>\r\n<p>The observed counts from the 2019 Core Trends Survey for these two variables are displayed in the following two-way table[footnote]Pew Research Center. (2019). Core trends survey - Mobile technology and home broadband 2019. https:\/\/www.pewresearch.org\/internet\/dataset\/core-trends-survey\/[\/footnote]. We\u2019ve seen two-way tables (also called contingency tables) before in a couple of contexts. Previously, we saw contingency tables that displayed values for one categorical variable for samples from multiple populations. In this situation, the two-way table classifies counts for a sample of individuals from one population on two categorical variables.<\/p>\r\n<table style=\"height: 144px; width: 740px;\">\r\n<tbody>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\"><strong>Income level<\/strong><\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">\u00a0<\/td>\r\n<td style=\"width: 83.507px;\">\u00a0<\/td>\r\n<td style=\"width: 54.4792px;\">\u00a0<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">&lt;$30,000<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">$30,000\u2013$74,999<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">$75,000 and up<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">Total<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\"><strong>Education level<\/strong><\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">Post-Grad Degree<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">2<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">8<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">46<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">56<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">College Degree<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">39<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">113<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">202<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">354<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">Some College<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">131<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">138<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">120<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">389<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">HS Grad<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">175<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">129<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">65<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">369<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">No HS Degree<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">78<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">32<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">8<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">118<\/td>\r\n<\/tr>\r\n<tr style=\"height: 18px;\">\r\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\r\n<td style=\"height: 18px; width: 85.434px;\">Total<\/td>\r\n<td style=\"height: 18px; width: 87.6042px;\">425<\/td>\r\n<td style=\"height: 18px; width: 91.2153px;\">420<\/td>\r\n<td style=\"height: 18px; width: 83.507px;\">441<\/td>\r\n<td style=\"height: 18px; width: 54.4792px;\">1,286<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p>Since we have two categorical variables measured for the same sample of individuals, the natural question to ask is, \u201cAre these two variables independent?\u201d In other words, \u201cIs income level independent of education level?\u201d We address this question using the <strong>chi-square test of independence<\/strong>.<\/p>\r\n<section class=\"textbox recall\">Two events, [latex]A[\/latex] and [latex]B[\/latex], are <strong>independent<\/strong> if [latex]P(A) = P(A|B)[\/latex].That is, independent means knowing whether event B happens has no effect on how likely event A is to occur.<\/section>\r\n<p>If the two variables, <em>Income level<\/em> and <em>Education level,<\/em>\u00a0are independent, knowing one\u2019s education level should not change the probability that they will have a particular income level, so the distribution of <em>Income level<\/em> should be the same for every education level. Similarly, the distribution of <em>Education level<\/em> should be the same for every income level.<\/p>\r\n<p>This should be feeling fairly reminiscent of the chi-square test of homogeneity, but it is different in a couple of important ways. The homogeneity test considered <em>one categorical variable<\/em> measured for samples from different populations and asked whether the distribution of that <em>one variable<\/em> was the same among the populations. In this case, we have one sample from one population of individuals for which <em>two categorical variables<\/em> are measured, and we\u2019re asking whether those two variables are independent.<\/p>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]2869[\/ohm2_question]<\/section>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Complete a chi-square test of independence&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Complete a chi-square test of independence<\/span><\/li>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Write the conclusion of a chi-square test of independence in context of the problem&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Write the conclusion of a chi-square test of independence in context of the problem<\/span><\/li>\n<\/ul>\n<\/section>\n<p>The difference between the chi-square test of homogeneity and the chi-square test of independence is subtle. They differ primarily in study design.<\/p>\n<section class=\"textbox proTip\">\n<ul>\n<li>In the test of <strong>independence<\/strong>, we select individuals at random from a population and record data for two categorical variables. The null hypothesis says that the variables are independent.<\/li>\n<li>In the test of <strong>homogeneity<\/strong>, we select random samples from each subgroup or population separately and collect data on a single categorical variable. The null hypothesis says that the distribution of the categorical variable is the same for each subgroup or population.<\/li>\n<\/ul>\n<\/section>\n<p>Let&#8217;s take a closer look at it through an example!<\/p>\n<p>The Pew Research Center<a class=\"footnote\" title=\"https:\/\/www.pewresearch.org\/\" id=\"return-footnote-1420-1\" href=\"#footnote-1420-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a> is a non-partisan fact tank that conducts polls and social science research. One survey that they conduct periodically is called the Core Trends Survey, which measures variables of a wide variety for a representative sample of American adults, including demographic information and information on Internet and social media use.<\/p>\n<p>Two of the variables included in the survey are <em>Education level<\/em> and <em>Income level<\/em>.<\/p>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm2879\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=2879&theme=lumen&iframe_resize_id=ohm2879&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<p>The observed counts from the 2019 Core Trends Survey for these two variables are displayed in the following two-way table<a class=\"footnote\" title=\"Pew Research Center. (2019). Core trends survey - Mobile technology and home broadband 2019. https:\/\/www.pewresearch.org\/internet\/dataset\/core-trends-survey\/\" id=\"return-footnote-1420-2\" href=\"#footnote-1420-2\" aria-label=\"Footnote 2\"><sup class=\"footnote\">[2]<\/sup><\/a>. We\u2019ve seen two-way tables (also called contingency tables) before in a couple of contexts. Previously, we saw contingency tables that displayed values for one categorical variable for samples from multiple populations. In this situation, the two-way table classifies counts for a sample of individuals from one population on two categorical variables.<\/p>\n<table style=\"height: 144px; width: 740px;\">\n<tbody>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 87.6042px;\"><strong>Income level<\/strong><\/td>\n<td style=\"height: 18px; width: 91.2153px;\">\u00a0<\/td>\n<td style=\"width: 83.507px;\">\u00a0<\/td>\n<td style=\"width: 54.4792px;\">\u00a0<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">&lt;$30,000<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">$30,000\u2013$74,999<\/td>\n<td style=\"height: 18px; width: 83.507px;\">$75,000 and up<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">Total<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\"><strong>Education level<\/strong><\/td>\n<td style=\"height: 18px; width: 85.434px;\">Post-Grad Degree<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">2<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">8<\/td>\n<td style=\"height: 18px; width: 83.507px;\">46<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">56<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">College Degree<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">39<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">113<\/td>\n<td style=\"height: 18px; width: 83.507px;\">202<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">354<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">Some College<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">131<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">138<\/td>\n<td style=\"height: 18px; width: 83.507px;\">120<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">389<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">HS Grad<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">175<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">129<\/td>\n<td style=\"height: 18px; width: 83.507px;\">65<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">369<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">No HS Degree<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">78<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">32<\/td>\n<td style=\"height: 18px; width: 83.507px;\">8<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">118<\/td>\n<\/tr>\n<tr style=\"height: 18px;\">\n<td style=\"height: 18px; width: 87.7604px;\">\u00a0<\/td>\n<td style=\"height: 18px; width: 85.434px;\">Total<\/td>\n<td style=\"height: 18px; width: 87.6042px;\">425<\/td>\n<td style=\"height: 18px; width: 91.2153px;\">420<\/td>\n<td style=\"height: 18px; width: 83.507px;\">441<\/td>\n<td style=\"height: 18px; width: 54.4792px;\">1,286<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Since we have two categorical variables measured for the same sample of individuals, the natural question to ask is, \u201cAre these two variables independent?\u201d In other words, \u201cIs income level independent of education level?\u201d We address this question using the <strong>chi-square test of independence<\/strong>.<\/p>\n<section class=\"textbox recall\">Two events, [latex]A[\/latex] and [latex]B[\/latex], are <strong>independent<\/strong> if [latex]P(A) = P(A|B)[\/latex].That is, independent means knowing whether event B happens has no effect on how likely event A is to occur.<\/section>\n<p>If the two variables, <em>Income level<\/em> and <em>Education level,<\/em>\u00a0are independent, knowing one\u2019s education level should not change the probability that they will have a particular income level, so the distribution of <em>Income level<\/em> should be the same for every education level. Similarly, the distribution of <em>Education level<\/em> should be the same for every income level.<\/p>\n<p>This should be feeling fairly reminiscent of the chi-square test of homogeneity, but it is different in a couple of important ways. The homogeneity test considered <em>one categorical variable<\/em> measured for samples from different populations and asked whether the distribution of that <em>one variable<\/em> was the same among the populations. In this case, we have one sample from one population of individuals for which <em>two categorical variables<\/em> are measured, and we\u2019re asking whether those two variables are independent.<\/p>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm2869\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=2869&theme=lumen&iframe_resize_id=ohm2869&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-1420-1\">https:\/\/www.pewresearch.org\/ <a href=\"#return-footnote-1420-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><li id=\"footnote-1420-2\">Pew Research Center. (2019). Core trends survey - Mobile technology and home broadband 2019. https:\/\/www.pewresearch.org\/internet\/dataset\/core-trends-survey\/ <a href=\"#return-footnote-1420-2\" class=\"return-footnote\" aria-label=\"Return to footnote 2\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":8,"menu_order":27,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":1388,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1420"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":4,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1420\/revisions"}],"predecessor-version":[{"id":6879,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1420\/revisions\/6879"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1388"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1420\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1420"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1420"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1420"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}