{"id":97,"date":"2021-01-12T22:19:49","date_gmt":"2021-01-12T22:19:49","guid":{"rendered":"https:\/\/textbooks.jaykesler.net\/introstats\/chapter\/test-of-independence\/"},"modified":"2023-04-19T20:01:24","modified_gmt":"2023-04-19T20:01:24","slug":"test-of-independence","status":"publish","type":"chapter","link":"https:\/\/textbooks.jaykesler.net\/introstats\/chapter\/test-of-independence\/","title":{"rendered":"Test of Independence"},"content":{"raw":"<span style=\"display: none;\">\r\n[latexpage]\r\n<\/span>\r\n<div id=\"38f9ef8b-6a38-4503-9f1b-95cade736687\" class=\"chapter-content-module\" data-type=\"page\" data-cnxml-to-html-ver=\"2.1.0\">\r\n<p id=\"element-834\">Tests of independence involve using a <span id=\"term209\" data-type=\"term\">contingency table<\/span> of observed (data) values.<\/p>\r\n<p id=\"element-230\">The test statistic for a <span id=\"term210\" data-type=\"term\">test of independence<\/span> is similar to that of a goodness-of-fit test:<\/p>\r\n$$\\sum_{(i,j)} \\frac{(O-E)^2}{E}$$\r\n<p id=\"element-874\">where:<\/p>\r\n\r\n<ul id=\"element-12123\">\r\n \t<li><em data-effect=\"italics\">O<\/em> = observed values<\/li>\r\n \t<li><em data-effect=\"italics\">E<\/em> = expected values<\/li>\r\n \t<li><em data-effect=\"italics\">i<\/em> = the number of rows in the table<\/li>\r\n \t<li><em data-effect=\"italics\">j<\/em> = the number of columns in the table<\/li>\r\n<\/ul>\r\n<p id=\"element-575\">There are $i\\cdot j$ terms of the form $\\frac{(O-E)^2}{E}$, and these resulting values are sometimes called the <strong>residuals<\/strong>.<\/p>\r\n<strong>A test of independence determines whether two factors are independent or not.<\/strong> You first encountered the term independence in <a href=\"http:\/\/part\/probability\/\">Probability Topics<\/a>. As a review, consider the following example.\r\n<div id=\"eip-155\" class=\"ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\"><header>\r\n<h3 class=\"os-title\" data-type=\"title\"><span id=\"1\" class=\"os-title-label\" data-type=\"\">Note<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"os-note-body\">\r\n<p id=\"eip-idp140445076868880\">The expected value for each cell needs to be at least five in order for you to use this test.<\/p>\r\n\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"element-54\" class=\"ui-has-child-title\" data-type=\"example\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">10.5<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"body\">\r\n<p id=\"element-904\">Suppose <em data-effect=\"italics\">A<\/em> = a speeding violation in the last year and <em data-effect=\"italics\">B<\/em> = a cell phone user while driving. If <em data-effect=\"italics\">A<\/em> and <em data-effect=\"italics\">B<\/em> are independent then <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em> AND <em data-effect=\"italics\">B<\/em>) = <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em>)<em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">B<\/em>). <em data-effect=\"italics\">A<\/em> AND <em data-effect=\"italics\">B<\/em> is the event that a driver received a speeding violation last year and also used a cell phone while driving. Suppose, in a study of drivers who received speeding violations in the last year, and who used cell phone while driving, that 755 people were surveyed. Out of the 755, 70 had a speeding violation and 685 did not; 305 used cell phones while driving and 450 did not.<\/p>\r\n<p id=\"element-427\">Let <em data-effect=\"italics\">y<\/em> = expected number of drivers who used a cell phone while driving and received speeding violations.<\/p>\r\n<p id=\"element-367\">If <em data-effect=\"italics\">A<\/em> and <em data-effect=\"italics\">B<\/em> are independent, then <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em> AND <em data-effect=\"italics\">B<\/em>) = <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em>)<em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">B<\/em>). By substitution,<\/p>\r\n$\\frac{y}{755} = \\left( \\frac{70}{755} \\right) \\left( \\frac{305}{755} \\right)$\r\n<p id=\"element-482\">Solve for $y$: $y=\\frac{(70)(305)}{755}=28.3$<em data-effect=\"italics\">\r\n<\/em><\/p>\r\nAbout 28 people from the sample are expected to use cell phones while driving and to receive speeding violations.\r\n<p id=\"element-365\">In a test of independence, we state the null and alternative hypotheses in words. Since the contingency table consists of <strong>two factors<\/strong>, the null hypothesis states that the factors are <strong>independent<\/strong> and the alternative hypothesis states that they are <strong>not independent (dependent)<\/strong>. If we do a test of independence using the example, then the null hypothesis is:<\/p>\r\n<p id=\"element-337\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: Being a cell phone user while driving and receiving a speeding violation are independent events.<\/p>\r\n<p id=\"element-903\">If the null hypothesis were true, we would expect about 28 people to use cell phones while driving and to receive a speeding violation.<\/p>\r\n<p id=\"element-197\"><strong>The test of independence is always right-tailed<\/strong> because of the calculation of the test statistic. If the expected and observed values are not close together, then the test statistic is very large and way out in the right tail of the chi-square curve, as it is in a goodness-of-fit.<\/p>\r\n<p id=\"element-35\">The number of degrees of freedom for the test of independence is:<\/p>\r\n<p id=\"element-12412\"><em data-effect=\"italics\">df<\/em> = (number of columns - 1)(number of rows - 1)<\/p>\r\n<p id=\"element-928\">The following formula calculates the <strong>expected number<\/strong> (<em data-effect=\"italics\">E<\/em>):<\/p>\r\n$$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}$$\r\n\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idp45633632\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">10.5<\/span><\/h3>\r\n<\/header><section>\r\n<div id=\"eip-298\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"eip-721\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"eip-935\">A sample of 300 students is taken. Of the students surveyed, 50 were music students, while 250 were not. Ninety-seven were on the honor roll, while 203 were not. If we assume being a music student and being on the honor roll are independent events, what is the expected number of music students who are also on the honor roll?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<div id=\"element-272\" class=\"ui-has-child-title\" data-type=\"example\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">10.6<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"body\">\r\n<p id=\"element-84\">In a volunteer group, adults 21 and older volunteer from one to nine hours each week to spend time with a disabled senior citizen. The program recruits among community college students, four-year college students, and nonstudents. In <a class=\"autogenerated-content\" href=\"#table-73248\">Table 10.15<\/a> is a <strong>sample<\/strong> of the adult volunteers and the number of hours they volunteer per week.<\/p>\r\n\r\n<div id=\"table-73248\" class=\"os-table \">\r\n<table summary=\"Table 10.15 Number of Hours Worked Per Week by Volunteer Type (Observed) The table contains observed (O) values (data). \" data-id=\"table-73248\">\r\n<thead valign=\"top\">\r\n<tr>\r\n<th scope=\"col\">Type of Volunteer<\/th>\r\n<th scope=\"col\" data-align=\"center\">1\u20133 Hours<\/th>\r\n<th scope=\"col\" data-align=\"center\">4\u20136 Hours<\/th>\r\n<th scope=\"col\" data-align=\"center\">7\u20139 Hours<\/th>\r\n<th scope=\"col\" data-align=\"center\">Row Total<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody valign=\"top\">\r\n<tr>\r\n<td>Community College Students<\/td>\r\n<td>111<\/td>\r\n<td>96<\/td>\r\n<td>48<\/td>\r\n<td>255<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Four-Year College Students<\/td>\r\n<td>96<\/td>\r\n<td>133<\/td>\r\n<td>61<\/td>\r\n<td>290<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Nonstudents<\/td>\r\n<td>91<\/td>\r\n<td>150<\/td>\r\n<td>53<\/td>\r\n<td>294<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Column Total<\/td>\r\n<td>298<\/td>\r\n<td>379<\/td>\r\n<td>162<\/td>\r\n<td>839<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.15<\/span> <span class=\"os-title\" data-type=\"title\">Number of Hours Worked Per Week by Volunteer Type (Observed) The table contains <strong>observed (O)<\/strong> values (data). <\/span><\/div>\r\n<\/div>\r\n<div id=\"exercise102\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"id8698829\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"element-2342\">Is the number of hours volunteered <strong>independent<\/strong> of the type of volunteer?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div id=\"id8698856\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\r\n<div class=\"ui-toggle-wrapper\"><\/div>\r\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\r\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">10.6<\/span><\/h4>\r\n<div class=\"os-solution-container\">\r\n<p id=\"element-8768798723\">The <strong>observed table<\/strong> and the question at the end of the problem, \"Is the number of hours volunteered independent of the type of volunteer?\" tell you this is a test of independence. The two factors are <strong>number of hours volunteered<\/strong> and <strong>type of volunteer<\/strong>. This test is always right-tailed.<\/p>\r\n<p id=\"element-945\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: The number of hours volunteered is <strong>independent<\/strong> of the type of volunteer.<\/p>\r\n<p id=\"element-255\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: The number of hours volunteered is <strong>dependent<\/strong> on the type of volunteer.<\/p>\r\n<strong>Calculate <em>E<\/em>, the Expected Values<\/strong>\r\n<p id=\"element-455\">The expected results are in <a class=\"autogenerated-content\" href=\"#table-73248a\">Table 10.16<\/a>. Each entry in the table is calculated using the formula<\/p>\r\n$$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}$$\r\n<div id=\"table-73248a\" class=\"os-table \">\r\n<table summary=\"Table 10.16 Number of Hours Worked Per Week by Volunteer Type (Expected) \" data-id=\"table-73248a\"><caption>The table contains <strong>expected<\/strong> (<em data-effect=\"italics\">E<\/em>) values (data).<\/caption>\r\n<thead valign=\"top\">\r\n<tr>\r\n<th scope=\"col\">Type of Volunteer<\/th>\r\n<th scope=\"col\" data-align=\"center\">1-3 Hours<\/th>\r\n<th scope=\"col\" data-align=\"center\">4-6 Hours<\/th>\r\n<th scope=\"col\" data-align=\"center\">7-9 Hours<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody valign=\"top\">\r\n<tr>\r\n<td>Community College Students<\/td>\r\n<td>90.57<\/td>\r\n<td>115.19<\/td>\r\n<td>49.24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Four-Year College Students<\/td>\r\n<td>103.00<\/td>\r\n<td>131.00<\/td>\r\n<td>56.00<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Nonstudents<\/td>\r\n<td>104.42<\/td>\r\n<td>132.81<\/td>\r\n<td>56.77<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.16<\/span> <span class=\"os-title\" data-type=\"title\">Number of Hours Worked Per Week by Volunteer Type (Expected)<\/span><\/div>\r\n<\/div>\r\n<p id=\"element-720\">For example, the calculation for the expected frequency for the top left cell is<\/p>\r\n$$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=\\frac{(255)(298)}{839}=90.57$$\r\n\r\n<strong>Create the $O-E$ table:<\/strong>\r\n\r\nTo create this table, simply subtract the values in each cell of the Expected table from the values in each cell of the original Observed table.\r\n<div id=\"table-73248ab\" class=\"os-table \">\r\n<table style=\"width: 450px;\" summary=\"Table 10.16 Number of Hours Worked Per Week by Volunteer Type (Expected) \" data-id=\"table-73248a\"><caption>The table contains observed (<em>O<\/em>) - <strong>expected<\/strong> (<em data-effect=\"italics\">E<\/em>) values.<\/caption>\r\n<thead valign=\"top\">\r\n<tr>\r\n<th style=\"width: 177.4px;\" scope=\"col\">Type of Volunteer<\/th>\r\n<th style=\"width: 70.7333px;\" scope=\"col\" data-align=\"center\">1-3 Hours<\/th>\r\n<th style=\"width: 72.25px;\" scope=\"col\" data-align=\"center\">4-6 Hours<\/th>\r\n<th style=\"width: 71.5px;\" scope=\"col\" data-align=\"center\">7-9 Hours<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody valign=\"top\">\r\n<tr>\r\n<td style=\"width: 177.4px;\">Community College Students<\/td>\r\n<td style=\"width: 70.7333px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:20.430000000000007}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">20.43<\/td>\r\n<td style=\"width: 72.25px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-19.189999999999998}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-19.19<\/td>\r\n<td style=\"width: 71.5px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-1.240000000000002}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-1.24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 177.4px;\">Four-Year College Students<\/td>\r\n<td style=\"width: 70.7333px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-7}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-7<\/td>\r\n<td style=\"width: 72.25px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">2<\/td>\r\n<td style=\"width: 71.5px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:5}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 177.4px;\">Nonstudents<\/td>\r\n<td style=\"width: 70.7333px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-13.420000000000002}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-13.42<\/td>\r\n<td style=\"width: 72.25px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:17.189999999999998}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">17.19<\/td>\r\n<td style=\"width: 71.5px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-3.770000000000003}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-3.77<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.16a<\/span> <span class=\"os-title\" data-type=\"title\">Observed minus Expected Number of Hours Worked Per Week by Volunteer Type<\/span><\/div>\r\n<\/div>\r\n<strong>Create the $\\frac{(O-E)^2}{E}$ table:<\/strong>\r\n\r\nTo create this table, square the values in each cell in the above $O-E$ table, and then divide each cell by the corresponding expected value in the $E$ expected value table.\r\n<div id=\"table-73248abc\" class=\"os-table \">\r\n<table style=\"width: 390px;\" summary=\"Table 10.16b Residuals of Number of Hours Worked Per Week by Volunteer Type\" data-id=\"table-73248a\"><caption>The table contains the residuals <strong>$\\frac{(O-E)^2}{E}$ <\/strong><\/caption>\r\n<thead valign=\"top\">\r\n<tr>\r\n<th style=\"width: 147.233px;\" scope=\"col\">Type of Volunteer<\/th>\r\n<th style=\"width: 60.8833px;\" scope=\"col\" data-align=\"center\">1-3 Hours<\/th>\r\n<th style=\"width: 62.2167px;\" scope=\"col\" data-align=\"center\">4-6 Hours<\/th>\r\n<th style=\"width: 61.55px;\" scope=\"col\" data-align=\"center\">7-9 Hours<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody valign=\"top\">\r\n<tr>\r\n<td style=\"width: 147.233px;\">Community College Students<\/td>\r\n<td style=\"width: 60.8833px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:4.608}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">4.608<\/td>\r\n<td style=\"width: 62.2167px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:3.197}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">3.197<\/td>\r\n<td style=\"width: 61.55px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.031}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.031<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 147.233px;\">Four-Year College Students<\/td>\r\n<td style=\"width: 60.8833px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.476}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.476<\/td>\r\n<td style=\"width: 62.2167px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.031}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.031<\/td>\r\n<td style=\"width: 61.55px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.446}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.446<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 147.233px;\">Nonstudents<\/td>\r\n<td style=\"width: 60.8833px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1.725}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">1.725<\/td>\r\n<td style=\"width: 62.2167px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2.225}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">2.225<\/td>\r\n<td style=\"width: 61.55px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.25}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.25<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.16b<\/span> <span class=\"os-title\" data-type=\"title\">Residuals of Number of Hours Worked Per Week by Volunteer Type<\/span><\/div>\r\n<\/div>\r\n&nbsp;\r\n\r\n<strong>Calculate the test statistic: <\/strong>\r\n\r\nAdd all values together in the the above table $\\frac{(O-E)^2}{E}$\r\n\r\n<em data-effect=\"italics\">\u03c7<\/em><sup>2<\/sup> = 12.99\r\n<p id=\"element-775\"><strong>Distribution for the test:<\/strong><\/p>\r\n$\\chi_4^2$\r\n<p id=\"fs-idp19708320\"><em data-effect=\"italics\">df<\/em> = (3 columns \u2013 1)(3 rows \u2013 1) = (2)(2) = 4<\/p>\r\n<p id=\"element-48\"><strong>Graph:<\/strong><\/p>\r\n\r\n<div id=\"fs-idm32439392\" class=\"os-figure\">\r\n<figure data-id=\"fs-idm32439392\"><span id=\"id8547662\" data-type=\"media\" data-alt=\"Nonsymmetrical chi-square curve with values of 0 and 12.99 on the x-axis representing the test statistic of number of hours worked by volunteers of different types. A vertical upward line extends from 12.99 to the curve and the area to the right of this is equal to the p-value.\" data-display=\"block\"><img class=\"alignnone size-medium wp-image-561\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250-300x90.jpg\" alt=\"Nonsymmetrical chi-square curve with values of 0 and 12.99 on the x-axis representing the test statistic of number of hours worked by volunteers of different types. A vertical upward line extends from 12.99 to the curve and the area to the right of this is equal to the p-value.\" width=\"300\" height=\"90\" \/><\/span><\/figure>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Figure <\/span><span class=\"os-number\">10.7<\/span><\/div>\r\n<\/div>\r\n<p id=\"element-117\"><strong>Probability statement:<\/strong><\/p>\r\nWe can use the CHISQ.DIST.RT as follows:\r\n\r\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\" default-formula-text-color\" dir=\"auto\">=<\/span><span class=\" default-formula-text-color\" dir=\"auto\">CHISQ.DIST.RT<\/span><span class=\" default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">12.99<\/span><span class=\" default-formula-text-color\" dir=\"auto\">,<\/span><span class=\"number\" dir=\"auto\">4<\/span><span class=\" default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code>\r\n\r\nThis gives us <em data-effect=\"italics\">p<\/em>-value=<em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">\u03c7<sup>2<\/sup><\/em> &gt; 12.99) = 0.0113\r\n<p id=\"element-347\"><strong>Compare <em data-effect=\"italics\">\u03b1<\/em> and the <em data-effect=\"italics\">p<\/em>-value:<\/strong> Since no <em data-effect=\"italics\">\u03b1<\/em> is given, assume <em data-effect=\"italics\">\u03b1<\/em> = 0.05. <em data-effect=\"italics\">p<\/em>-value = 0.0113. <em data-effect=\"italics\">\u03b1<\/em> &gt; <em data-effect=\"italics\">p<\/em>-value.<\/p>\r\n<p id=\"fs-idm62402592\"><strong>Make a decision:<\/strong> Since <em data-effect=\"italics\">\u03b1<\/em> &gt; <em data-effect=\"italics\">p<\/em>-value, reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>. This means that the factors are not independent.<\/p>\r\n<p id=\"element-590\"><strong>Conclusion:<\/strong> At a 5% level of significance, from the data, there is sufficient evidence to conclude that the number of hours volunteered and the type of volunteer are dependent on one another.<\/p>\r\n<p id=\"element-956\">For the example in <a class=\"autogenerated-content\" href=\"#table-73248\">Table 10.15<\/a>, if there had been another type of volunteer, teenagers, what would the degrees of freedom be<\/p>\r\n\r\n<div class=\"textbox\">\r\n<h3>Critical Value Method<\/h3>\r\nIf we were asked to calculate the critical value (instead of a <em>p<\/em>-value), we could use the significance level 0.05, the degrees of freedom 4, and the Google Sheets function CHISQ.INV.RT\r\n\r\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\" default-formula-text-color\" dir=\"auto\">=<\/span><span class=\" default-formula-text-color\" dir=\"auto\">CHISQ.INV.RT<\/span><span class=\" default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">0.05<\/span><span class=\" default-formula-text-color\" dir=\"auto\">,<\/span><span class=\"number\" dir=\"auto\">4<\/span><span class=\" default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code>\r\n\r\nWe find the critical value to be 9.488; comparing this to our test statistic 12.99, we reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>\u00a0since our test statistic is larger. Note that this is (and should always be) the same conclusion as using the <em>p<\/em>-value.\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>Using the Chi Square Distribution Table<\/h3>\r\n<h4>p-value Method<\/h4>\r\nTo use the <a href=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/Chi2Distribution.pdf\">Chi2 Distribution Table<\/a> to find a p-value range, look in the degrees of freedom row, 4 in this example. Find which two numbers \"sandwich\" your test statistic, 12.99.\r\n\r\nOur test statistic is between 11.143 and 13.277, so following those two columns up, we see our <em>p<\/em>-value is between 0.01 and 0.025\r\n\r\n0.01 &lt; <em>p<\/em>-value &lt; 0.025\r\n\r\n<img class=\"aligncenter size-full wp-image-681\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/chisq-pvalue-indep.png\" alt=\"Chi Square distribution highlighting row 4, and the areas 0.01 and 0.025\" width=\"1233\" height=\"246\" \/>\r\n\r\nWith this range, we can say for certain our <em>p<\/em>-value is less than the significance level 0.05, so we reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>\r\n\r\n&nbsp;\r\n<h4>Critical Value Method<\/h4>\r\nTo use the <a href=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/Chi2Distribution.pdf\">Chi2 Distribution Table<\/a> to find a critical value, find the 0.05 entry in the top row, go down to the <em>df<\/em> row 4. We get 9.488 as the critical value. Our test statistic 12.99 is larger, so we reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>.\r\n\r\n<img class=\"aligncenter size-full wp-image-682\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/chisq-critval-indep.png\" alt=\"Chi Square distribution highlighting the areas 0.05 and the critical value 9.488\" width=\"1231\" height=\"250\" \/>\r\n\r\n<\/div>\r\n<div><\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm24618832\" class=\"statistics try finger ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">10.6<\/span><\/h3>\r\n<\/header><section>\r\n<div id=\"eip-685\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"eip-903\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"eip-845\">The Bureau of Labor Statistics gathers data about employment in the United States. A sample is taken to calculate the number of U.S. citizens working in one of several industry sectors over time. <a class=\"autogenerated-content\" href=\"#fs-idp61742592\">Table 10.17<\/a> shows the results:<\/p>\r\n\r\n<div id=\"fs-idp61742592\" class=\"os-table \">\r\n<table summary=\"Table 10.17 \" data-id=\"fs-idp61742592\">\r\n<thead>\r\n<tr>\r\n<th scope=\"col\">Industry Sector<\/th>\r\n<th scope=\"col\">2000<\/th>\r\n<th scope=\"col\">2010<\/th>\r\n<th scope=\"col\">2020<\/th>\r\n<th scope=\"col\">Total<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>Nonagriculture wage and salary<\/td>\r\n<td>13,243<\/td>\r\n<td>13,044<\/td>\r\n<td>15,018<\/td>\r\n<td>41,305<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Goods-producing, excluding agriculture<\/td>\r\n<td>2,457<\/td>\r\n<td>1,771<\/td>\r\n<td>1,950<\/td>\r\n<td>6,178<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Services-providing<\/td>\r\n<td>10,786<\/td>\r\n<td>11,273<\/td>\r\n<td>13,068<\/td>\r\n<td>35,127<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Agriculture, forestry, fishing, and hunting<\/td>\r\n<td>240<\/td>\r\n<td>214<\/td>\r\n<td>201<\/td>\r\n<td>655<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Nonagriculture self-employed and unpaid family worker<\/td>\r\n<td>931<\/td>\r\n<td>894<\/td>\r\n<td>972<\/td>\r\n<td>2,797<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Secondary wage and salary jobs in agriculture and private household industries<\/td>\r\n<td>14<\/td>\r\n<td>11<\/td>\r\n<td>11<\/td>\r\n<td>36<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Secondary jobs as a self-employed or unpaid family worker<\/td>\r\n<td>196<\/td>\r\n<td>144<\/td>\r\n<td>152<\/td>\r\n<td>492<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Total<\/td>\r\n<td>27,867<\/td>\r\n<td>27,351<\/td>\r\n<td>31,372<\/td>\r\n<td>86,590<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.17<\/span><\/div>\r\n<\/div>\r\n<p id=\"eip-idp2741344\">We want to know if the change in the number of jobs is independent of the change in years. State the null and alternative hypotheses and the degrees of freedom.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<div id=\"element-505\" class=\"ui-has-child-title\" data-type=\"example\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">10.7<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"body\">\r\n<p id=\"element-311\">De Anza College is interested in the relationship between anxiety level and the need to succeed in school. A random sample of 400 students took a test that measured anxiety level and need to succeed in school. <a class=\"autogenerated-content\" href=\"#element-875\">Table 10.18<\/a> shows the results. De Anza College wants to know if anxiety level and need to succeed in school are independent events.<\/p>\r\n\r\n<div id=\"element-875\" class=\"os-table \">\r\n<table summary=\"Table 10.18 Need to Succeed in School vs. Anxiety Level \" data-id=\"element-875\">\r\n<thead valign=\"top\">\r\n<tr>\r\n<th scope=\"col\">Need to Succeed in School<\/th>\r\n<th scope=\"col\">High <span data-type=\"newline\">\r\n<\/span>Anxiety<\/th>\r\n<th scope=\"col\">Med-high <span data-type=\"newline\">\r\n<\/span>Anxiety<\/th>\r\n<th scope=\"col\">Medium <span data-type=\"newline\">\r\n<\/span>Anxiety<\/th>\r\n<th scope=\"col\">Med-low <span data-type=\"newline\">\r\n<\/span>Anxiety<\/th>\r\n<th scope=\"col\">Low <span data-type=\"newline\">\r\n<\/span>Anxiety<\/th>\r\n<th scope=\"col\">Row Total<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>High Need<\/td>\r\n<td>35<\/td>\r\n<td>42<\/td>\r\n<td>53<\/td>\r\n<td>15<\/td>\r\n<td>10<\/td>\r\n<td>155<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Medium Need<\/td>\r\n<td>18<\/td>\r\n<td>48<\/td>\r\n<td>63<\/td>\r\n<td>33<\/td>\r\n<td>31<\/td>\r\n<td>193<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Low Need<\/td>\r\n<td>4<\/td>\r\n<td>5<\/td>\r\n<td>11<\/td>\r\n<td>15<\/td>\r\n<td>17<\/td>\r\n<td>52<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Column Total<\/td>\r\n<td>57<\/td>\r\n<td>95<\/td>\r\n<td>127<\/td>\r\n<td>63<\/td>\r\n<td>58<\/td>\r\n<td>400<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.18<\/span> <span class=\"os-title\" data-type=\"title\">Need to Succeed in School vs. Anxiety Level<\/span><\/div>\r\n<\/div>\r\n<div id=\"element-454\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"id9399628\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<ol>\r\n \t<li id=\"element-671\">How many high anxiety level students are expected to have a high need to succeed in school?<\/li>\r\n \t<li>If the two variables are independent, how many students do you expect to have a low need to succeed in school and a med-low level of anxiety?<\/li>\r\n \t<li>$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=$______<\/li>\r\n \t<li>The expected number of students who have a med-low anxiety level and a low need to succeed in school is about ________.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"eip-699\" class=\" unnumbered\" data-type=\"exercise\"><section>\r\n<div id=\"id8469218a\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\r\n<div class=\"ui-toggle-wrapper\"><\/div>\r\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\r\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">10.7<\/span><\/h4>\r\n<ol>\r\n \t<li>The column total for a high anxiety level is 57. The row total for high need to succeed in school is 155. The sample size or total surveyed is 400.$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=\\frac{155.57}{400}=22.09$The expected number of students who have a high anxiety level and a high need to succeed in school is about 22.<\/li>\r\n \t<li class=\"os-solution-container\">\r\n<p id=\"element-921\">The column total for a med-low anxiety level is 63. The row total for a low need to succeed in school is 52. The sample size or total surveyed is 400.<\/p>\r\n<\/li>\r\n \t<li class=\"os-solution-container\">\r\n<p id=\"element-921\">$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=8.19$<\/p>\r\n<\/li>\r\n \t<li class=\"os-solution-container\">\r\n<p id=\"eip-idm130717088\">8<\/p>\r\n<\/li>\r\n<\/ol>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm15185536\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">10.7<\/span><\/h3>\r\n<\/header><section>\r\n<div id=\"eip-358\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"eip-928\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"eip-757\">Refer back to the information in <a class=\"autogenerated-content\" href=\"#fs-idm24618832\">Try It<\/a>. How many service providing jobs are there expected to be in 2020? How many nonagriculture wage and salary jobs are there expected to be in 2020?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>","rendered":"<p><span style=\"display: none;\"><br \/>\n[latexpage]<br \/>\n<\/span><\/p>\n<div id=\"38f9ef8b-6a38-4503-9f1b-95cade736687\" class=\"chapter-content-module\" data-type=\"page\" data-cnxml-to-html-ver=\"2.1.0\">\n<p id=\"element-834\">Tests of independence involve using a <span id=\"term209\" data-type=\"term\">contingency table<\/span> of observed (data) values.<\/p>\n<p id=\"element-230\">The test statistic for a <span id=\"term210\" data-type=\"term\">test of independence<\/span> is similar to that of a goodness-of-fit test:<\/p>\n<p>$$\\sum_{(i,j)} \\frac{(O-E)^2}{E}$$<\/p>\n<p id=\"element-874\">where:<\/p>\n<ul id=\"element-12123\">\n<li><em data-effect=\"italics\">O<\/em> = observed values<\/li>\n<li><em data-effect=\"italics\">E<\/em> = expected values<\/li>\n<li><em data-effect=\"italics\">i<\/em> = the number of rows in the table<\/li>\n<li><em data-effect=\"italics\">j<\/em> = the number of columns in the table<\/li>\n<\/ul>\n<p id=\"element-575\">There are $i\\cdot j$ terms of the form $\\frac{(O-E)^2}{E}$, and these resulting values are sometimes called the <strong>residuals<\/strong>.<\/p>\n<p><strong>A test of independence determines whether two factors are independent or not.<\/strong> You first encountered the term independence in <a href=\"http:\/\/part\/probability\/\">Probability Topics<\/a>. As a review, consider the following example.<\/p>\n<div id=\"eip-155\" class=\"ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\">\n<header>\n<h3 class=\"os-title\" data-type=\"title\"><span id=\"1\" class=\"os-title-label\" data-type=\"\">Note<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"os-note-body\">\n<p id=\"eip-idp140445076868880\">The expected value for each cell needs to be at least five in order for you to use this test.<\/p>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"element-54\" class=\"ui-has-child-title\" data-type=\"example\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">10.5<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"body\">\n<p id=\"element-904\">Suppose <em data-effect=\"italics\">A<\/em> = a speeding violation in the last year and <em data-effect=\"italics\">B<\/em> = a cell phone user while driving. If <em data-effect=\"italics\">A<\/em> and <em data-effect=\"italics\">B<\/em> are independent then <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em> AND <em data-effect=\"italics\">B<\/em>) = <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em>)<em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">B<\/em>). <em data-effect=\"italics\">A<\/em> AND <em data-effect=\"italics\">B<\/em> is the event that a driver received a speeding violation last year and also used a cell phone while driving. Suppose, in a study of drivers who received speeding violations in the last year, and who used cell phone while driving, that 755 people were surveyed. Out of the 755, 70 had a speeding violation and 685 did not; 305 used cell phones while driving and 450 did not.<\/p>\n<p id=\"element-427\">Let <em data-effect=\"italics\">y<\/em> = expected number of drivers who used a cell phone while driving and received speeding violations.<\/p>\n<p id=\"element-367\">If <em data-effect=\"italics\">A<\/em> and <em data-effect=\"italics\">B<\/em> are independent, then <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em> AND <em data-effect=\"italics\">B<\/em>) = <em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">A<\/em>)<em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">B<\/em>). By substitution,<\/p>\n<p>$\\frac{y}{755} = \\left( \\frac{70}{755} \\right) \\left( \\frac{305}{755} \\right)$<\/p>\n<p id=\"element-482\">Solve for $y$: $y=\\frac{(70)(305)}{755}=28.3$<em data-effect=\"italics\"><br \/>\n<\/em><\/p>\n<p>About 28 people from the sample are expected to use cell phones while driving and to receive speeding violations.<\/p>\n<p id=\"element-365\">In a test of independence, we state the null and alternative hypotheses in words. Since the contingency table consists of <strong>two factors<\/strong>, the null hypothesis states that the factors are <strong>independent<\/strong> and the alternative hypothesis states that they are <strong>not independent (dependent)<\/strong>. If we do a test of independence using the example, then the null hypothesis is:<\/p>\n<p id=\"element-337\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: Being a cell phone user while driving and receiving a speeding violation are independent events.<\/p>\n<p id=\"element-903\">If the null hypothesis were true, we would expect about 28 people to use cell phones while driving and to receive a speeding violation.<\/p>\n<p id=\"element-197\"><strong>The test of independence is always right-tailed<\/strong> because of the calculation of the test statistic. If the expected and observed values are not close together, then the test statistic is very large and way out in the right tail of the chi-square curve, as it is in a goodness-of-fit.<\/p>\n<p id=\"element-35\">The number of degrees of freedom for the test of independence is:<\/p>\n<p id=\"element-12412\"><em data-effect=\"italics\">df<\/em> = (number of columns &#8211; 1)(number of rows &#8211; 1)<\/p>\n<p id=\"element-928\">The following formula calculates the <strong>expected number<\/strong> (<em data-effect=\"italics\">E<\/em>):<\/p>\n<p>$$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}$$<\/p>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idp45633632\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">10.5<\/span><\/h3>\n<\/header>\n<section>\n<div id=\"eip-298\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"eip-721\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"eip-935\">A sample of 300 students is taken. Of the students surveyed, 50 were music students, while 250 were not. Ninety-seven were on the honor roll, while 203 were not. If we assume being a music student and being on the honor roll are independent events, what is the expected number of music students who are also on the honor roll?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"element-272\" class=\"ui-has-child-title\" data-type=\"example\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">10.6<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"body\">\n<p id=\"element-84\">In a volunteer group, adults 21 and older volunteer from one to nine hours each week to spend time with a disabled senior citizen. The program recruits among community college students, four-year college students, and nonstudents. In <a class=\"autogenerated-content\" href=\"#table-73248\">Table 10.15<\/a> is a <strong>sample<\/strong> of the adult volunteers and the number of hours they volunteer per week.<\/p>\n<div id=\"table-73248\" class=\"os-table\">\n<table summary=\"Table 10.15 Number of Hours Worked Per Week by Volunteer Type (Observed) The table contains observed (O) values (data).\" data-id=\"table-73248\">\n<thead valign=\"top\">\n<tr>\n<th scope=\"col\">Type of Volunteer<\/th>\n<th scope=\"col\" data-align=\"center\">1\u20133 Hours<\/th>\n<th scope=\"col\" data-align=\"center\">4\u20136 Hours<\/th>\n<th scope=\"col\" data-align=\"center\">7\u20139 Hours<\/th>\n<th scope=\"col\" data-align=\"center\">Row Total<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr>\n<td>Community College Students<\/td>\n<td>111<\/td>\n<td>96<\/td>\n<td>48<\/td>\n<td>255<\/td>\n<\/tr>\n<tr>\n<td>Four-Year College Students<\/td>\n<td>96<\/td>\n<td>133<\/td>\n<td>61<\/td>\n<td>290<\/td>\n<\/tr>\n<tr>\n<td>Nonstudents<\/td>\n<td>91<\/td>\n<td>150<\/td>\n<td>53<\/td>\n<td>294<\/td>\n<\/tr>\n<tr>\n<td>Column Total<\/td>\n<td>298<\/td>\n<td>379<\/td>\n<td>162<\/td>\n<td>839<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.15<\/span> <span class=\"os-title\" data-type=\"title\">Number of Hours Worked Per Week by Volunteer Type (Observed) The table contains <strong>observed (O)<\/strong> values (data). <\/span><\/div>\n<\/div>\n<div id=\"exercise102\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"id8698829\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"element-2342\">Is the number of hours volunteered <strong>independent<\/strong> of the type of volunteer?<\/p>\n<\/div>\n<\/div>\n<div id=\"id8698856\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\n<div class=\"ui-toggle-wrapper\"><\/div>\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">10.6<\/span><\/h4>\n<div class=\"os-solution-container\">\n<p id=\"element-8768798723\">The <strong>observed table<\/strong> and the question at the end of the problem, &#8220;Is the number of hours volunteered independent of the type of volunteer?&#8221; tell you this is a test of independence. The two factors are <strong>number of hours volunteered<\/strong> and <strong>type of volunteer<\/strong>. This test is always right-tailed.<\/p>\n<p id=\"element-945\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: The number of hours volunteered is <strong>independent<\/strong> of the type of volunteer.<\/p>\n<p id=\"element-255\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: The number of hours volunteered is <strong>dependent<\/strong> on the type of volunteer.<\/p>\n<p><strong>Calculate <em>E<\/em>, the Expected Values<\/strong><\/p>\n<p id=\"element-455\">The expected results are in <a class=\"autogenerated-content\" href=\"#table-73248a\">Table 10.16<\/a>. Each entry in the table is calculated using the formula<\/p>\n<p>$$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}$$<\/p>\n<div id=\"table-73248a\" class=\"os-table\">\n<table summary=\"Table 10.16 Number of Hours Worked Per Week by Volunteer Type (Expected)\" data-id=\"table-73248a\">\n<caption>The table contains <strong>expected<\/strong> (<em data-effect=\"italics\">E<\/em>) values (data).<\/caption>\n<thead valign=\"top\">\n<tr>\n<th scope=\"col\">Type of Volunteer<\/th>\n<th scope=\"col\" data-align=\"center\">1-3 Hours<\/th>\n<th scope=\"col\" data-align=\"center\">4-6 Hours<\/th>\n<th scope=\"col\" data-align=\"center\">7-9 Hours<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr>\n<td>Community College Students<\/td>\n<td>90.57<\/td>\n<td>115.19<\/td>\n<td>49.24<\/td>\n<\/tr>\n<tr>\n<td>Four-Year College Students<\/td>\n<td>103.00<\/td>\n<td>131.00<\/td>\n<td>56.00<\/td>\n<\/tr>\n<tr>\n<td>Nonstudents<\/td>\n<td>104.42<\/td>\n<td>132.81<\/td>\n<td>56.77<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.16<\/span> <span class=\"os-title\" data-type=\"title\">Number of Hours Worked Per Week by Volunteer Type (Expected)<\/span><\/div>\n<\/div>\n<p id=\"element-720\">For example, the calculation for the expected frequency for the top left cell is<\/p>\n<p>$$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=\\frac{(255)(298)}{839}=90.57$$<\/p>\n<p><strong>Create the $O-E$ table:<\/strong><\/p>\n<p>To create this table, simply subtract the values in each cell of the Expected table from the values in each cell of the original Observed table.<\/p>\n<div id=\"table-73248ab\" class=\"os-table\">\n<table style=\"width: 450px;\" summary=\"Table 10.16 Number of Hours Worked Per Week by Volunteer Type (Expected)\" data-id=\"table-73248a\">\n<caption>The table contains observed (<em>O<\/em>) &#8211; <strong>expected<\/strong> (<em data-effect=\"italics\">E<\/em>) values.<\/caption>\n<thead valign=\"top\">\n<tr>\n<th style=\"width: 177.4px;\" scope=\"col\">Type of Volunteer<\/th>\n<th style=\"width: 70.7333px;\" scope=\"col\" data-align=\"center\">1-3 Hours<\/th>\n<th style=\"width: 72.25px;\" scope=\"col\" data-align=\"center\">4-6 Hours<\/th>\n<th style=\"width: 71.5px;\" scope=\"col\" data-align=\"center\">7-9 Hours<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr>\n<td style=\"width: 177.4px;\">Community College Students<\/td>\n<td style=\"width: 70.7333px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:20.430000000000007}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">20.43<\/td>\n<td style=\"width: 72.25px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-19.189999999999998}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-19.19<\/td>\n<td style=\"width: 71.5px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-1.240000000000002}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-1.24<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 177.4px;\">Four-Year College Students<\/td>\n<td style=\"width: 70.7333px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-7}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-7<\/td>\n<td style=\"width: 72.25px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">2<\/td>\n<td style=\"width: 71.5px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:5}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">5<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 177.4px;\">Nonstudents<\/td>\n<td style=\"width: 70.7333px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-13.420000000000002}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-13.42<\/td>\n<td style=\"width: 72.25px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:17.189999999999998}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">17.19<\/td>\n<td style=\"width: 71.5px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:-3.770000000000003}\" data-sheets-formula=\"=R[-8]C[0]-R[-4]C[0]\">-3.77<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.16a<\/span> <span class=\"os-title\" data-type=\"title\">Observed minus Expected Number of Hours Worked Per Week by Volunteer Type<\/span><\/div>\n<\/div>\n<p><strong>Create the $\\frac{(O-E)^2}{E}$ table:<\/strong><\/p>\n<p>To create this table, square the values in each cell in the above $O-E$ table, and then divide each cell by the corresponding expected value in the $E$ expected value table.<\/p>\n<div id=\"table-73248abc\" class=\"os-table\">\n<table style=\"width: 390px;\" summary=\"Table 10.16b Residuals of Number of Hours Worked Per Week by Volunteer Type\" data-id=\"table-73248a\">\n<caption>The table contains the residuals <strong>$\\frac{(O-E)^2}{E}$ <\/strong><\/caption>\n<thead valign=\"top\">\n<tr>\n<th style=\"width: 147.233px;\" scope=\"col\">Type of Volunteer<\/th>\n<th style=\"width: 60.8833px;\" scope=\"col\" data-align=\"center\">1-3 Hours<\/th>\n<th style=\"width: 62.2167px;\" scope=\"col\" data-align=\"center\">4-6 Hours<\/th>\n<th style=\"width: 61.55px;\" scope=\"col\" data-align=\"center\">7-9 Hours<\/th>\n<\/tr>\n<\/thead>\n<tbody valign=\"top\">\n<tr>\n<td style=\"width: 147.233px;\">Community College Students<\/td>\n<td style=\"width: 60.8833px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:4.608}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">4.608<\/td>\n<td style=\"width: 62.2167px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:3.197}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">3.197<\/td>\n<td style=\"width: 61.55px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.031}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.031<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 147.233px;\">Four-Year College Students<\/td>\n<td style=\"width: 60.8833px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.476}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.476<\/td>\n<td style=\"width: 62.2167px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.031}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.031<\/td>\n<td style=\"width: 61.55px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.446}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.446<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 147.233px;\">Nonstudents<\/td>\n<td style=\"width: 60.8833px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1.725}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">1.725<\/td>\n<td style=\"width: 62.2167px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:2.225}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">2.225<\/td>\n<td style=\"width: 61.55px;\" data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:0.25}\" data-sheets-formula=\"=round(R[-4]C[0]^2\/R[-8]C[0],3)\">0.25<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.16b<\/span> <span class=\"os-title\" data-type=\"title\">Residuals of Number of Hours Worked Per Week by Volunteer Type<\/span><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Calculate the test statistic: <\/strong><\/p>\n<p>Add all values together in the the above table $\\frac{(O-E)^2}{E}$<\/p>\n<p><em data-effect=\"italics\">\u03c7<\/em><sup>2<\/sup> = 12.99<\/p>\n<p id=\"element-775\"><strong>Distribution for the test:<\/strong><\/p>\n<p>$\\chi_4^2$<\/p>\n<p id=\"fs-idp19708320\"><em data-effect=\"italics\">df<\/em> = (3 columns \u2013 1)(3 rows \u2013 1) = (2)(2) = 4<\/p>\n<p id=\"element-48\"><strong>Graph:<\/strong><\/p>\n<div id=\"fs-idm32439392\" class=\"os-figure\">\n<figure data-id=\"fs-idm32439392\"><span id=\"id8547662\" data-type=\"media\" data-alt=\"Nonsymmetrical chi-square curve with values of 0 and 12.99 on the x-axis representing the test statistic of number of hours worked by volunteers of different types. A vertical upward line extends from 12.99 to the curve and the area to the right of this is equal to the p-value.\" data-display=\"block\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-561\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250-300x90.jpg\" alt=\"Nonsymmetrical chi-square curve with values of 0 and 12.99 on the x-axis representing the test statistic of number of hours worked by volunteers of different types. A vertical upward line extends from 12.99 to the curve and the area to the right of this is equal to the p-value.\" width=\"300\" height=\"90\" srcset=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250-300x90.jpg 300w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250-65x19.jpg 65w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250-225x67.jpg 225w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250-350x105.jpg 350w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/4e1369a91949ed2bf19ff4f2fe8cbb14e8736250.jpg 487w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/span><\/figure>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Figure <\/span><span class=\"os-number\">10.7<\/span><\/div>\n<\/div>\n<p id=\"element-117\"><strong>Probability statement:<\/strong><\/p>\n<p>We can use the CHISQ.DIST.RT as follows:<\/p>\n<p><code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\"default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"default-formula-text-color\" dir=\"auto\">CHISQ.DIST.RT<\/span><span class=\"default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">12.99<\/span><span class=\"default-formula-text-color\" dir=\"auto\">,<\/span><span class=\"number\" dir=\"auto\">4<\/span><span class=\"default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code><\/p>\n<p>This gives us <em data-effect=\"italics\">p<\/em>-value=<em data-effect=\"italics\">P<\/em>(<em data-effect=\"italics\">\u03c7<sup>2<\/sup><\/em> &gt; 12.99) = 0.0113<\/p>\n<p id=\"element-347\"><strong>Compare <em data-effect=\"italics\">\u03b1<\/em> and the <em data-effect=\"italics\">p<\/em>-value:<\/strong> Since no <em data-effect=\"italics\">\u03b1<\/em> is given, assume <em data-effect=\"italics\">\u03b1<\/em> = 0.05. <em data-effect=\"italics\">p<\/em>-value = 0.0113. <em data-effect=\"italics\">\u03b1<\/em> &gt; <em data-effect=\"italics\">p<\/em>-value.<\/p>\n<p id=\"fs-idm62402592\"><strong>Make a decision:<\/strong> Since <em data-effect=\"italics\">\u03b1<\/em> &gt; <em data-effect=\"italics\">p<\/em>-value, reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>. This means that the factors are not independent.<\/p>\n<p id=\"element-590\"><strong>Conclusion:<\/strong> At a 5% level of significance, from the data, there is sufficient evidence to conclude that the number of hours volunteered and the type of volunteer are dependent on one another.<\/p>\n<p id=\"element-956\">For the example in <a class=\"autogenerated-content\" href=\"#table-73248\">Table 10.15<\/a>, if there had been another type of volunteer, teenagers, what would the degrees of freedom be<\/p>\n<div class=\"textbox\">\n<h3>Critical Value Method<\/h3>\n<p>If we were asked to calculate the critical value (instead of a <em>p<\/em>-value), we could use the significance level 0.05, the degrees of freedom 4, and the Google Sheets function CHISQ.INV.RT<\/p>\n<p><code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\"default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"default-formula-text-color\" dir=\"auto\">CHISQ.INV.RT<\/span><span class=\"default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">0.05<\/span><span class=\"default-formula-text-color\" dir=\"auto\">,<\/span><span class=\"number\" dir=\"auto\">4<\/span><span class=\"default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code><\/p>\n<p>We find the critical value to be 9.488; comparing this to our test statistic 12.99, we reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>\u00a0since our test statistic is larger. Note that this is (and should always be) the same conclusion as using the <em>p<\/em>-value.<\/p>\n<\/div>\n<div class=\"textbox\">\n<h3>Using the Chi Square Distribution Table<\/h3>\n<h4>p-value Method<\/h4>\n<p>To use the <a href=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/Chi2Distribution.pdf\">Chi2 Distribution Table<\/a> to find a p-value range, look in the degrees of freedom row, 4 in this example. Find which two numbers &#8220;sandwich&#8221; your test statistic, 12.99.<\/p>\n<p>Our test statistic is between 11.143 and 13.277, so following those two columns up, we see our <em>p<\/em>-value is between 0.01 and 0.025<\/p>\n<p>0.01 &lt; <em>p<\/em>-value &lt; 0.025<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-681\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/chisq-pvalue-indep.png\" alt=\"Chi Square distribution highlighting row 4, and the areas 0.01 and 0.025\" width=\"1233\" height=\"246\" \/><\/p>\n<p>With this range, we can say for certain our <em>p<\/em>-value is less than the significance level 0.05, so we reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em><\/p>\n<p>&nbsp;<\/p>\n<h4>Critical Value Method<\/h4>\n<p>To use the <a href=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/Chi2Distribution.pdf\">Chi2 Distribution Table<\/a> to find a critical value, find the 0.05 entry in the top row, go down to the <em>df<\/em> row 4. We get 9.488 as the critical value. Our test statistic 12.99 is larger, so we reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-682\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/chisq-critval-indep.png\" alt=\"Chi Square distribution highlighting the areas 0.05 and the critical value 9.488\" width=\"1231\" height=\"250\" \/><\/p>\n<\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm24618832\" class=\"statistics try finger ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">10.6<\/span><\/h3>\n<\/header>\n<section>\n<div id=\"eip-685\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"eip-903\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"eip-845\">The Bureau of Labor Statistics gathers data about employment in the United States. A sample is taken to calculate the number of U.S. citizens working in one of several industry sectors over time. <a class=\"autogenerated-content\" href=\"#fs-idp61742592\">Table 10.17<\/a> shows the results:<\/p>\n<div id=\"fs-idp61742592\" class=\"os-table\">\n<table summary=\"Table 10.17\" data-id=\"fs-idp61742592\">\n<thead>\n<tr>\n<th scope=\"col\">Industry Sector<\/th>\n<th scope=\"col\">2000<\/th>\n<th scope=\"col\">2010<\/th>\n<th scope=\"col\">2020<\/th>\n<th scope=\"col\">Total<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Nonagriculture wage and salary<\/td>\n<td>13,243<\/td>\n<td>13,044<\/td>\n<td>15,018<\/td>\n<td>41,305<\/td>\n<\/tr>\n<tr>\n<td>Goods-producing, excluding agriculture<\/td>\n<td>2,457<\/td>\n<td>1,771<\/td>\n<td>1,950<\/td>\n<td>6,178<\/td>\n<\/tr>\n<tr>\n<td>Services-providing<\/td>\n<td>10,786<\/td>\n<td>11,273<\/td>\n<td>13,068<\/td>\n<td>35,127<\/td>\n<\/tr>\n<tr>\n<td>Agriculture, forestry, fishing, and hunting<\/td>\n<td>240<\/td>\n<td>214<\/td>\n<td>201<\/td>\n<td>655<\/td>\n<\/tr>\n<tr>\n<td>Nonagriculture self-employed and unpaid family worker<\/td>\n<td>931<\/td>\n<td>894<\/td>\n<td>972<\/td>\n<td>2,797<\/td>\n<\/tr>\n<tr>\n<td>Secondary wage and salary jobs in agriculture and private household industries<\/td>\n<td>14<\/td>\n<td>11<\/td>\n<td>11<\/td>\n<td>36<\/td>\n<\/tr>\n<tr>\n<td>Secondary jobs as a self-employed or unpaid family worker<\/td>\n<td>196<\/td>\n<td>144<\/td>\n<td>152<\/td>\n<td>492<\/td>\n<\/tr>\n<tr>\n<td>Total<\/td>\n<td>27,867<\/td>\n<td>27,351<\/td>\n<td>31,372<\/td>\n<td>86,590<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.17<\/span><\/div>\n<\/div>\n<p id=\"eip-idp2741344\">We want to know if the change in the number of jobs is independent of the change in years. State the null and alternative hypotheses and the degrees of freedom.<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"element-505\" class=\"ui-has-child-title\" data-type=\"example\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">10.7<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"body\">\n<p id=\"element-311\">De Anza College is interested in the relationship between anxiety level and the need to succeed in school. A random sample of 400 students took a test that measured anxiety level and need to succeed in school. <a class=\"autogenerated-content\" href=\"#element-875\">Table 10.18<\/a> shows the results. De Anza College wants to know if anxiety level and need to succeed in school are independent events.<\/p>\n<div id=\"element-875\" class=\"os-table\">\n<table summary=\"Table 10.18 Need to Succeed in School vs. Anxiety Level\" data-id=\"element-875\">\n<thead valign=\"top\">\n<tr>\n<th scope=\"col\">Need to Succeed in School<\/th>\n<th scope=\"col\">High <span data-type=\"newline\"><br \/>\n<\/span>Anxiety<\/th>\n<th scope=\"col\">Med-high <span data-type=\"newline\"><br \/>\n<\/span>Anxiety<\/th>\n<th scope=\"col\">Medium <span data-type=\"newline\"><br \/>\n<\/span>Anxiety<\/th>\n<th scope=\"col\">Med-low <span data-type=\"newline\"><br \/>\n<\/span>Anxiety<\/th>\n<th scope=\"col\">Low <span data-type=\"newline\"><br \/>\n<\/span>Anxiety<\/th>\n<th scope=\"col\">Row Total<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>High Need<\/td>\n<td>35<\/td>\n<td>42<\/td>\n<td>53<\/td>\n<td>15<\/td>\n<td>10<\/td>\n<td>155<\/td>\n<\/tr>\n<tr>\n<td>Medium Need<\/td>\n<td>18<\/td>\n<td>48<\/td>\n<td>63<\/td>\n<td>33<\/td>\n<td>31<\/td>\n<td>193<\/td>\n<\/tr>\n<tr>\n<td>Low Need<\/td>\n<td>4<\/td>\n<td>5<\/td>\n<td>11<\/td>\n<td>15<\/td>\n<td>17<\/td>\n<td>52<\/td>\n<\/tr>\n<tr>\n<td>Column Total<\/td>\n<td>57<\/td>\n<td>95<\/td>\n<td>127<\/td>\n<td>63<\/td>\n<td>58<\/td>\n<td>400<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">10.18<\/span> <span class=\"os-title\" data-type=\"title\">Need to Succeed in School vs. Anxiety Level<\/span><\/div>\n<\/div>\n<div id=\"element-454\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"id9399628\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<ol>\n<li id=\"element-671\">How many high anxiety level students are expected to have a high need to succeed in school?<\/li>\n<li>If the two variables are independent, how many students do you expect to have a low need to succeed in school and a med-low level of anxiety?<\/li>\n<li>$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=$______<\/li>\n<li>The expected number of students who have a med-low anxiety level and a low need to succeed in school is about ________.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"eip-699\" class=\"unnumbered\" data-type=\"exercise\">\n<section>\n<div id=\"id8469218a\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\n<div class=\"ui-toggle-wrapper\"><\/div>\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">10.7<\/span><\/h4>\n<ol>\n<li>The column total for a high anxiety level is 57. The row total for high need to succeed in school is 155. The sample size or total surveyed is 400.$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=\\frac{155.57}{400}=22.09$The expected number of students who have a high anxiety level and a high need to succeed in school is about 22.<\/li>\n<li class=\"os-solution-container\">\n<p id=\"element-921\">The column total for a med-low anxiety level is 63. The row total for a low need to succeed in school is 52. The sample size or total surveyed is 400.<\/p>\n<\/li>\n<li class=\"os-solution-container\">\n<p>$E=\\frac{(\\text{row total})(\\text{column total})}{\\text{total number surveyed}}=8.19$<\/p>\n<\/li>\n<li class=\"os-solution-container\">\n<p id=\"eip-idm130717088\">8<\/p>\n<\/li>\n<\/ol>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm15185536\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">10.7<\/span><\/h3>\n<\/header>\n<section>\n<div id=\"eip-358\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"eip-928\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"eip-757\">Refer back to the information in <a class=\"autogenerated-content\" href=\"#fs-idm24618832\">Try It<\/a>. How many service providing jobs are there expected to be in 2020? How many nonagriculture wage and salary jobs are there expected to be in 2020?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n","protected":false},"author":1,"menu_order":3,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-97","chapter","type-chapter","status-publish","hentry"],"part":89,"_links":{"self":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":8,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/97\/revisions"}],"predecessor-version":[{"id":562,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/97\/revisions\/562"}],"part":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/parts\/89"}],"metadata":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/97\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=97"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/contributor?post=97"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/license?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}