{"id":1170,"date":"2021-06-25T12:12:39","date_gmt":"2021-06-25T16:12:39","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=1170"},"modified":"2025-05-07T18:09:17","modified_gmt":"2025-05-07T22:09:17","slug":"11-4-chi-square-independence-test","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/11-4-chi-square-independence-test\/","title":{"raw":"11.4 Chi-Square Independence Test","rendered":"11.4 Chi-Square Independence Test"},"content":{"raw":"The chi-square independence test is used to test for an association between two categorical variables of a population.\r\n<h2>11.4.1 Terminologies Used for a Contingency Table<\/h2>\r\nRecall that a contingency table summarizes the counts of two categorical variables. For example, the following contingency table groups 200 females according to their breast cancer status and smoking status:\r\n<p style=\"text-align: left;\"><strong>Table 11.6<\/strong>: Contingency Table of Cancer Status (row) and Smoking Status (column)<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"first-col-border last-col-border\" style=\"width: 90%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 30%;\" valign=\"top\"><\/td>\r\n<th class=\"bluetext\" style=\"text-align: center; width: 25%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div><\/th>\r\n<th class=\"bluetext\" style=\"text-align: center; width: 25%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 20%;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th class=\"redtext\" scope=\"row\" valign=\"top\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/th>\r\n<td class=\"DUL\" style=\"text-align: center;\" valign=\"top\"><strong>10<\/strong> [latex]( C_1 \\: \\&amp; \\: S_1 )[\/latex]<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\"><strong>30<\/strong>\u00a0[latex]( C_1 \\: \\&amp; \\: S_2 )[\/latex]<\/td>\r\n<td class=\"redtext\" style=\"text-align: center;\" valign=\"top\"><strong>40\u00a0 <\/strong><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\">\r\n<th class=\"redtext\" scope=\"row\" valign=\"top\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/th>\r\n<td style=\"text-align: center;\" valign=\"top\"><strong>20<\/strong>\u00a0 [latex]( C_2 \\: \\&amp; \\: S_1 )[\/latex]<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\"><strong>140<\/strong>\u00a0 [latex]( C_2 \\: \\&amp; \\: S_2 )[\/latex]<\/td>\r\n<td class=\"redtext\" style=\"text-align: center;\" valign=\"top\"><strong>160\u00a0 <\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #0000ff;\"><strong>30<\/strong><\/span><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #0000ff;\"><strong>170<\/strong><\/span><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">200<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nSuppose we randomly select an individual from this sample. Define the events:\r\n\r\n[latex]\\begin{align*}\r\nS_1 &amp;= \\text{the subject is a smoker}; \\\\\r\nS_2 &amp;= \\text{the subject is a non-smoker}; \\\\\r\nC_1 &amp;= \\text{the subject has breast cancer}; \\\\\r\nC_2 &amp;= \\text{the subject does not have breast cancer.}\r\n\\end{align*}[\/latex]\r\n\r\nThe joint events are:\r\n\r\n[latex]\\begin{align*}\r\nC_1 \\: \\&amp; \\: S_1 &amp;= \\text{the subject has cancer and is a smoker}; \\\\\r\nC_1 \\: \\&amp; \\: S_2 &amp;= \\text{the subject has cancer and is a non-smoker}; \\\\\r\nC_2 \\: \\&amp; \\: S_1 &amp;= \\text{the subject does not have cancer and is a smoker}; \\\\\r\nC_2 \\: \\&amp; \\: S_2 &amp;= \\text{the subject does not have cancer and is a non-smoker.}\r\n\\end{align*}[\/latex]\r\n\r\nThe variable \u201cCancer Status\u201d is called the <span class=\"redtext\">row variable, and it has two possible values\u2014cancer or cancer-free<\/span>. The variable \u201cSmoking Status\u201d is the <span class=\"bluetext\">column variable,<\/span> and it has two values\u2014smoker and non-smoker. The two numbers in the last column (40 and 160) are the <span class=\"redtext\">row totals<\/span> and the two in the last row (30, 170) are the <span class=\"bluetext\">column totals<\/span>. The sample size is also called the <em>grand total<\/em>. The four numbers in bold are the joint frequencies. The boxes that contain the joint frequencies are referred to as cells.\r\n\r\nBased on the [latex]\\frac{f}{N}[\/latex]\u00a0rule, the <strong>marginal distribution<\/strong> of the <span class=\"redtext\">row<\/span> (<span class=\"bluetext\">column<\/span>) variable equals the <span class=\"redtext\">row<\/span> (<span class=\"bluetext\">column<\/span>) totals divided by [latex]n[\/latex]. The <strong>joint distribution<\/strong> is given by the joint frequencies divided by [latex]n[\/latex]. The following table shows the marginal distribution of \u201cCancer Status\u201d in the last column, the marginal distribution of \u201cSmoking Status\u201d in the last row, and the joint distribution of the four cells.\r\n<p style=\"text-align: left;\"><strong>Table 11.7<\/strong>: Marginal and Joint Probability Distributions of Cancer Status and Smoking Status<\/p>\r\n\r\n<table class=\"first-col-border last-col-border\" style=\"width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 21.4227%;\" valign=\"top\"><\/td>\r\n<th style=\"text-align: center; width: 28.2577%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 26.4536%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 23.866%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><strong>Total<\/strong><\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th class=\"redtext\" style=\"width: 21.4227%;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/div><\/th>\r\n<td style=\"text-align: center; width: 28.2577%;\" valign=\"top\">[latex]P(C_1 \\: \\&amp; \\: S_1) = \\frac{10}{200} = 0.05[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 26.4536%;\" valign=\"top\">[latex]P(C_1 \\: \\&amp; \\: S_2) = \\frac{30}{200} = 0.15[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 23.866%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_1) = \\frac{40}{200} = 0.2}[\/latex]<\/span><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\">\r\n<th style=\"width: 21.4227%;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/div><\/th>\r\n<td style=\"text-align: center; width: 28.2577%;\" valign=\"top\">[latex]P(C_2 \\: \\&amp; \\: S_1) =\\frac{20}{200} = 0.1[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 26.4536%;\" valign=\"top\">[latex]P(C_2 \\: \\&amp; \\: S_2) = \\frac{140}{200} = 0.7[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 23.866%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_1) = \\frac{160}{200} = 0.8}[\/latex]<\/span><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 21.4227%;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><strong>Total<\/strong><\/div><\/th>\r\n<td style=\"text-align: center; width: 28.2577%;\" valign=\"top\"><span style=\"color: #0000ff;\">\u00a0[latex]\\color{blue}{P(S_1) = \\frac{30}{200} = 0.15}[\/latex]<\/span><\/td>\r\n<td style=\"text-align: center; width: 26.4536%;\" valign=\"top\"><span style=\"color: #0000ff;\"> [latex]\\color{blue}{P(S_2) = \\frac{170}{200} = 0.85}[\/latex]<\/span><\/td>\r\n<td style=\"text-align: center; width: 23.866%;\" valign=\"top\">\r\n<div align=\"center\">1<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nWe want to test for an association between the two variables in a contingency table. Two variables are said to be associated if they are NOT independent. If two variables are associated, then differences exist among the conditional distributions of one variable, given different values of the other variable. For example, the conditional distributions of \u201cCancer Status\u201d given \u201cSmoking Status\u201d are given in the following table. Notice that the conditional distributions are simply the relative frequencies of \u201cCancer\u201d within smoker and non-smoker groups.\r\n<p style=\"text-align: left;\"><strong>Table 11.8<\/strong>: Conditional Probability Distribution of Cancer Status Given Smoking Status<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"first-col-border last-col-border\" style=\"width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\r\n<thead><\/thead>\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 22.5396%;\" valign=\"top\">\r\n<div align=\"center\"><\/div><\/td>\r\n<th style=\"text-align: center; width: 27.4604%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 26%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><strong>Marginal Distribution<\/strong>\r\n<strong>Of Cancer Status<\/strong><\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th style=\"width: 22.5396%;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/span><\/div><\/th>\r\n<td style=\"text-align: center; width: 27.4604%;\" valign=\"top\">[latex]P(C_1 | S_1) = \\frac{10}{30} = 0.333[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 26%;\" valign=\"top\">[latex]P(C_1 | S_2) = \\frac{30}{170} = 0.176[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 24%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_1) = \\frac{40}{200} = 0.2}[\/latex]<\/span><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\">\r\n<th style=\"width: 22.5396%;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/div><\/th>\r\n<td style=\"text-align: center; width: 27.4604%;\" valign=\"top\">[latex]P(C_2 | S_1) = \\frac{20}{30} = 0.677[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 26%;\" valign=\"top\">[latex]P(C_2 | S_2) = \\frac{140}{170} = 0.824[\/latex]<\/td>\r\n<td style=\"text-align: center; width: 24%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_2) = \\frac{160}{200} = 0.8}[\/latex]<\/span><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 22.5396%;\" scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<td style=\"text-align: center; width: 27.4604%;\" valign=\"top\">\r\n<div align=\"center\"><strong>1<\/strong><\/div><\/td>\r\n<td style=\"text-align: center; width: 26%;\" valign=\"top\">\r\n<div align=\"center\">1<\/div><\/td>\r\n<td style=\"text-align: center; width: 24%;\" valign=\"top\">\r\n<div align=\"center\">1<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nA segmented bar graph helps us visualize conditional distributions and the concept of association. The figure below is the segmented bar graph that displays the conditional distributions of \u201cCancer Status\u201d for smokers and non-smokers and the marginal distribution of \"Cancer Status\". The three bars should be identical if \u201cCancer Status\u201d and \u201cSmoking Status\u201d are independent. That is, the conditional probabilities should equal the unconditional probabilities:\r\n<p align=\"center\">[latex]P(C_1 | S_1) = P(C_1 | S_2) = P(C_1); P(C_2 | S_1) = P(C_2 | S_2) = P(C_2).[\/latex]<a id=\"retfig11.2\"><\/a><\/p>\r\n\r\n<table class=\"no-border\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">\r\n<tbody>\r\n<tr>\r\n<td style=\"vertical-align: top;\" valign=\"top\" width=\"357\">[caption id=\"attachment_1173\" align=\"aligncenter\" width=\"291\"]<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment.png\"><img class=\"wp-image-1173 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment-291x300.png\" alt=\"A segmented bar chart showing the relative proportions of cancer in green to non-cancer in red given smoking status. Image description available.\" width=\"291\" height=\"300\" \/><\/a> <strong>Figure 11.2<\/strong>: Segment Bar Chart. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig11.2\">Image Description (See Appendix D Figure 11.2)<\/a>] Click on the image to enlarge it.[\/caption]<\/td>\r\n<td style=\"vertical-align: top;\" valign=\"top\" width=\"357\">Interpretation:\r\n\r\nThe proportion or percentage of females with breast cancer (the green bar) is higher among the smokers than the non-smokers. Therefore, \u201cCancer Status\u201d and \u201cSmoking Status\u201d might be associated; we can test this by a chi-square independence test.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h2>11.4.2 Main Idea Behind Chi-Square Independence Test<\/h2>\r\nThe null hypothesis is that the two variables are independent; the alternative is that they are associated. The test statistic is the same as that from the chi-square goodness-of-fit test; for each cell, compute the difference between the observed frequency (O)\u00a0and the expected frequency ([latex]E[\/latex]), square it, and divide\u00a0by the expected frequency. The expected frequency is the number we expect to observe if the null is true. A large chi-square statistic means the observed and the expected frequencies are significantly different, which provides evidence against the null hypothesis. Therefore, we should reject the null if the observed chi-square statistic is sufficiently large. More specifically, given the significance level [latex]\\alpha[\/latex], reject [latex]H_0[\/latex]\u00a0if the P-value [latex]\\leq \\alpha[\/latex], where the\u00a0P-value is the area to the <strong>right<\/strong> of the observed test statistic under the chi-square curve.\r\n\r\nThe test procedure is straightforward\u2014the key is calculating each cell's expected frequency. Recall that two events, A and B , are independent if [latex]P(A \\: \\&amp; B) = P(A) \\times P(B)[\/latex]. For example, if the events \u201cBreast Cancer\u201d and \u201cSmoker\u201d are independent, then [latex]P(\\text{Breast Cancer \\&amp; Smoker}) = P(\\text{Breast Cancer}) \\times P(\\text{Smoker})[\/latex] where [latex]P(\\text{Breast Cancer})[\/latex] and [latex]P(\\text{Smoker})[\/latex] are given by the marginal distribution of \u201cCancer Status\u201d and \u201cSmoking Status\u201d respectively. That is,\r\n[latex] P(\\text{Breast Cancer}) = \\frac{40}{200} = 0.2; P(\\text{Smoker}) = \\frac{30}{200} = 0.15. [\/latex]\r\nIf [latex]H_0[\/latex] (the two variables are independent) is true, the expected frequency for the cell \u201cCancer and Smoker\u201d is\r\n[latex] E = n P(\\text{Cancer and Smoker}) = n P(\\text{Cancer}) P(\\text{Smoker})= 200 \\times \\frac{40}{200} \\times \\frac{30}{200} = \\frac{40 \\times 30}{200} = 6. [\/latex]\r\nIn general,\r\n[latex] \\text{Expected frequency of the cell in rth row and cth column} = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}. [\/latex]\r\nApplying the above formula to each cell yields the following expected frequencies:\r\n<ul>\r\n \t<li>\"Cancer\" &amp; \"Smoker\": [latex]E = \\frac{40 \\times 30}{200} = 6.[\/latex]<\/li>\r\n \t<li>\"Cancer\" &amp; \"Non-smoker\": [latex]E = \\frac{40 \\times 170}{200} = 34.[\/latex]<\/li>\r\n \t<li>\"Cancer free\" &amp; \"Smoker\": [latex]E = \\frac{160 \\times 30}{200} = 24.[\/latex]<\/li>\r\n \t<li>\"Cancer free\" &amp; \"Non-smoker\": [latex]E = \\frac{160 \\times 170}{200} = 136.[\/latex].<\/li>\r\n<\/ul>\r\nTo compute the test statistic, it is helpful to write each expected frequency in the same cell as the corresponding observed frequency. The following table gives both the observed and expected frequencies for each cell (the expected frequencies are displayed in brackets):\r\n<p style=\"text-align: left;\"><strong>Table 11.9<\/strong>: Observed and Expected Frequency (in Brackets) of Chi-Square Independent Test<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"first-col-border last-col-border\" style=\"width: 90%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 28%;\" valign=\"top\"><\/td>\r\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/span><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">10\u00a0 (6)<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">30\u00a0 (34)<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>40\u00a0 <\/strong><\/span><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\">\r\n<th scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">20\u00a0 (24)<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">140\u00a0 (136)<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>160<\/strong><\/span><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div class=\"bluetext\" align=\"center\"><strong>30<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div class=\"bluetext\" align=\"center\"><strong>170<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">200<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h3><strong>Chi-Square Independence Test<\/strong><\/h3>\r\nThe assumptions and steps of conducting a chi-square independence test are as follows.\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n\r\n<strong>Assumptions<\/strong>:\r\n<ol>\r\n \t<li>All expected frequencies are at least 1.<\/li>\r\n \t<li>At most 20% of the expected frequencies are less than 5.<\/li>\r\n \t<li>Simple random sample (required only if you need to generalize the conclusion to a larger population).<\/li>\r\n<\/ol>\r\n<strong>Note<\/strong>: If either assumption 1 or 2 is violated, one can consider combining the cells to make the counts in those cells larger.\r\n\r\n<strong>Steps to perform a <\/strong><strong>chi-square independence test<\/strong>:\r\n\r\nFirst, check the assumptions. Calculate the expected frequency for each possible value of the variable using [latex]E = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}[\/latex], where [latex]n[\/latex] is the total number of observations. Check whether the expected frequencies satisfy assumptions 1 and 2. If not, consider combining some cells.\r\n<ol>\r\n \t<li>Set up the hypotheses:\r\n[latex]\\begin{align*}\r\nH_0 &amp;: \\text{The two variables are independent} \\\\\r\nH_a &amp;: \\text{The two variables are associated}.\r\n\\end{align*}[\/latex]<\/li>\r\n \t<li>State the significance level [latex]\\alpha[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic: [latex]\\chi_o^2 = \\sum_{ \\text{all cells}} \\frac{(O- E)^2}{E}[\/latex]\u00a0 with, [latex]df = (r-1) \\times (c-1)[\/latex] where [latex]E = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}[\/latex], [latex]r[\/latex]\u00a0is the number of rows and [latex]c[\/latex]\u00a0is number of columns of the cells.<\/li>\r\n \t<li>Find the P-value <strong>or<\/strong> rejection region based on the [latex]\\chi^2[\/latex] curve with [latex]df = (r-1) \\times (c-1)[\/latex]\r\n<div align=\"center\">\r\n<table class=\"first-col-border\" style=\"width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr class=\"border-bottom\">\r\n<th style=\"width: 12.592592592592593%;\" scope=\"row\" valign=\"top\">P-value<\/th>\r\n<td style=\"width: 87.25925925925927%;\" valign=\"top\">\u00a0[latex]P(\\chi^2 \\geq \\chi_o^2)[\/latex] the area to the right of [latex]\\chi_o^2[\/latex]\u00a0under the curve<\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 12.592592592592593%;\" scope=\"row\" valign=\"top\">Rejection region<\/th>\r\n<td style=\"width: 87.25925925925927%;\" valign=\"&quot;top\">\u00a0[latex]\\chi^2 \\geq \\chi_{\\alpha}^2[\/latex] the region to the right of [latex]\\chi_{\\alpha}^2[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div><\/li>\r\n \t<li>Reject the null [latex]H_0[\/latex]\u00a0if the P-value [latex]\\leq \\alpha[\/latex]\u00a0or [latex]\\chi_o^2[\/latex]\u00a0falls in the rejection region.<\/li>\r\n \t<li>Conclusion.<\/li>\r\n<\/ol>\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Chi-Square Independence Test<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nTest at the 10% significance level whether the variables \u201cCancer Status\u201d and \u201cSmoking Status\u201d are associated.\r\n<div align=\"center\">\r\n<table class=\"first-col-border last-col-border\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 190px;\" valign=\"top\"><\/td>\r\n<th style=\"text-align: center; width: 181px;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #3366ff;\"><strong>Smoker (S<span style=\"font-size: x-small;\">1<\/span>)<\/strong><\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 180px;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #3366ff;\"><strong>Non-smoker(S<span style=\"font-size: x-small;\">2<\/span>) <\/strong><\/span><\/div><\/th>\r\n<th style=\"text-align: center; width: 165px;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th style=\"width: 190px;\" scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/span><\/th>\r\n<td style=\"text-align: center; width: 181.444px;\" valign=\"top\">10 (6)<\/td>\r\n<td style=\"text-align: center; width: 180.889px;\" valign=\"top\">30\u00a0 (34)<\/td>\r\n<td style=\"text-align: center; width: 165.444px;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>40\u00a0 <\/strong><\/span><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\">\r\n<th style=\"width: 190px;\" scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/th>\r\n<td style=\"text-align: center; width: 181.444px;\" valign=\"top\">20\u00a0 (24)<\/td>\r\n<td style=\"text-align: center; width: 180.889px;\" valign=\"top\">140 (136)<\/td>\r\n<td style=\"text-align: center; width: 165.444px;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>160\u00a0 <\/strong><\/span><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 190px;\" scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\r\n<td style=\"text-align: center; width: 181.444px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #3366ff;\"><strong>30<\/strong><\/span><\/div><\/td>\r\n<td style=\"text-align: center; width: 180.889px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #3366ff;\"><strong>170<\/strong><\/span><\/div><\/td>\r\n<td style=\"text-align: center; width: 165.444px;\" valign=\"top\">200<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>Check the assumptions<\/strong>: The expected frequencies are the values given in brackets, all greater than 5. We must assume this is a simple random sample of females.\r\n\r\n<strong>Steps<\/strong>:\r\n<ol>\r\n \t<li>Set up the hypotheses:\r\n[latex]H_0: \\text{The variables \"Cancer Status\" and \"Smoking Status\" are independent}[\/latex]\r\n[latex]H_a: \\text{The variables \"Cancer Status\" and \"Smoking Status\" are associated.}[\/latex]<\/li>\r\n \t<li>The significance level is [latex]\\alpha = 0.1[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic:\r\n[latex]\\begin{align*}\\chi_o^2 &amp;= \\sum_{\\text{all cells}} \\frac{(O-E)^2}{E}\\\\&amp; = \\frac{(10-6)^2}{6}+ \\frac{(30-34)^2}{34}+ \\frac{(20-24)^2}{24}+ \\frac{(140-136)^2}{136} \\\\&amp;= 3.922. \\end{align*}[\/latex]\r\nwith [latex]df = (r-1) \\times (c-1) = (2-1) \\times (2-1) = 1[\/latex].<\/li>\r\n \t<li>Find the P-value:\r\n[latex]\\mbox{P-value}= P(\\chi^2 \\geq X_0^2) = P(\\chi^2 \\geq 3.992) \\Longrightarrow 0.025\u00a0 &lt; \\mbox{P-value} &lt; 0.05[\/latex] since [latex] 3.841(\\chi_{0.05}^2) &lt; \\chi_o^2=3.922 &lt; 5.024 (\\chi_{0.025}^2)[\/latex].<\/li>\r\n \t<li>Decision: Reject the null [latex]H_0[\/latex] sin,ce P-value [latex]\\leq 0.05 &lt; 0.1 (\\alpha)[\/latex].<\/li>\r\n \t<li>Conclusion: At the 10% significance level, we have sufficient evidence of an association between the variables \u201cCancer Status\u201d and \u201cSmoking Status\u201d.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n<div style=\"height: 55px; margin-top: 5px;\"><img class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" \/><\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Chi-Square Independence Test<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nA random sample of 230 adults yields the following data regarding age and Internet usage. At the 1% significance level, do the data provide sufficient evidence of an association between age and Internet usage?\r\n<p style=\"text-align: center;\"><strong>Table 11.10<\/strong>: Contingency Table of Internet Usage (row) and Age (column)<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"first-col-border last-col-border\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 157px;\" valign=\"top\" width=\"157\">\r\n<div align=\"center\"><\/div><\/td>\r\n<th style=\"text-align: center;\" scope=\"col\" valign=\"top\" width=\"145\">\r\n<div class=\"bluetext\" align=\"center\"><strong>18\u201324<\/strong><\/div><\/th>\r\n<th style=\"text-align: center;\" scope=\"col\" valign=\"top\" width=\"155\">\r\n<div class=\"bluetext\" align=\"center\"><strong>25\u201364<\/strong><\/div><\/th>\r\n<th style=\"text-align: center;\" scope=\"col\" valign=\"top\" width=\"136\">\r\n<div class=\"bluetext\" align=\"center\"><strong>65+<\/strong><\/div><\/th>\r\n<th style=\"text-align: center;\" scope=\"col\" valign=\"top\" width=\"94\">\r\n<div align=\"center\"><strong>Total<\/strong><\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\" width=\"157\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Never<\/span><\/div><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"145\">\r\n<div align=\"center\"><strong>6<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"155\">\r\n<div align=\"center\"><strong>38<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"136\">\r\n<div align=\"center\"><strong>31<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"94\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\"><strong>75<\/strong><\/span><\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\" width=\"157\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Sometimes<\/span><\/div><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"145\">\r\n<div align=\"center\"><strong>14<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"155\">\r\n<div align=\"center\"><strong>31<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"136\">\r\n<div align=\"center\"><strong>5<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"94\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\"><strong>50<\/strong><\/span><\/div><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\">\r\n<th scope=\"row\" valign=\"top\" width=\"157\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Every day<\/span><\/div><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"145\">\r\n<div align=\"center\"><strong>50<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"155\">\r\n<div align=\"center\"><strong>50<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"136\">\r\n<div align=\"center\"><strong>5<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"94\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\"><strong>105<\/strong><\/span><\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\" width=\"157\">\r\n<div align=\"center\"><strong>Total<\/strong><\/div><\/th>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"145\">\r\n<div class=\"bluetext\" align=\"center\"><strong>70<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"155\">\r\n<div class=\"bluetext\" align=\"center\"><strong>119<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"136\">\r\n<div class=\"bluetext\" align=\"center\"><strong>41<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"94\">\r\n<div align=\"center\">230<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<details><summary>Show\/Hide Answer<\/summary><strong>Answers:<\/strong>\r\n\r\n<strong>Check the assumptions<\/strong>.\r\n\r\nApplying the formula [latex]\\text{Expected frequency of the cell in rth row and cth column} = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}[\/latex] to each cell, the expected frequencies are given by:\r\n<ul>\r\n \t<li>\"Never\" &amp; \"18-24\": [latex]E = \\frac{75 \\times 70}{230} = 22.826.[\/latex]<\/li>\r\n \t<li>\"Never\" &amp; \"25-64\": [latex]E = \\frac{75 \\times 119}{230} = 38.804.[\/latex]<\/li>\r\n \t<li>\"Never\" &amp; \"65+\": [latex]E = \\frac{75 \\times 41}{230} = 13.370.[\/latex]<\/li>\r\n \t<li>\"Sometimes\" &amp; \"18-24\": [latex]E = \\frac{50 \\times 70}{230} = 15.217.[\/latex]<\/li>\r\n \t<li>\"Sometimes\" &amp; \"25-64\": [latex]E = \\frac{50 \\times 119}{230} = 25.870.[\/latex]<\/li>\r\n \t<li>\"Sometimes\" &amp; \"65+\": [latex]E = \\frac{50 \\times 41}{230} = 8.913.[\/latex]<\/li>\r\n \t<li>\"Every day\" &amp; \"18-24\": [latex]E = \\frac{105 \\times 70}{230} = 31.957.[\/latex]<\/li>\r\n \t<li>\"Every day\" &amp; \"25-64\": [latex]E = \\frac{105 \\times 119}{230} = 54.326.[\/latex]<\/li>\r\n \t<li>\"Every day\" &amp; \"65+\": [latex]E = \\frac{105 \\times 41}{230} = 18.717.[\/latex]<\/li>\r\n<\/ul>\r\nThe expected frequencies are given in brackets; they are all greater than 5. We are told this is a random sample. Therefore, assumptions for the chi-square independence test are satisfied.\r\n<p style=\"text-align: center;\"><strong>Table 11.11<\/strong>: Observed and Expected Frequency of Internet Usage (row) and Age (column)<\/p>\r\n\r\n<table class=\"aligncenter first-col-border last-col-border\" style=\"height: 75px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 156.921875px;\" valign=\"top\">\r\n<div align=\"center\"><\/div><\/td>\r\n<th style=\"text-align: center; height: 15px; width: 144.890625px;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\"><strong>18\u201324<\/strong><\/span><\/div><\/th>\r\n<th style=\"text-align: center; height: 15px; width: 154.890625px;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\"><strong>25\u201364<\/strong><\/span><\/div><\/th>\r\n<th style=\"text-align: center; height: 15px; width: 135.90625px;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\"><strong>65+<\/strong><\/span><\/div><\/th>\r\n<th style=\"text-align: center; height: 15px; width: 93.9375px;\" scope=\"col\" valign=\"top\">\r\n<div align=\"center\"><strong>Total<\/strong><\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Never<\/span><\/div><\/th>\r\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>6 <\/strong>(<em>22.826<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>38 <\/strong>(<em>38.804<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>31 <\/strong>(<em>13.370<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\"><strong>75<\/strong><\/span><\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Sometimes<\/span><\/div><\/th>\r\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>14 <\/strong>(<em>15.217<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>31 <\/strong>(<em>25.870<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>5 <\/strong>(<em>8.913<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\"><strong>50<\/strong><\/span><\/div><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\">Every day<\/span><\/div><\/th>\r\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>50 <\/strong>(<em>31.957<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>50 <\/strong>(<em>54.326<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\r\n<div align=\"center\"><strong>5 <\/strong>(<em>18.717<\/em>)<\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #ff0000;\"><strong>105<\/strong><\/span><\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\r\n<div align=\"center\"><strong>Total<\/strong><\/div><\/th>\r\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\"><strong>70<\/strong><\/span><\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\"><strong>119<\/strong><\/span><\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\r\n<div align=\"center\"><span style=\"color: #0000ff;\"><strong>41<\/strong><\/span><\/div><\/td>\r\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\r\n<div align=\"center\">230<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<strong>Steps<\/strong>:\r\n<ol>\r\n \t<li>Set up the hypotheses:\r\n[latex]\\begin{align*}\r\nH_0 &amp;: \\text{The variables \"Age\" and \"Internet usage\" are independent} \\\\\r\nH_a &amp;: \\text{The variables \"Age\" and \"Internet usage\" are associated}.\r\n\\end{align*}[\/latex]<\/li>\r\n \t<li>The significance level is [latex]\\alpha = 0.01[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic:\r\n<p align=\"center\">[latex]\\begin{align*}\\chi_o^2 &amp;= \\sum_{\\text{all cells}} \\frac{(O-E)^2}{E} \\\\&amp;= \\frac{(6-22.826)^2}{22.826}+ \\frac{(38-38.804)^2}{38.804}+ \\frac{(31-13.370)^2}{13.370} +\\frac{(14-15.217)^2}{15.217}\\\\&amp;+ \\frac{(31-25.870)^2}{25.870}+ \\frac{(5-8.913)^2}{8.913}+ \\frac{(50-31.957)^2}{31.957} +\\frac{(50-54.326)^2}{54.326}\\\\&amp;+\\frac{(5 - 18.717)^2}{18.717}= 59.084. \\end{align*}[\/latex]<\/p>\r\n\u00a0with\r\n<p align=\"center\">[latex]df = (r-1) \\times (c-1) = (3-1) \\times (3-1) = 4[\/latex].<\/p>\r\n<\/li>\r\n \t<li>Find the P-value: P-value= [latex]P(\\chi^2 \\geq \\chi_o^2) = P(\\chi^2 \\geq 59.084) &lt; 0.005[\/latex].<\/li>\r\n \t<li>Decision: Reject the null [latex]H_0[\/latex]\u00a0since P-value [latex]\\leq 0.005 &lt; 0.01 (\\alpha)[\/latex].<\/li>\r\n \t<li>Conclusion: At the 1% significance level, we have sufficient evidence that there is an association between age and Internet usage.<\/li>\r\n<\/ol>\r\n<\/details><\/div>\r\n<\/div>","rendered":"<p>The chi-square independence test is used to test for an association between two categorical variables of a population.<\/p>\n<h2>11.4.1 Terminologies Used for a Contingency Table<\/h2>\n<p>Recall that a contingency table summarizes the counts of two categorical variables. For example, the following contingency table groups 200 females according to their breast cancer status and smoking status:<\/p>\n<p style=\"text-align: left;\"><strong>Table 11.6<\/strong>: Contingency Table of Cancer Status (row) and Smoking Status (column)<\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border last-col-border\" style=\"width: 90%; border-spacing: 0px;\" cellpadding=\"5\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 30%;\" valign=\"top\"><\/td>\n<th class=\"bluetext\" style=\"text-align: center; width: 25%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div>\n<\/th>\n<th class=\"bluetext\" style=\"text-align: center; width: 25%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 20%;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th class=\"redtext\" scope=\"row\" valign=\"top\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/th>\n<td class=\"DUL\" style=\"text-align: center;\" valign=\"top\"><strong>10<\/strong> [latex]( C_1 \\: \\& \\: S_1 )[\/latex]<\/td>\n<td style=\"text-align: center;\" valign=\"top\"><strong>30<\/strong>\u00a0[latex]( C_1 \\: \\& \\: S_2 )[\/latex]<\/td>\n<td class=\"redtext\" style=\"text-align: center;\" valign=\"top\"><strong>40\u00a0 <\/strong><\/td>\n<\/tr>\n<tr class=\"border-bottom\">\n<th class=\"redtext\" scope=\"row\" valign=\"top\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/th>\n<td style=\"text-align: center;\" valign=\"top\"><strong>20<\/strong>\u00a0 [latex]( C_2 \\: \\& \\: S_1 )[\/latex]<\/td>\n<td style=\"text-align: center;\" valign=\"top\"><strong>140<\/strong>\u00a0 [latex]( C_2 \\: \\& \\: S_2 )[\/latex]<\/td>\n<td class=\"redtext\" style=\"text-align: center;\" valign=\"top\"><strong>160\u00a0 <\/strong><\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #0000ff;\"><strong>30<\/strong><\/span><\/td>\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #0000ff;\"><strong>170<\/strong><\/span><\/td>\n<td style=\"text-align: center;\" valign=\"top\">200<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Suppose we randomly select an individual from this sample. Define the events:<\/p>\n<p>[latex]\\begin{align*}  S_1 &= \\text{the subject is a smoker}; \\\\  S_2 &= \\text{the subject is a non-smoker}; \\\\  C_1 &= \\text{the subject has breast cancer}; \\\\  C_2 &= \\text{the subject does not have breast cancer.}  \\end{align*}[\/latex]<\/p>\n<p>The joint events are:<\/p>\n<p>[latex]\\begin{align*}  C_1 \\: \\& \\: S_1 &= \\text{the subject has cancer and is a smoker}; \\\\  C_1 \\: \\& \\: S_2 &= \\text{the subject has cancer and is a non-smoker}; \\\\  C_2 \\: \\& \\: S_1 &= \\text{the subject does not have cancer and is a smoker}; \\\\  C_2 \\: \\& \\: S_2 &= \\text{the subject does not have cancer and is a non-smoker.}  \\end{align*}[\/latex]<\/p>\n<p>The variable \u201cCancer Status\u201d is called the <span class=\"redtext\">row variable, and it has two possible values\u2014cancer or cancer-free<\/span>. The variable \u201cSmoking Status\u201d is the <span class=\"bluetext\">column variable,<\/span> and it has two values\u2014smoker and non-smoker. The two numbers in the last column (40 and 160) are the <span class=\"redtext\">row totals<\/span> and the two in the last row (30, 170) are the <span class=\"bluetext\">column totals<\/span>. The sample size is also called the <em>grand total<\/em>. The four numbers in bold are the joint frequencies. The boxes that contain the joint frequencies are referred to as cells.<\/p>\n<p>Based on the [latex]\\frac{f}{N}[\/latex]\u00a0rule, the <strong>marginal distribution<\/strong> of the <span class=\"redtext\">row<\/span> (<span class=\"bluetext\">column<\/span>) variable equals the <span class=\"redtext\">row<\/span> (<span class=\"bluetext\">column<\/span>) totals divided by [latex]n[\/latex]. The <strong>joint distribution<\/strong> is given by the joint frequencies divided by [latex]n[\/latex]. The following table shows the marginal distribution of \u201cCancer Status\u201d in the last column, the marginal distribution of \u201cSmoking Status\u201d in the last row, and the joint distribution of the four cells.<\/p>\n<p style=\"text-align: left;\"><strong>Table 11.7<\/strong>: Marginal and Joint Probability Distributions of Cancer Status and Smoking Status<\/p>\n<table class=\"first-col-border last-col-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"5\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 21.4227%;\" valign=\"top\"><\/td>\n<th style=\"text-align: center; width: 28.2577%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 26.4536%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 23.866%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Total<\/strong><\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th class=\"redtext\" style=\"width: 21.4227%;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/div>\n<\/th>\n<td style=\"text-align: center; width: 28.2577%;\" valign=\"top\">[latex]P(C_1 \\: \\& \\: S_1) = \\frac{10}{200} = 0.05[\/latex]<\/td>\n<td style=\"text-align: center; width: 26.4536%;\" valign=\"top\">[latex]P(C_1 \\: \\& \\: S_2) = \\frac{30}{200} = 0.15[\/latex]<\/td>\n<td style=\"text-align: center; width: 23.866%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_1) = \\frac{40}{200} = 0.2}[\/latex]<\/span><\/td>\n<\/tr>\n<tr class=\"border-bottom\">\n<th style=\"width: 21.4227%;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; width: 28.2577%;\" valign=\"top\">[latex]P(C_2 \\: \\& \\: S_1) =\\frac{20}{200} = 0.1[\/latex]<\/td>\n<td style=\"text-align: center; width: 26.4536%;\" valign=\"top\">[latex]P(C_2 \\: \\& \\: S_2) = \\frac{140}{200} = 0.7[\/latex]<\/td>\n<td style=\"text-align: center; width: 23.866%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_1) = \\frac{160}{200} = 0.8}[\/latex]<\/span><\/td>\n<\/tr>\n<tr>\n<th style=\"width: 21.4227%;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Total<\/strong><\/div>\n<\/th>\n<td style=\"text-align: center; width: 28.2577%;\" valign=\"top\"><span style=\"color: #0000ff;\">\u00a0[latex]\\color{blue}{P(S_1) = \\frac{30}{200} = 0.15}[\/latex]<\/span><\/td>\n<td style=\"text-align: center; width: 26.4536%;\" valign=\"top\"><span style=\"color: #0000ff;\"> [latex]\\color{blue}{P(S_2) = \\frac{170}{200} = 0.85}[\/latex]<\/span><\/td>\n<td style=\"text-align: center; width: 23.866%;\" valign=\"top\">\n<div style=\"margin: auto;\">1<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We want to test for an association between the two variables in a contingency table. Two variables are said to be associated if they are NOT independent. If two variables are associated, then differences exist among the conditional distributions of one variable, given different values of the other variable. For example, the conditional distributions of \u201cCancer Status\u201d given \u201cSmoking Status\u201d are given in the following table. Notice that the conditional distributions are simply the relative frequencies of \u201cCancer\u201d within smoker and non-smoker groups.<\/p>\n<p style=\"text-align: left;\"><strong>Table 11.8<\/strong>: Conditional Probability Distribution of Cancer Status Given Smoking Status<\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border last-col-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"5\">\n<thead><\/thead>\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 22.5396%;\" valign=\"top\">\n<div style=\"margin: auto;\"><\/div>\n<\/td>\n<th style=\"text-align: center; width: 27.4604%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 26%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Marginal Distribution<\/strong><br \/>\n<strong>Of Cancer Status<\/strong><\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"width: 22.5396%;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; width: 27.4604%;\" valign=\"top\">[latex]P(C_1 | S_1) = \\frac{10}{30} = 0.333[\/latex]<\/td>\n<td style=\"text-align: center; width: 26%;\" valign=\"top\">[latex]P(C_1 | S_2) = \\frac{30}{170} = 0.176[\/latex]<\/td>\n<td style=\"text-align: center; width: 24%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_1) = \\frac{40}{200} = 0.2}[\/latex]<\/span><\/td>\n<\/tr>\n<tr class=\"border-bottom\">\n<th style=\"width: 22.5396%;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; width: 27.4604%;\" valign=\"top\">[latex]P(C_2 | S_1) = \\frac{20}{30} = 0.677[\/latex]<\/td>\n<td style=\"text-align: center; width: 26%;\" valign=\"top\">[latex]P(C_2 | S_2) = \\frac{140}{170} = 0.824[\/latex]<\/td>\n<td style=\"text-align: center; width: 24%;\" valign=\"top\"><span style=\"color: #ff0000;\">[latex]\\color{red}{P(C_2) = \\frac{160}{200} = 0.8}[\/latex]<\/span><\/td>\n<\/tr>\n<tr>\n<th style=\"width: 22.5396%;\" scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\n<td style=\"text-align: center; width: 27.4604%;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>1<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 26%;\" valign=\"top\">\n<div style=\"margin: auto;\">1<\/div>\n<\/td>\n<td style=\"text-align: center; width: 24%;\" valign=\"top\">\n<div style=\"margin: auto;\">1<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>A segmented bar graph helps us visualize conditional distributions and the concept of association. The figure below is the segmented bar graph that displays the conditional distributions of \u201cCancer Status\u201d for smokers and non-smokers and the marginal distribution of &#8220;Cancer Status&#8221;. The three bars should be identical if \u201cCancer Status\u201d and \u201cSmoking Status\u201d are independent. That is, the conditional probabilities should equal the unconditional probabilities:<\/p>\n<p style=\"text-align: center;\">[latex]P(C_1 | S_1) = P(C_1 | S_2) = P(C_1); P(C_2 | S_1) = P(C_2 | S_2) = P(C_2).[\/latex]<a id=\"retfig11.2\"><\/a><\/p>\n<table class=\"no-border\" cellpadding=\"3\" style=\"border-spacing: 0px;\">\n<tbody>\n<tr>\n<td style=\"vertical-align: top; width: 357px;\" valign=\"top\">\n<figure id=\"attachment_1173\" aria-describedby=\"caption-attachment-1173\" style=\"width: 291px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1173 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment-291x300.png\" alt=\"A segmented bar chart showing the relative proportions of cancer in green to non-cancer in red given smoking status. Image description available.\" width=\"291\" height=\"300\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment-291x300.png 291w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment-65x67.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment-225x232.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment-350x360.png 350w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m11_Cancer_Chi-Squire_Segment.png 548w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/a><figcaption id=\"caption-attachment-1173\" class=\"wp-caption-text\"><strong>Figure 11.2<\/strong>: Segment Bar Chart. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig11.2\">Image Description (See Appendix D Figure 11.2)<\/a>] Click on the image to enlarge it.<\/figcaption><\/figure>\n<\/td>\n<td style=\"vertical-align: top; width: 357px;\" valign=\"top\">Interpretation:<\/p>\n<p>The proportion or percentage of females with breast cancer (the green bar) is higher among the smokers than the non-smokers. Therefore, \u201cCancer Status\u201d and \u201cSmoking Status\u201d might be associated; we can test this by a chi-square independence test.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>11.4.2 Main Idea Behind Chi-Square Independence Test<\/h2>\n<p>The null hypothesis is that the two variables are independent; the alternative is that they are associated. The test statistic is the same as that from the chi-square goodness-of-fit test; for each cell, compute the difference between the observed frequency (O)\u00a0and the expected frequency ([latex]E[\/latex]), square it, and divide\u00a0by the expected frequency. The expected frequency is the number we expect to observe if the null is true. A large chi-square statistic means the observed and the expected frequencies are significantly different, which provides evidence against the null hypothesis. Therefore, we should reject the null if the observed chi-square statistic is sufficiently large. More specifically, given the significance level [latex]\\alpha[\/latex], reject [latex]H_0[\/latex]\u00a0if the P-value [latex]\\leq \\alpha[\/latex], where the\u00a0P-value is the area to the <strong>right<\/strong> of the observed test statistic under the chi-square curve.<\/p>\n<p>The test procedure is straightforward\u2014the key is calculating each cell&#8217;s expected frequency. Recall that two events, A and B , are independent if [latex]P(A \\: \\& B) = P(A) \\times P(B)[\/latex]. For example, if the events \u201cBreast Cancer\u201d and \u201cSmoker\u201d are independent, then [latex]P(\\text{Breast Cancer \\& Smoker}) = P(\\text{Breast Cancer}) \\times P(\\text{Smoker})[\/latex] where [latex]P(\\text{Breast Cancer})[\/latex] and [latex]P(\\text{Smoker})[\/latex] are given by the marginal distribution of \u201cCancer Status\u201d and \u201cSmoking Status\u201d respectively. That is,<br \/>\n[latex]P(\\text{Breast Cancer}) = \\frac{40}{200} = 0.2; P(\\text{Smoker}) = \\frac{30}{200} = 0.15.[\/latex]<br \/>\nIf [latex]H_0[\/latex] (the two variables are independent) is true, the expected frequency for the cell \u201cCancer and Smoker\u201d is<br \/>\n[latex]E = n P(\\text{Cancer and Smoker}) = n P(\\text{Cancer}) P(\\text{Smoker})= 200 \\times \\frac{40}{200} \\times \\frac{30}{200} = \\frac{40 \\times 30}{200} = 6.[\/latex]<br \/>\nIn general,<br \/>\n[latex]\\text{Expected frequency of the cell in rth row and cth column} = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}.[\/latex]<br \/>\nApplying the above formula to each cell yields the following expected frequencies:<\/p>\n<ul>\n<li>&#8220;Cancer&#8221; &amp; &#8220;Smoker&#8221;: [latex]E = \\frac{40 \\times 30}{200} = 6.[\/latex]<\/li>\n<li>&#8220;Cancer&#8221; &amp; &#8220;Non-smoker&#8221;: [latex]E = \\frac{40 \\times 170}{200} = 34.[\/latex]<\/li>\n<li>&#8220;Cancer free&#8221; &amp; &#8220;Smoker&#8221;: [latex]E = \\frac{160 \\times 30}{200} = 24.[\/latex]<\/li>\n<li>&#8220;Cancer free&#8221; &amp; &#8220;Non-smoker&#8221;: [latex]E = \\frac{160 \\times 170}{200} = 136.[\/latex].<\/li>\n<\/ul>\n<p>To compute the test statistic, it is helpful to write each expected frequency in the same cell as the corresponding observed frequency. The following table gives both the observed and expected frequencies for each cell (the expected frequencies are displayed in brackets):<\/p>\n<p style=\"text-align: left;\"><strong>Table 11.9<\/strong>: Observed and Expected Frequency (in Brackets) of Chi-Square Independent Test<\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border last-col-border\" style=\"width: 90%; border-spacing: 0px;\" cellpadding=\"5\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 28%;\" valign=\"top\"><\/td>\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Smoker [latex]\\color{blue}{(S_1)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\">Non-smoker [latex]\\color{blue}{(S_2)}[\/latex]<\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 24%;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/span><\/th>\n<td style=\"text-align: center;\" valign=\"top\">10\u00a0 (6)<\/td>\n<td style=\"text-align: center;\" valign=\"top\">30\u00a0 (34)<\/td>\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>40\u00a0 <\/strong><\/span><\/td>\n<\/tr>\n<tr class=\"border-bottom\">\n<th scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/th>\n<td style=\"text-align: center;\" valign=\"top\">20\u00a0 (24)<\/td>\n<td style=\"text-align: center;\" valign=\"top\">140\u00a0 (136)<\/td>\n<td style=\"text-align: center;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>160<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\n<td style=\"text-align: center;\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>30<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>170<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">200<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><strong>Chi-Square Independence Test<\/strong><\/h3>\n<p>The assumptions and steps of conducting a chi-square independence test are as follows.<\/p>\n<\/div>\n<div class=\"textbox\">\n<p><strong>Assumptions<\/strong>:<\/p>\n<ol>\n<li>All expected frequencies are at least 1.<\/li>\n<li>At most 20% of the expected frequencies are less than 5.<\/li>\n<li>Simple random sample (required only if you need to generalize the conclusion to a larger population).<\/li>\n<\/ol>\n<p><strong>Note<\/strong>: If either assumption 1 or 2 is violated, one can consider combining the cells to make the counts in those cells larger.<\/p>\n<p><strong>Steps to perform a <\/strong><strong>chi-square independence test<\/strong>:<\/p>\n<p>First, check the assumptions. Calculate the expected frequency for each possible value of the variable using [latex]E = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}[\/latex], where [latex]n[\/latex] is the total number of observations. Check whether the expected frequencies satisfy assumptions 1 and 2. If not, consider combining some cells.<\/p>\n<ol>\n<li>Set up the hypotheses:<br \/>\n[latex]\\begin{align*}  H_0 &: \\text{The two variables are independent} \\\\  H_a &: \\text{The two variables are associated}.  \\end{align*}[\/latex]<\/li>\n<li>State the significance level [latex]\\alpha[\/latex].<\/li>\n<li>Compute the value of the test statistic: [latex]\\chi_o^2 = \\sum_{ \\text{all cells}} \\frac{(O- E)^2}{E}[\/latex]\u00a0 with, [latex]df = (r-1) \\times (c-1)[\/latex] where [latex]E = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}[\/latex], [latex]r[\/latex]\u00a0is the number of rows and [latex]c[\/latex]\u00a0is number of columns of the cells.<\/li>\n<li>Find the P-value <strong>or<\/strong> rejection region based on the [latex]\\chi^2[\/latex] curve with [latex]df = (r-1) \\times (c-1)[\/latex]\n<div style=\"margin: auto;\">\n<table class=\"first-col-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"0\">\n<tbody>\n<tr class=\"border-bottom\">\n<th style=\"width: 12.592592592592593%;\" scope=\"row\" valign=\"top\">P-value<\/th>\n<td style=\"width: 87.25925925925927%;\" valign=\"top\">\u00a0[latex]P(\\chi^2 \\geq \\chi_o^2)[\/latex] the area to the right of [latex]\\chi_o^2[\/latex]\u00a0under the curve<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 12.592592592592593%;\" scope=\"row\" valign=\"top\">Rejection region<\/th>\n<td style=\"width: 87.25925925925927%;\" valign=\"&quot;top\">\u00a0[latex]\\chi^2 \\geq \\chi_{\\alpha}^2[\/latex] the region to the right of [latex]\\chi_{\\alpha}^2[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<li>Reject the null [latex]H_0[\/latex]\u00a0if the P-value [latex]\\leq \\alpha[\/latex]\u00a0or [latex]\\chi_o^2[\/latex]\u00a0falls in the rejection region.<\/li>\n<li>Conclusion.<\/li>\n<\/ol>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Chi-Square Independence Test<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Test at the 10% significance level whether the variables \u201cCancer Status\u201d and \u201cSmoking Status\u201d are associated.<\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border last-col-border\" cellpadding=\"5\" style=\"border-spacing: 0px;\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 190px;\" valign=\"top\"><\/td>\n<th style=\"text-align: center; width: 181px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #3366ff;\"><strong>Smoker (S<span style=\"font-size: x-small;\">1<\/span>)<\/strong><\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 180px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #3366ff;\"><strong>Non-smoker(S<span style=\"font-size: x-small;\">2<\/span>) <\/strong><\/span><\/div>\n<\/th>\n<th style=\"text-align: center; width: 165px;\" scope=\"col\" valign=\"top\"><strong>Total<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"width: 190px;\" scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Breast Cancer [latex]\\color{red}{(C_1)}[\/latex]<\/span><\/th>\n<td style=\"text-align: center; width: 181.444px;\" valign=\"top\">10 (6)<\/td>\n<td style=\"text-align: center; width: 180.889px;\" valign=\"top\">30\u00a0 (34)<\/td>\n<td style=\"text-align: center; width: 165.444px;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>40\u00a0 <\/strong><\/span><\/td>\n<\/tr>\n<tr class=\"border-bottom\">\n<th style=\"width: 190px;\" scope=\"row\" valign=\"top\"><span style=\"color: #ff0000;\">Cancer-free [latex]\\color{red}{(C_2)}[\/latex]<\/span><\/th>\n<td style=\"text-align: center; width: 181.444px;\" valign=\"top\">20\u00a0 (24)<\/td>\n<td style=\"text-align: center; width: 180.889px;\" valign=\"top\">140 (136)<\/td>\n<td style=\"text-align: center; width: 165.444px;\" valign=\"top\"><span style=\"color: #ff0000;\"><strong>160\u00a0 <\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<th style=\"width: 190px;\" scope=\"row\" valign=\"top\"><strong>Total<\/strong><\/th>\n<td style=\"text-align: center; width: 181.444px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #3366ff;\"><strong>30<\/strong><\/span><\/div>\n<\/td>\n<td style=\"text-align: center; width: 180.889px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #3366ff;\"><strong>170<\/strong><\/span><\/div>\n<\/td>\n<td style=\"text-align: center; width: 165.444px;\" valign=\"top\">200<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>Check the assumptions<\/strong>: The expected frequencies are the values given in brackets, all greater than 5. We must assume this is a simple random sample of females.<\/p>\n<p><strong>Steps<\/strong>:<\/p>\n<ol>\n<li>Set up the hypotheses:<br \/>\n[latex]H_0: \\text{The variables \"Cancer Status\" and \"Smoking Status\" are independent}[\/latex]<br \/>\n[latex]H_a: \\text{The variables \"Cancer Status\" and \"Smoking Status\" are associated.}[\/latex]<\/li>\n<li>The significance level is [latex]\\alpha = 0.1[\/latex].<\/li>\n<li>Compute the value of the test statistic:<br \/>\n[latex]\\begin{align*}\\chi_o^2 &= \\sum_{\\text{all cells}} \\frac{(O-E)^2}{E}\\\\& = \\frac{(10-6)^2}{6}+ \\frac{(30-34)^2}{34}+ \\frac{(20-24)^2}{24}+ \\frac{(140-136)^2}{136} \\\\&= 3.922. \\end{align*}[\/latex]<br \/>\nwith [latex]df = (r-1) \\times (c-1) = (2-1) \\times (2-1) = 1[\/latex].<\/li>\n<li>Find the P-value:<br \/>\n[latex]\\mbox{P-value}= P(\\chi^2 \\geq X_0^2) = P(\\chi^2 \\geq 3.992) \\Longrightarrow 0.025\u00a0 < \\mbox{P-value} < 0.05[\/latex] since [latex]3.841(\\chi_{0.05}^2) < \\chi_o^2=3.922 < 5.024 (\\chi_{0.025}^2)[\/latex].<\/li>\n<li>Decision: Reject the null [latex]H_0[\/latex] sin,ce P-value [latex]\\leq 0.05 < 0.1 (\\alpha)[\/latex].<\/li>\n<li>Conclusion: At the 10% significance level, we have sufficient evidence of an association between the variables \u201cCancer Status\u201d and \u201cSmoking Status\u201d.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div style=\"height: 55px; margin-top: 5px;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png 250w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-65x13.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-225x45.png 225w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Chi-Square Independence Test<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>A random sample of 230 adults yields the following data regarding age and Internet usage. At the 1% significance level, do the data provide sufficient evidence of an association between age and Internet usage?<\/p>\n<p style=\"text-align: center;\"><strong>Table 11.10<\/strong>: Contingency Table of Internet Usage (row) and Age (column)<\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border last-col-border\" cellpadding=\"0\" style=\"border-spacing: 0px;\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 157px; width: 157px;\" valign=\"top\">\n<div style=\"margin: auto;\"><\/div>\n<\/td>\n<th style=\"text-align: center; width: 145px;\" scope=\"col\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>18\u201324<\/strong><\/div>\n<\/th>\n<th style=\"text-align: center; width: 155px;\" scope=\"col\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>25\u201364<\/strong><\/div>\n<\/th>\n<th style=\"text-align: center; width: 136px;\" scope=\"col\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>65+<\/strong><\/div>\n<\/th>\n<th style=\"text-align: center; width: 94px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Total<\/strong><\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th scope=\"row\" valign=\"top\" style=\"width: 157px;\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Never<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; width: 145px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>6<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 155px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>38<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 136px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>31<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 94px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\"><strong>75<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\" style=\"width: 157px;\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Sometimes<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; width: 145px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>14<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 155px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>31<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 136px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>5<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 94px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\"><strong>50<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr class=\"border-bottom\">\n<th scope=\"row\" valign=\"top\" style=\"width: 157px;\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Every day<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; width: 145px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>50<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 155px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>50<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 136px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>5<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 94px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\"><strong>105<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\" style=\"width: 157px;\">\n<div style=\"margin: auto;\"><strong>Total<\/strong><\/div>\n<\/th>\n<td style=\"text-align: center; width: 145px;\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>70<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 155px;\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>119<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 136px;\" valign=\"top\">\n<div class=\"bluetext\" style=\"margin: auto;\"><strong>41<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; width: 94px;\" valign=\"top\">\n<div style=\"margin: auto;\">230<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<details>\n<summary>Show\/Hide Answer<\/summary>\n<p><strong>Answers:<\/strong><\/p>\n<p><strong>Check the assumptions<\/strong>.<\/p>\n<p>Applying the formula [latex]\\text{Expected frequency of the cell in rth row and cth column} = \\frac{\\text{rth row total} \\times \\text{cth column total}}{n}[\/latex] to each cell, the expected frequencies are given by:<\/p>\n<ul>\n<li>&#8220;Never&#8221; &amp; &#8220;18-24&#8221;: [latex]E = \\frac{75 \\times 70}{230} = 22.826.[\/latex]<\/li>\n<li>&#8220;Never&#8221; &amp; &#8220;25-64&#8221;: [latex]E = \\frac{75 \\times 119}{230} = 38.804.[\/latex]<\/li>\n<li>&#8220;Never&#8221; &amp; &#8220;65+&#8221;: [latex]E = \\frac{75 \\times 41}{230} = 13.370.[\/latex]<\/li>\n<li>&#8220;Sometimes&#8221; &amp; &#8220;18-24&#8221;: [latex]E = \\frac{50 \\times 70}{230} = 15.217.[\/latex]<\/li>\n<li>&#8220;Sometimes&#8221; &amp; &#8220;25-64&#8221;: [latex]E = \\frac{50 \\times 119}{230} = 25.870.[\/latex]<\/li>\n<li>&#8220;Sometimes&#8221; &amp; &#8220;65+&#8221;: [latex]E = \\frac{50 \\times 41}{230} = 8.913.[\/latex]<\/li>\n<li>&#8220;Every day&#8221; &amp; &#8220;18-24&#8221;: [latex]E = \\frac{105 \\times 70}{230} = 31.957.[\/latex]<\/li>\n<li>&#8220;Every day&#8221; &amp; &#8220;25-64&#8221;: [latex]E = \\frac{105 \\times 119}{230} = 54.326.[\/latex]<\/li>\n<li>&#8220;Every day&#8221; &amp; &#8220;65+&#8221;: [latex]E = \\frac{105 \\times 41}{230} = 18.717.[\/latex]<\/li>\n<\/ul>\n<p>The expected frequencies are given in brackets; they are all greater than 5. We are told this is a random sample. Therefore, assumptions for the chi-square independence test are satisfied.<\/p>\n<p style=\"text-align: center;\"><strong>Table 11.11<\/strong>: Observed and Expected Frequency of Internet Usage (row) and Age (column)<\/p>\n<table class=\"aligncenter first-col-border last-col-border\" style=\"height: 75px; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 156.921875px;\" valign=\"top\">\n<div style=\"margin: auto;\"><\/div>\n<\/td>\n<th style=\"text-align: center; height: 15px; width: 144.890625px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\"><strong>18\u201324<\/strong><\/span><\/div>\n<\/th>\n<th style=\"text-align: center; height: 15px; width: 154.890625px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\"><strong>25\u201364<\/strong><\/span><\/div>\n<\/th>\n<th style=\"text-align: center; height: 15px; width: 135.90625px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\"><strong>65+<\/strong><\/span><\/div>\n<\/th>\n<th style=\"text-align: center; height: 15px; width: 93.9375px;\" scope=\"col\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Total<\/strong><\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Never<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>6 <\/strong>(<em>22.826<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>38 <\/strong>(<em>38.804<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>31 <\/strong>(<em>13.370<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\"><strong>75<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Sometimes<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>14 <\/strong>(<em>15.217<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>31 <\/strong>(<em>25.870<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>5 <\/strong>(<em>8.913<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\"><strong>50<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\">Every day<\/span><\/div>\n<\/th>\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>50 <\/strong>(<em>31.957<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>50 <\/strong>(<em>54.326<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>5 <\/strong>(<em>18.717<\/em>)<\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #ff0000;\"><strong>105<\/strong><\/span><\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 157.421875px;\" scope=\"row\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Total<\/strong><\/div>\n<\/th>\n<td style=\"text-align: center; height: 15px; width: 145.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\"><strong>70<\/strong><\/span><\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 155.890625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\"><strong>119<\/strong><\/span><\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 136.90625px;\" valign=\"top\">\n<div style=\"margin: auto;\"><span style=\"color: #0000ff;\"><strong>41<\/strong><\/span><\/div>\n<\/td>\n<td style=\"text-align: center; height: 15px; width: 94.4375px;\" valign=\"top\">\n<div style=\"margin: auto;\">230<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Steps<\/strong>:<\/p>\n<ol>\n<li>Set up the hypotheses:<br \/>\n[latex]\\begin{align*}  H_0 &: \\text{The variables \"Age\" and \"Internet usage\" are independent} \\\\  H_a &: \\text{The variables \"Age\" and \"Internet usage\" are associated}.  \\end{align*}[\/latex]<\/li>\n<li>The significance level is [latex]\\alpha = 0.01[\/latex].<\/li>\n<li>Compute the value of the test statistic:\n<p style=\"text-align: center;\">[latex]\\begin{align*}\\chi_o^2 &= \\sum_{\\text{all cells}} \\frac{(O-E)^2}{E} \\\\&= \\frac{(6-22.826)^2}{22.826}+ \\frac{(38-38.804)^2}{38.804}+ \\frac{(31-13.370)^2}{13.370} +\\frac{(14-15.217)^2}{15.217}\\\\&+ \\frac{(31-25.870)^2}{25.870}+ \\frac{(5-8.913)^2}{8.913}+ \\frac{(50-31.957)^2}{31.957} +\\frac{(50-54.326)^2}{54.326}\\\\&+\\frac{(5 - 18.717)^2}{18.717}= 59.084. \\end{align*}[\/latex]<\/p>\n<p>\u00a0with<\/p>\n<p style=\"text-align: center;\">[latex]df = (r-1) \\times (c-1) = (3-1) \\times (3-1) = 4[\/latex].<\/p>\n<\/li>\n<li>Find the P-value: P-value= [latex]P(\\chi^2 \\geq \\chi_o^2) = P(\\chi^2 \\geq 59.084) < 0.005[\/latex].<\/li>\n<li>Decision: Reject the null [latex]H_0[\/latex]\u00a0since P-value [latex]\\leq 0.005 < 0.01 (\\alpha)[\/latex].<\/li>\n<li>Conclusion: At the 1% significance level, we have sufficient evidence that there is an association between age and Internet usage.<\/li>\n<\/ol>\n<\/details>\n<\/div>\n<\/div>\n","protected":false},"author":19,"menu_order":4,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1170","chapter","type-chapter","status-publish","hentry"],"part":1148,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":79,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1170\/revisions"}],"predecessor-version":[{"id":5524,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1170\/revisions\/5524"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/1148"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1170\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=1170"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=1170"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=1170"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=1170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}