
{"id":462,"date":"2021-12-15T23:21:33","date_gmt":"2021-12-15T23:21:33","guid":{"rendered":"https:\/\/pressbooks.palomar.edu\/introtostats\/chapter\/chapter-14\/"},"modified":"2025-11-12T23:56:39","modified_gmt":"2025-11-12T23:56:39","slug":"chapter-14","status":"publish","type":"chapter","link":"https:\/\/pressbooks.palomar.edu\/introtostats\/chapter\/chapter-14\/","title":{"raw":"Chapter 14: Chi-Square","rendered":"Chapter 14: Chi-Square"},"content":{"raw":"<div class=\"textbox textbox--sidebar textbox--learning-objectives\"><header class=\"textbox__header\">\r\n<h2 class=\"Chapter-title\">Key Terms<\/h2>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n&nbsp;\r\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor283\"><span class=\"Hyperlink-underscore\">chi-square<\/span><\/a><\/p>\r\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor291\"><span class=\"Hyperlink-underscore\">contingency table<\/span><\/a><\/p>\r\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor285\"><span class=\"Hyperlink-underscore\">expected values<\/span><\/a><\/p>\r\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor293\"><span class=\"Hyperlink-underscore\">marginal values<\/span><\/a><\/p>\r\n<p class=\"Key-terms ParaOverride-38\"><a href=\"#_idTextAnchor287\"><span class=\"Hyperlink-underscore\">nonparametric tests<\/span><\/a><\/p>\r\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor286\"><span class=\"Hyperlink-underscore\">test for goodness of fit<\/span><\/a><\/p>\r\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor294\"><span class=\"Hyperlink-underscore\">test for independence<\/span><\/a><\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<h2 class=\"p1\"><b>Chi-Square (Social Justice Focus)<\/b><\/h2>\r\n<p class=\"p2\">The chi-square test is a powerful tool for uncovering patterns in categorical data\u2014patterns that often reveal how resources, opportunities, and social outcomes are distributed across different groups. Whether we are examining disparities in housing access, differences in voting participation, or unequal experiences within the criminal legal system, chi-square allows us to test whether what we observe in the real world differs meaningfully from what we would expect in a just and equitable society. By comparing actual counts to expected counts, this test helps us move beyond assumptions and identify concrete areas where inequity persists. In this chapter, you will learn how to calculate and interpret chi-square results and use them to shine light on social issues where disproportionality matters most.<\/p>\r\n<p class=\"Text-1st\">We come at last to our final topic: [pb_glossary id=\"721\"]<a id=\"_idTextAnchor283\"><\/a>[\/pb_glossary]<span class=\"key-term\">chi-square<\/span> (<img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>). This test is a special form of analysis called a nonparametric test, so the structure of it will look a little bit different from what we have done so far. However, the logic of hypothesis testing remains unchanged. The purpose of chi-square is to understand the frequency distribution of a single categorical variable or find a relationship between two categorical variables, which is a frequently very useful way to look at our data.<\/p>\r\n\r\n<h2 class=\"p1\"><b>The Power of Chi-Square in Social Justice Research<\/b><\/h2>\r\n<p class=\"p2\">The chi-square test is one of the most important tools for understanding patterns of inequality and representation. It allows us to examine whether the differences we see across social categories\u2014such as race, gender, class, or ability\u2014are random or statistically significant. From a social justice perspective, chi-square analysis helps reveal when systems or institutions are treating groups unequally. Whether we are studying disparities in hiring, access to housing, voter suppression, or educational outcomes, chi-square tests provide evidence to challenge \u201ccolor-blind\u201d or \u201cneutral\u201d claims. In short, chi-square analysis empowers researchers and advocates to quantify inequities, identify systemic bias, and transform raw data into evidence for social change.<\/p>\r\n\r\n<h2 class=\"H1\">Categories and Frequency Tables<\/h2>\r\n<p class=\"Text-1st\">Our data for the <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test are categorical\u2014specifically nominal\u2014variables. Recall from <a href=\"https:\/\/pressbooks.palomar.edu\/introtostats\/part\/unit-1-fundamentals-of-statistics\/\"><span class=\"Hyperlink-underscore\">Unit 1<\/span><\/a> that nominal variables have no specified order and can only be described by their names and the frequencies with which they occur in the dataset. Thus, unlike the other variables we have tested, we cannot describe our data for the <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test using means and standard deviations. Instead, we will use frequencies tables.<\/p>\r\n<p class=\"Text\"><a href=\"#_idTextAnchor284\"><span class=\"Fig-table-number-underscore\">Table 14.1<\/span><\/a> gives an example of a frequency table used for a <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test. The columns represent the different categories within our single variable, which in this example is pet preference. The <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test can assess as few as two categories, and there is no technical upper limit on how many categories can be included in our variable, although, as with ANOVA, having too many categories makes our computations long and our interpretation difficult. The final column in the table is the total number of observations, or <img class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/>. The <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test assumes that each observation comes from only one person and that each person will provide only one observation, so our total observations will always equal our sample size.<\/p>\r\n\r\n<div class=\"_idGenObjectLayout-1\">\r\n<div id=\"_idContainer657\" class=\"_idGenObjectStyleOverride-1\">\r\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor284\"><\/a>Table 14.1.<\/span> Community Resource Priorities<\/p>\r\n\r\n<table id=\"table085\" class=\"Foster-table\"><colgroup> <col class=\"_idGenTableRowColumn-67\" \/> <col class=\"_idGenTableRowColumn-113\" \/> <col class=\"_idGenTableRowColumn-81\" \/> <col class=\"_idGenTableRowColumn-124\" \/> <col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-76\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Affordable Housing<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Mental Health Services<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd\">Youth Programs<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Observed<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">14<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">17<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body\">5<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">36<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\r\n<p class=\"Table-col-hd\">Expected<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body ParaOverride-4\">12<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">12<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body\">12<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">36<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<p class=\"Text\">There are two rows in this table. The first row gives the observed frequencies of each category from our dataset; in this example, 14 people reported affordable housing as a priority, 17 people reported mental health services as a priority, and 5 people reported youth programs as a priority. The second row gives expected values; [pb_glossary id=\"723\"]<a id=\"_idTextAnchor285\"><\/a>[\/pb_glossary]<span class=\"key-term\">expected values<\/span> are what would be found if each category had equal representation. The calculation for an expected value is:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-233\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.2-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">where <img class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/> is the total number of people in our sample and <span class=\"italic\">C<\/span> is the number of categories in our variable (also the number of columns in our table). The expected values correspond to the null hypothesis for <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests: equal representation of categories. Our first of two <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests, the test for goodness of fit, will assess how well our data lines up with, or deviates from, this assumption.<\/p>\r\n\r\n<h3 class=\"H1\">Test for Goodness of Fit<\/h3>\r\n<p class=\"Text-1st\">The [pb_glossary id=\"726\"]<a id=\"_idTextAnchor286\"><\/a>[\/pb_glossary]<span class=\"key-term\">test for goodness of fit<\/span> assesses one categorical variable against a null hypothesis of equally sized frequencies. Equal frequency distributions are what we would expect to get if categorization was completely random. We could, in theory, also test against a specific distribution of category sizes if we have a good reason to. If we have information about how a population is distributed, we could compare our observed sample distribution to the expected values if the sample followed the same distribution as the population.<\/p>\r\n\r\n<h4 class=\"H2\">Hypotheses<\/h4>\r\n<p class=\"Text-1st\">All <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests, including the test for goodness of fit, are [pb_glossary id=\"725\"]<a id=\"_idTextAnchor287\"><\/a>[\/pb_glossary]<span class=\"key-term\">nonparametric tests<\/span>. This means that there is no population parameter we are estimating or testing against; we are working only with our sample data. Because of this, there are no mathematical statements for <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> hypotheses. This should make sense because the mathematical hypothesis statements were always about population parameters (e.g., <img class=\"_idGenObjectAttribute-31\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn2.14-mu-12.png\" alt=\"mu\" \/>), so if we are nonparametric, we have no parameters and therefore no mathematical statements.<\/p>\r\n<p class=\"Text\">We do, however, still state our hypotheses verbally. For <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests for goodness of fit, our null hypothesis is that there is an equal number of observations in each category. That is, there is no difference between the categories in how prevalent they are. Our alternative hypothesis says that the categories do differ in their frequency. We do not have specific directions or one-tailed tests for <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>, matching our lack of mathematical statements.<\/p>\r\n\r\n<h4 class=\"H2\">Degrees of Freedom and the <img class=\"_idGenObjectAttribute-3\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1-chiBold-h2-2.png\" alt=\"\" \/> Table<\/h4>\r\n<p class=\"Text-1st\">Our degrees of freedom for the <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test are based on the number of categories we have in our variable, not on the number of people or observations like it was for our other tests. Luckily, they are still as simple to calculate:<\/p>\r\n<p class=\"Equation\"><strong>df: (rows-1) \u00d7 (columns - 1)<\/strong><\/p>\r\n<p class=\"Text\">So for our community priority example, we have 3 categories, thus we have 2 degrees of freedom. Our degrees of freedom, along with our significance level (still defaulted to <span class=\"Symbol\">a<\/span> = .05) are used to find our critical values in the <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> table, a portion of which is shown in <a href=\"#_idTextAnchor288\"><span class=\"Fig-table-number-underscore\">Table 14.2<\/span><\/a>. (The complete <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>\u00a0table can be found in <a href=\"#_idTextAnchor302\"><span class=\"Hyperlink-underscore\">Appendix E<\/span><\/a>.) Because we do not have directional hypotheses for <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests, we do not need to differentiate between critical values for one- or two-tailed tests. In fact, just like our <span class=\"italic\">F\u00a0<\/span>tests for regression and ANOVA, all <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests are one-tailed tests.<\/p>\r\n\r\n<div class=\"_idGenObjectLayout-1\">\r\n<div id=\"_idContainer675\" class=\"_idGenObjectStyleOverride-1\">\r\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor288\"><\/a>Table 14.2.<\/span> Critical Values for Chi-Square (<img class=\"_idGenObjectAttribute-235\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1a-2.png\" alt=\"\" \/> Table)<\/p>\r\n\r\n<table id=\"table086\" class=\"Foster-table\"><colgroup> <col class=\"_idGenTableRowColumn-90\" \/> <col class=\"_idGenTableRowColumn-93\" \/> <col class=\"_idGenTableRowColumn-93\" \/> <col class=\"_idGenTableRowColumn-93\" \/> <col class=\"_idGenTableRowColumn-93\" \/> <col class=\"_idGenTableRowColumn-60\" \/> <\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-8\" rowspan=\"2\">\r\n<p class=\"Table-col-hd ParaOverride-4\"><span class=\"bold-italic\">df<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\" colspan=\"5\">\r\n<p class=\"Table-straddle-hd\">Proportion in Critical Region<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">.1<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">.05<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">.02<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">.01<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">.005<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">1<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-5\">2.706<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-5\">3.841<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-5\">5.024<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-5\">6.635<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-5\">7.879<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">2<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">4.605<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">5.991<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">7.378<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">9.210<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">10.597<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">3<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">6.251<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">7.815<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">9.348<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">11.345<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">12.838<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">4<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">7.779<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">9.488<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">11.143<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">13.277<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">14.860<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">5<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">9.236<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">11.070<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">12.833<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">15.086<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">16.750<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">6<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">10.645<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">12.592<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">14.449<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">16.812<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">18.548<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">7<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">12.017<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">14.067<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">16.013<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">18.475<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">20.278<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">8<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">13.362<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">15.507<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">17.535<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">20.090<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">21.955<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">9<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">14.684<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">16.919<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">19.023<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">21.666<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-5\">23.589<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\r\n<p class=\"Table-body ParaOverride-4\">10<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\r\n<p class=\"Table-body ParaOverride-5\">15.987<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\r\n<p class=\"Table-body ParaOverride-5\">18.307<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\r\n<p class=\"Table-body ParaOverride-5\">20.483<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\r\n<p class=\"Table-body ParaOverride-5\">23.209<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body\">\r\n<p class=\"Table-body ParaOverride-5\">25.188<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<h3 class=\"H1\"><img class=\"_idGenObjectAttribute-235\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1-chiBold-h1-2.png\" alt=\"\" \/> Statistic<\/h3>\r\n<p class=\"Text-1st\">The calculations for our test statistic in <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests combine our information from our observed frequencies (<span class=\"italic\">O<\/span>) and our expected frequencies (<span class=\"italic\">E<\/span>) for each level of our categorical variable. For each cell (category) we find the difference between the observed and expected values, square them, and divide by the expected values. We then sum this value across cells for our test statistic. This is shown in the formula:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-236\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.4-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">For our community priority preference data, we would have:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-237\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.5-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">Notice that, for each cell\u2019s calculation, the expected value in the numerator and the expected value in the denominator are the same value. Let\u2019s now take a look at an example from start to finish.<\/p>\r\n<p class=\"Example-New\"><span class=\"Example--\">Example: Support for Ending Cash Bail<\/span><\/p>\r\n<p class=\"p1\">Cash bail policies\u2014which often require people to pay money to secure their release while awaiting trial\u2014have long raised serious social justice concerns. Research shows that cash bail disproportionately harms low-income people and communities of color, keeping legally innocent individuals incarcerated simply because they cannot afford to pay. To better understand public attitudes toward reform, we gather data from a group of adults, asking whether they support ending cash bail (Yes or No).<\/p>\r\n\r\n<h3 class=\"H3-step\"><span class=\"Step--\">Step 1:<\/span> State the Hypotheses<\/h3>\r\n<p class=\"p1\">We begin with our hypotheses. Our <span class=\"s1\">null hypothesis<\/span> of no difference states that an equal number of people will support and not support ending cash bail. Our <span class=\"s1\">alternative hypothesis<\/span> is that one position is more common than the other.<\/p>\r\nH<sub>0<\/sub>: An equal number of people are in support and not in support of ending cash bail.\r\n\r\nH<sub>a<\/sub>: A significant majority of people are in support or not in support of ending cash bail.\r\n<h3 class=\"H3-step\"><span class=\"Step--\">Step 2:<\/span> Find the Critical Value<\/h3>\r\n<p class=\"Text-1st\">To avoid any potential bias in this crucial analysis, we will leave <img class=\"_idGenObjectAttribute-89\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn7.1-alpha-7.png\" alt=\"alpha\" \/> at its typical level. We have two options in our data (Yes or No), which will give us two categories. Based on this, we will have 1\u00a0degree of freedom. From our <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> table, we find a critical value of 3.84.<\/p>\r\n\r\n<h3 class=\"H3-step\"><span class=\"Step--\">Step 3:<\/span> Calculate the Test Statistic<\/h3>\r\n<p class=\"Text-1st\">The results of the data collection are presented in <a href=\"#_idTextAnchor289\"><span class=\"Fig-table-number-underscore\">Table 14.3<\/span><\/a>. We had data from 45 people in all and 2 categories, so our expected values are <span class=\"italic\">E<\/span> = 45\/2 = 22.50.<\/p>\r\n\r\n<div class=\"_idGenObjectLayout-1\">\r\n<div id=\"_idContainer684\" class=\"_idGenObjectStyleOverride-1\">\r\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor289\"><\/a>Table 14.3.<\/span> <span class=\"Example--\">Support for Ending Cash Bail<\/span><\/p>\r\n\r\n<table id=\"table087\" class=\"Foster-table\"><colgroup> <col class=\"_idGenTableRowColumn-27\" \/> <col class=\"_idGenTableRowColumn-34\" \/> <col class=\"_idGenTableRowColumn-18\" \/> <col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-76\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Yes<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Observed<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body\">26<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body\">19<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">45<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\r\n<p class=\"Table-col-hd\">Expected<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body\">22.50<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body\">22.50<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">45<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<p class=\"Text\">We can use these to calculate our <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> statistic:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-240\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.8-2.png\" alt=\"\" \/><\/p>\r\n\r\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 4:<\/span> Make the Decision<\/h5>\r\n<p class=\"Text-1st\">Our observed test statistic had a value of 1.08 and our critical value was 3.84. Our test statistic was smaller than our critical value, so we fail to reject the null hypothesis. <span style=\"text-align: initial;font-size: 1.125rem\">Based on our sample of 45 people, there is no significant difference between the observed and expected values for support or non support for ending cash bail, <\/span><img class=\"_idGenObjectAttribute-235\" style=\"text-align: initial;font-size: 1.125rem\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1a-2.png\" alt=\"\" \/><span style=\"text-align: initial;font-size: 1.125rem\"> (1, <\/span><span class=\"italic\" style=\"text-align: initial;font-size: 1.125rem\">N<\/span><span style=\"text-align: initial;font-size: 1.125rem\">\u00a0=\u00a045) = 1.089, <\/span><span class=\"italic\" style=\"text-align: initial;font-size: 1.125rem\">p<\/span><span style=\"text-align: initial;font-size: 1.125rem\"> = .297.<\/span><\/p>\r\n\r\n<h2 class=\"H1\">Contingency Tables for Two Variables<\/h2>\r\n<p class=\"p1\">The test for goodness of fit is a useful tool for assessing a single categorical variable. However, what is more common is wanting to know if two categorical variables are related to one another. This type of analysis is similar to a correlation, the only difference being that we are working with nominal data, which violates the assumptions of traditional correlation coefficients. This is where the test for independence comes in handy.<\/p>\r\n<p class=\"Text\">As noted above, our only description for nominal data is frequency, so we will again present our observations in a frequency table. When we have two categorical variables, our frequency table is crossed. That is, each combination of levels from each categorical variable is presented. This type of frequency table is called a [pb_glossary id=\"722\"]<a id=\"_idTextAnchor291\"><\/a>[\/pb_glossary]<span class=\"key-term\">contingency table<\/span> because it shows the frequency of each category in one variable, contingent upon the specific level of the other variable.<\/p>\r\n<p class=\"Text\">An example contingency table is shown in <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, which displays whether or not 168 college students <span class=\"s1\">experienced housing insecurity as children<\/span> (Yes\/No) and whether the students\u2019 <span class=\"s1\">final decision about which college to attend<\/span> was influenced by the college\u2019s <span class=\"s1\">basic-needs support systems<\/span> (Yes, primary; Yes, somewhat; No).<\/p>\r\n\r\n<div class=\"_idGenObjectLayout-1\">\r\n<div id=\"_idContainer697\" class=\"_idGenObjectStyleOverride-1\">\r\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor292\"><\/a>Table 14.4. <\/span>Contingency table of childhood housing insecurity and the role of basic-needs support in college decision-making<\/p>\r\n\r\n<table id=\"table088\" class=\"Foster-table\" style=\"height: 85px\"><colgroup> <col class=\"_idGenTableRowColumn-106\" \/> <col class=\"_idGenTableRowColumn-62\" \/> <col class=\"_idGenTableRowColumn-122\" \/> <col class=\"_idGenTableRowColumn-100\" \/> <col class=\"_idGenTableRowColumn-125\" \/> <col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\" style=\"height: 17px\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\" style=\"height: 17px;width: 135.555px\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\" style=\"height: 17px;width: 37.625px\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-79\" style=\"height: 17px;width: 178.555px\" colspan=\"3\">\r\n<p class=\"Table-straddle-hd\">Basic-Needs Support<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-80\" style=\"height: 17px;width: 37.7656px\"><\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\" style=\"height: 17px\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 135.555px\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 37.625px\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-81 _idGenCellOverride-4\" style=\"height: 17px;width: 58.8125px\">\r\n<p class=\"Table-col-hd\">Primary<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 76.75px\">\r\n<p class=\"Table-col-hd\">Somewhat<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 22.9922px\">\r\n<p class=\"Table-col-hd\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\" style=\"height: 17px;width: 37.7656px\">\r\n<p class=\"Table-col-hd\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\" style=\"height: 17px\">\r\n<td class=\"Foster-table Table-body CellOverride-83 _idGenCellOverride-1\" style=\"height: 34px;width: 135.555px\" rowspan=\"2\">\r\n<p class=\"Table-straddle-hd ParaOverride-51\">Childhood Housing Insecurity<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\" style=\"height: 17px;width: 37.625px\">\r\n<p class=\"Table-col-hd\">Yes<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\" style=\"height: 17px;width: 58.8125px\">\r\n<p class=\"Table-body ParaOverride-4\">47<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\" style=\"height: 17px;width: 76.75px\">\r\n<p class=\"Table-body ParaOverride-4\">26<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\" style=\"height: 17px;width: 22.9922px\">\r\n<p class=\"Table-body ParaOverride-4\">14<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\" style=\"height: 17px;width: 37.7656px\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 87<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\" style=\"height: 17px\">\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-2\" style=\"height: 17px;width: 37.625px\">\r\n<p class=\"Table-col-hd\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-2\" style=\"height: 17px;width: 58.8125px\">\r\n<p class=\"Table-body ParaOverride-4\">21<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\" style=\"height: 17px;width: 76.75px\">\r\n<p class=\"Table-body ParaOverride-4\">23<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\" style=\"height: 17px;width: 22.9922px\">\r\n<p class=\"Table-body ParaOverride-4\">37<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\" style=\"height: 17px;width: 37.7656px\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 81<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-11\" style=\"height: 17px\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-84\" style=\"height: 17px;width: 135.555px\"><\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\" style=\"height: 17px;width: 37.625px\">\r\n<p class=\"Table-col-hd\">Total<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\" style=\"height: 17px;width: 58.8125px\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">68<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\" style=\"height: 17px;width: 76.75px\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">49<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\" style=\"height: 17px;width: 22.9922px\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">51<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\" style=\"height: 17px;width: 37.7656px\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">168<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<p class=\"Text\">In contrast to the frequency table for our test for goodness of fit, our contingency table does not contain expected values, only observed data. Within our table, wherever our rows and columns cross, we have a cell. A cell contains the frequency of observing its corresponding specific levels of each variable at the same time. The top left cell in <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a> shows us that 47 people in our study experienced housing insecurity a child <span class=\"italic\">and the need for basic-needs support was a primary factor in making a decision of which college to attend.\u00a0<\/span><\/p>\r\n<p class=\"Text\">Cells are numbered based on which row they are in (rows are numbered top to bottom) and which column they are in (columns are numbered left to right). We always name the cell using (<span class=\"italic\">R<\/span>,<span class=\"italic\">C<\/span>), with the row first and the column second.\u00a0 Based on this convention, the top left cell containing our 47 participants who experienced housing insecurity as a child and had basic needs support as a primary criteria is cell (1,1). Next to it, which has 26 people who did experience housing insecurity as a child, but the college's basics needs support only somewhat affect their decision, is cell (1,2), and so on. We only number the cells where our categories cross. We do not number our total cells, which have their own special name: marginal values.<\/p>\r\n<p class=\"Text\"><span class=\"key-term\">[pb_glossary id=\"724\"]<a id=\"_idTextAnchor293\"><\/a>[\/pb_glossary]Marginal values<\/span> are the total values for a single category of one variable, added up across levels of the other variable. In <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, these marginal values have been made bold for ease of explanation, though this is not normally the case. We can see that, in total, 87 of our participants (47 + 26 + 14) reported yes to having housing insecurity growing up and 81 (21 + 23 + 37) did not. The total of these two marginal values is 168, the total number of people in our study. Likewise, 68 people used basic needs support as a primary criterion for deciding which college to attend, 50 considered it somewhat, and 50 did not consider it at all. The total of these marginal values is also 168, our total number of people. The marginal values for rows and columns will always both add up to the total number of participants, <img class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/>, in the study. If they do not, then a calculation error was made and you must go back and check your work.<\/p>\r\n\r\n<h4 class=\"H2\">Expected Values of Contingency Tables<\/h4>\r\n<p class=\"Text-1st\">Our expected values for contingency tables are based on the same logic as they were for frequency tables, but now we must incorporate information about how frequently each row and column was observed (the marginal values) and how many people were in the sample overall (<img class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/>) to find what random chance would have made the frequencies out to be. Specifically:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-243\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.9-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">The subscripts <span class=\"italic\">i <\/span>and <span class=\"italic\">j <\/span>indicate which row and column, respectively, correspond to the cell we are calculating the expected frequency for, and the <span class=\"italic\">R<\/span><span class=\"subscript-italic _idGenCharOverride-1\">i<\/span> and <span class=\"italic\">C<\/span><span class=\"subscript-italic _idGenCharOverride-1\">j<\/span> are the row and column marginal values, respectively. <img class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/> is still the total sample size. Using the data from <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, we can calculate the expected frequency for cell (1,1), the housing insecurity and based needs support as primary criteria in deciding what college to attend, to be:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-244\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.10-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">We can follow the same math to find all the expected values for this table:<\/p>\r\n\r\n<table id=\"table089\" class=\"Foster-table _idGenTablePara-1\"><colgroup> <col class=\"_idGenTableRowColumn-106\" \/> <col class=\"_idGenTableRowColumn-62\" \/> <col class=\"_idGenTableRowColumn-122\" \/> <col class=\"_idGenTableRowColumn-100\" \/> <col class=\"_idGenTableRowColumn-124\" \/> <col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-79\" colspan=\"3\">\r\n<p class=\"Table-straddle-hd\">Basic Needs Support<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-80\"><\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-81 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd\">Primary<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd\">Somewhat<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\r\n<p class=\"Table-straddle-hd ParaOverride-51\">Housing Insecurity<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Yes<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body\">35.21<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body\">25.38<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body\">26.41<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 87<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-2\">\r\n<p class=\"Table-col-hd\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-2\">\r\n<p class=\"Table-body\">32.79<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\r\n<p class=\"Table-body\">23.62<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\r\n<p class=\"Table-body\">24.59<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 81<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-11\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-84\"><\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\r\n<p class=\"Table-col-hd\">Total<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body\"><span class=\"bold\">68<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body\"><span class=\"bold\">49<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body\"><span class=\"bold\">51<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">168<\/span><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p class=\"Text\">Notice that the marginal values still add up to the same totals as before. This is because the expected frequencies are just row and column averages simultaneously. Our total <img class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/> will also add up to the same value.<\/p>\r\n<p class=\"Text\">The observed and expected frequencies can be used to calculate the same <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> statistic as we calculated for the test for goodness of fit. Before we get there, though, we should look at the hypotheses and degrees of freedom used for contingency tables.<\/p>\r\n\r\n<h3 class=\"H1\">Test for Independence<\/h3>\r\n<p class=\"Text-1st\">The <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test performed on contingency tables is known as the [pb_glossary id=\"727\"]<a id=\"_idTextAnchor294\"><\/a>[\/pb_glossary]<span class=\"key-term\">test for independence<\/span>. In this analysis, we are looking to see if the values of each categorical variable (that is, the frequency of their levels) is related to or independent of the values of the other categorical variable. Because we are still doing a <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>\u00a0test, which is nonparametric, we still do not have mathematical versions of our hypotheses. The actual interpretations of the hypotheses are quite simple: the null hypothesis says that the variables are independent or not related, and the alternative hypothesis says that they are not independent or that they are related. Using this setup and the data provided in <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, let\u2019s formally test for whether having housing insecurity\u00a0 as a child is related to using basic needs as a criteria for selecting a college to attend.<\/p>\r\n<p class=\"Example-New\">We will follow the same four-step procedure as we have since <a href=\"https:\/\/pressbooks.palomar.edu\/introtostats\/chapter\/chapter-7\/\"><span class=\"Hyperlink-underscore\">Chapter 7<\/span><\/a>.<\/p>\r\n\r\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 1:<\/span> State the Hypotheses<\/h5>\r\n<p class=\"Text-1st\">Our null hypothesis of no difference will state that there is no relationship between our variables, and our alternative will state that our variables are related.<\/p>\r\nH<sub>0<\/sub>:\u00a0There is <span class=\"s1\">no association<\/span> between whether students experienced housing insecurity as children and whether basic-needs support (primary, somewhat, no) influenced their college choice.\r\n\r\nH<sub>a<\/sub>: There is an association between childhood housing insecurity and whether basic-needs support (primary, somewhat, no) influenced students\u2019 college choice.\r\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 2:<\/span> Find the Critical Value<\/h5>\r\n<p class=\"Text-1st\">Our critical value will come from the same table that we used for the test for goodness of fit, but our degrees of freedom will change. Because we now have rows and columns (instead of just columns) our new degrees of freedom use information from both:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-247\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.13-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">In our example:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-248\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.14-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Text\">Based on our 2 degrees of freedom, our critical value from our table is 5.991.<\/p>\r\n\r\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 3:<\/span> Calculate the Test Statistic<\/h5>\r\n<p class=\"Text-1st\">The same formula for <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> is used once again:<\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-236\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.4-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Equation\"><img class=\"_idGenObjectAttribute-249\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.16-2.png\" alt=\"\" \/><\/p>\r\n<p class=\"Equation ParaOverride-52\"><img class=\"_idGenObjectAttribute-250\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.17-2.png\" alt=\"\" \/><\/p>\r\n\r\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 4:<\/span> Make the Decision<\/h5>\r\n<p class=\"Text-1st\">The final decision for our test of independence is still based on our observed value (20.31) and our critical value (5.991). Because our observed value is greater than our critical value, we can reject the null hypothesis.<\/p>\r\n<p class=\"Text-indented-2p\">Reject <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>. Based on our data from 168 people, we can say that there is a statistically significant relationship between whether someone has had housing insecurity and the influence a college\u2019s basic needs support have on that person\u2019s decision on which college to attend.<\/p>\r\n\r\n<div class=\"_idGenObjectStyleOverride-2\"><\/div>\r\n<div>\r\n<h2 class=\"p1\">Conclusion:<\/h2>\r\n<p class=\"p1\">The chi-square test is a powerful tool for uncovering patterns in categorical data that signal whether social experiences are distributed equitably across different groups. By comparing observed frequencies to what would be expected by chance, chi-square helps us see when structural forces\u2014such as housing insecurity, discrimination, resource access, or policy barriers\u2014shape people\u2019s opportunities in ways that are not random. In social justice research, this matters greatly: detecting associations between lived experiences and outcomes can reveal inequities that might otherwise remain hidden in simple averages or narratives. Whether we are examining disparities in educational pathways, health outcomes, employment practices, or interactions with social institutions, chi-square enables us to document unequal patterns, question why they exist, and begin imagining data-driven interventions that promote fairness and support communities most impacted by systemic inequality.<\/p>\r\n\r\n<\/div>\r\n<h3 class=\"H1\">Exercises<\/h3>\r\n<ol>\r\n \t<li class=\"Numbered-list-Exercises-1st\">What does a frequency table display? What does a contingency table display?<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">What does a test for goodness of fit assess?<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">How do expected frequencies relate to the null hypothesis?<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">What does a test for independence assess?<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">Compute the expected frequencies for the following contingency table:\r\n<table id=\"table090\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-111\" \/> <col class=\"_idGenTableRowColumn-109\" \/> <col class=\"_idGenTableRowColumn-44\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-54\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Category A<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Category B<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-85 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Category C<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">22<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">38<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-85\">\r\n<p class=\"Table-col-hd\">Category D<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body ParaOverride-4\">16<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">14<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">Test significance and find effect sizes for the following tests:\r\n<ol>\r\n \t<li class=\"Numbered-list-Exercises-sub _idGenParaOverride-1\"><span class=\"italic\">N <\/span>= 19, <span class=\"italic\">R<\/span> = 3, <span class=\"italic\">C<\/span> = 2, <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(2) = 7.89, <span class=\"Symbol\">a<\/span> = .05<\/li>\r\n \t<li class=\"Numbered-list-Exercises-sub _idGenParaOverride-1\"><span class=\"italic\">N <\/span>= 12, <span class=\"italic\">R<\/span> = 2, <span class=\"italic\">C<\/span> = 2, <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(1) = 3.12, <span class=\"Symbol\">a<\/span> = .05<\/li>\r\n \t<li class=\"Numbered-list-Exercises-sub _idGenParaOverride-1\"><span class=\"italic\">N <\/span>= 74, <span class=\"italic\">R<\/span> = 3, <span class=\"italic\">C<\/span> = 3, <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(4) = 28.41, <span class=\"Symbol\">a<\/span> = .01<\/li>\r\n<\/ol>\r\n<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">You hear a lot of people claim that <span class=\"italic\">The Empire Strikes Back<\/span> is the best movie in the original <span class=\"italic\">Star\u00a0Wars<\/span> trilogy, and you decide to collect some data to demonstrate this empirically (pun intended). You ask 48 people which of the original movies they liked best; 8 said <span class=\"italic\">A New Hope <\/span>was their favorite, 23 said <span class=\"italic\">The Empire Strikes Back <\/span>was their favorite, and 17 said <span class=\"italic\">Return of the Jedi <\/span>was their favorite. Perform a <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test on these data at the .05 level of significance.<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">A pizza company wants to know if people order the same number of different toppings. They look at how many pepperoni, sausage, and cheese pizzas were ordered in the last week. Fill out the rest of the frequency table and test for a difference.\r\n<table id=\"table091\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-27\" \/> <col class=\"_idGenTableRowColumn-73\" \/> <col class=\"_idGenTableRowColumn-97\" \/> <col class=\"_idGenTableRowColumn-55\" \/> <col class=\"_idGenTableRowColumn-40\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-86\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Pepperoni<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Sausage<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd\">Cheese<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Observed<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">320<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">275<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">251<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\"><\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\r\n<p class=\"Table-col-hd\">Expected<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\"><\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">A university administrator wants to know if there is a difference in proportions of students who go on to grad school across different majors. Use the data below to test whether there is a relationship between college major and going to grad school.\r\n<table id=\"table092\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-106\" \/> <col class=\"_idGenTableRowColumn-126\" \/> <col class=\"_idGenTableRowColumn-33\" \/> <col class=\"_idGenTableRowColumn-83\" \/> <col class=\"_idGenTableRowColumn-127\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-79\" colspan=\"3\">\r\n<p class=\"Table-straddle-hd\">Major<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-87 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Psychology<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Business<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Math<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\r\n<p class=\"Table-straddle-hd ParaOverride-51\">Graduate School<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Yes<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">32<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">8<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">36<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\r\n<p class=\"Table-col-hd\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body ParaOverride-4\">15<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">41<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">12<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n \t<li class=\"Numbered-list-Exercises\">A company you work for wants to make sure they are not discriminating against anyone in their promotion process. You have been asked to look across gender to see if there are differences in promotion rate (i.e., if gender and promotion rate are independent or not). The following data should be assessed at the normal level of significance:\r\n<table id=\"table093\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-81\" \/> <col class=\"_idGenTableRowColumn-80\" \/> <col class=\"_idGenTableRowColumn-128\" \/> <col class=\"_idGenTableRowColumn-129\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-19\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-88\" colspan=\"2\">\r\n<p class=\"Table-straddle-hd\">Promoted in Last Two Years?<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-89 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Yes<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-90 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">No<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\r\n<p class=\"Table-straddle-hd ParaOverride-51\">Gender<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Women<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-91 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">8<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-2 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">5<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\r\n<p class=\"Table-col-hd\">Men<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-91\">\r\n<p class=\"Table-body ParaOverride-4\">9<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">7<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n<\/ol>\r\n<div class=\"textbox textbox--learning-objectives\"><header class=\"textbox__header\">\r\n<h3 class=\"H1\">Answers to Odd-Numbered Exercises<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h3 class=\"H1\">1)\r\nFrequency tables display observed category frequencies and (sometimes) expected category frequencies for a single categorical variable. Contingency tables display the frequency of observing people in crossed category levels for two categorical variables, and (sometimes) the marginal totals of each variable level.<\/h3>\r\n3)\r\n<span style=\"font-size: 0.8em;font-weight: lighter\">Expected values are what we would observe if the proportion of categories was completely random (i.e., no consistent difference other than chance), which is the same was what the null hypothesis predicts to be true.<\/span>\r\n\r\n5)\r\n<span style=\"font-size: 0.8em;font-weight: lighter\">Observed:<\/span>\r\n<table id=\"table094\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-111\" \/> <col class=\"_idGenTableRowColumn-109\" \/> <col class=\"_idGenTableRowColumn-44\" \/> <col class=\"_idGenTableRowColumn-63\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-54\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Category A<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Category B<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-85 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Category C<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">22<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">38<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">60<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\r\n<td class=\"Foster-table Table-body CellOverride-85 _idGenCellOverride-2\">\r\n<p class=\"Table-col-hd\">Category D<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">16<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">14<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">30<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-11\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-85\">\r\n<p class=\"Table-col-hd\">Total<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body ParaOverride-4\">38<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">52<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">90<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nExpected:\r\n<table id=\"table095\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-111\" \/> <col class=\"_idGenTableRowColumn-103\" \/> <col class=\"_idGenTableRowColumn-57\" \/> <col class=\"_idGenTableRowColumn-63\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-54\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-92\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Category A<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-93\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Category B<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-84\">\r\n<td class=\"Foster-table Table-body CellOverride-94 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Category C<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-95 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\"><img class=\"_idGenObjectAttribute-251\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.22-2.png\" alt=\"\" \/><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-96 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\"><img class=\"_idGenObjectAttribute-251\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.24-2.png\" alt=\"\" \/><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-97 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">60<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-130\">\r\n<td class=\"Foster-table Table-body CellOverride-94 _idGenCellOverride-2\">\r\n<p class=\"Table-col-hd\">Category D<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-95 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\"><img class=\"_idGenObjectAttribute-252\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.23-2.png\" alt=\"\" \/><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-96 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\"><img class=\"_idGenObjectAttribute-252\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.25-2.png\" alt=\"\" \/><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-97 _idGenCellOverride-2\">\r\n<p class=\"Table-body ParaOverride-4\">30<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-11\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-85\">\r\n<p class=\"Table-col-hd\">Total<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-92\">\r\n<p class=\"Table-body ParaOverride-4\">38<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-93\">\r\n<p class=\"Table-body ParaOverride-4\">52<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">90<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n7)\r\n\r\n<span class=\"italic\">Step 1:<\/span> <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>: \u201cThere is no difference in preference for one movie,\u201d <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">A<\/span>: \u201cThere is a difference in how many people prefer one movie over the others.\u201d\r\n<span class=\"italic\">Step 2:<\/span> Three categories (columns) gives <span class=\"italic\">d<\/span><span class=\"italic\">f<\/span> = 2, <img class=\"_idGenObjectAttribute-253\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.20-2.png\" alt=\"\" \/> = 5.991\r\n<span class=\"italic\">Step 3:<\/span> Based on the given frequencies:\r\n<table id=\"table096\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-27\" \/> <col class=\"_idGenTableRowColumn-73\" \/> <col class=\"_idGenTableRowColumn-106\" \/> <col class=\"_idGenTableRowColumn-27\" \/> <col class=\"_idGenTableRowColumn-40\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-86\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\r\n<p class=\"Table-col-hd ParaOverride-4\"><span class=\"bold-italic\">New Hope<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\"><span class=\"bold-italic\">Empire<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd\"><span class=\"bold-italic\">Jedi<\/span><\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Observed<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">8<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">23<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">17<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">48<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\r\n<p class=\"Table-col-hd\">Expected<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body ParaOverride-4\">16<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">16<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">16<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<img class=\"_idGenObjectAttribute-216\" style=\"font-size: 0.8em;font-weight: lighter\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/><span style=\"font-size: 0.8em;font-weight: lighter\"> = 7.13. This is a statistically significant result<\/span>\r\n\r\n<span class=\"italic\">Step 4:<\/span> Our obtained statistic is greater than our critical value, reject <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>. Based on our sample of 48 people, there is a statistically significant difference in the proportion of people who prefer one <span class=\"italic\">Star Wars<\/span> movie over the others, <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(2, <span class=\"italic\">N<\/span> = 48) = 7.13, <span class=\"italic\">p<\/span> &lt; .05.\r\n\r\n9)\r\n<span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">Step 1:<\/span> <span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">H<\/span><span class=\"subscript _idGenCharOverride-1\" style=\"font-size: 0.8em;font-weight: lighter\">0<\/span><span style=\"font-size: 0.8em;font-weight: lighter\">: \u201cThere is no relationship between college major and going to grad school,\u201d <\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">H<\/span><span class=\"subscript _idGenCharOverride-1\" style=\"font-size: 0.8em;font-weight: lighter\">A<\/span><span style=\"font-size: 0.8em;font-weight: lighter\">: \u201cGoing to grad school is related to college major.\u201d\r\n<\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">Step 2:<\/span> <span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">d<\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">f<\/span><span style=\"font-size: 0.8em;font-weight: lighter\"> = 2, <\/span><img class=\"_idGenObjectAttribute-253\" style=\"font-size: 0.8em;font-weight: lighter\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.20-2.png\" alt=\"\" \/><span style=\"font-size: 0.8em;font-weight: lighter\"> = 5.991\r\n<\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">Step 3:<\/span><span style=\"font-size: 0.8em;font-weight: lighter\"> Based on the expected frequencies:<\/span>\r\n\r\n<\/div>\r\n<div class=\"textbox__content\">\r\n<table id=\"table097\" class=\"Foster-table _idGenTablePara-2\"><colgroup> <col class=\"_idGenTableRowColumn-106\" \/> <col class=\"_idGenTableRowColumn-126\" \/> <col class=\"_idGenTableRowColumn-33\" \/> <col class=\"_idGenTableRowColumn-83\" \/> <col class=\"_idGenTableRowColumn-124\" \/><\/colgroup>\r\n<thead>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-98\" colspan=\"3\">\r\n<p class=\"Table-straddle-hd\">Major<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-87 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Psychology<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Business<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\r\n<p class=\"Table-col-hd ParaOverride-4\">Math<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\r\n<p class=\"Table-straddle-hd ParaOverride-51\">Graduate School<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\r\n<p class=\"Table-col-hd\">Yes<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">24.81<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">25.86<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">25.33<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\r\n<p class=\"Table-col-hd\">No<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\r\n<p class=\"Table-body ParaOverride-4\">22.19<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">23.14<\/p>\r\n<\/td>\r\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\r\n<p class=\"Table-body ParaOverride-4\">22.67<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<img class=\"_idGenObjectAttribute-216\" style=\"font-size: 0.8em;font-weight: lighter\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/><span style=\"font-size: 0.8em;font-weight: lighter\"> = 2.09 + 12.34 + 4.49 + 2.33 + 13.79 + 5.02 = 40.05<\/span><span class=\"italic\">Step 4:<\/span> Obtained statistic is greater than the critical value, reject <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>. Based on our data, there\u00a0is\u00a0a\u00a0statistically significant relationship between college major and going to grad school, <img class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(2, <span class=\"italic\">N<\/span> = 144) = 40.05, <span class=\"italic\">p<\/span> &lt; .05\r\n<div class=\"_idFootnotes\">\r\n<div id=\"footnote-000\" class=\"_idFootnote\">\r\n<p class=\"Footnote-Ahrndt\"><\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n&nbsp;","rendered":"<div class=\"textbox textbox--sidebar textbox--learning-objectives\">\n<header class=\"textbox__header\">\n<h2 class=\"Chapter-title\">Key Terms<\/h2>\n<\/header>\n<div class=\"textbox__content\">\n<p>&nbsp;<\/p>\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor283\"><span class=\"Hyperlink-underscore\">chi-square<\/span><\/a><\/p>\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor291\"><span class=\"Hyperlink-underscore\">contingency table<\/span><\/a><\/p>\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor285\"><span class=\"Hyperlink-underscore\">expected values<\/span><\/a><\/p>\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor293\"><span class=\"Hyperlink-underscore\">marginal values<\/span><\/a><\/p>\n<p class=\"Key-terms ParaOverride-38\"><a href=\"#_idTextAnchor287\"><span class=\"Hyperlink-underscore\">nonparametric tests<\/span><\/a><\/p>\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor286\"><span class=\"Hyperlink-underscore\">test for goodness of fit<\/span><\/a><\/p>\n<p class=\"Key-terms\"><a href=\"#_idTextAnchor294\"><span class=\"Hyperlink-underscore\">test for independence<\/span><\/a><\/p>\n<\/div>\n<\/div>\n<h2 class=\"p1\"><b>Chi-Square (Social Justice Focus)<\/b><\/h2>\n<p class=\"p2\">The chi-square test is a powerful tool for uncovering patterns in categorical data\u2014patterns that often reveal how resources, opportunities, and social outcomes are distributed across different groups. Whether we are examining disparities in housing access, differences in voting participation, or unequal experiences within the criminal legal system, chi-square allows us to test whether what we observe in the real world differs meaningfully from what we would expect in a just and equitable society. By comparing actual counts to expected counts, this test helps us move beyond assumptions and identify concrete areas where inequity persists. In this chapter, you will learn how to calculate and interpret chi-square results and use them to shine light on social issues where disproportionality matters most.<\/p>\n<p class=\"Text-1st\">We come at last to our final topic: <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_721\"><a id=\"_idTextAnchor283\"><\/a><\/a><span class=\"key-term\">chi-square<\/span> (<img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>). This test is a special form of analysis called a nonparametric test, so the structure of it will look a little bit different from what we have done so far. However, the logic of hypothesis testing remains unchanged. The purpose of chi-square is to understand the frequency distribution of a single categorical variable or find a relationship between two categorical variables, which is a frequently very useful way to look at our data.<\/p>\n<h2 class=\"p1\"><b>The Power of Chi-Square in Social Justice Research<\/b><\/h2>\n<p class=\"p2\">The chi-square test is one of the most important tools for understanding patterns of inequality and representation. It allows us to examine whether the differences we see across social categories\u2014such as race, gender, class, or ability\u2014are random or statistically significant. From a social justice perspective, chi-square analysis helps reveal when systems or institutions are treating groups unequally. Whether we are studying disparities in hiring, access to housing, voter suppression, or educational outcomes, chi-square tests provide evidence to challenge \u201ccolor-blind\u201d or \u201cneutral\u201d claims. In short, chi-square analysis empowers researchers and advocates to quantify inequities, identify systemic bias, and transform raw data into evidence for social change.<\/p>\n<h2 class=\"H1\">Categories and Frequency Tables<\/h2>\n<p class=\"Text-1st\">Our data for the <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test are categorical\u2014specifically nominal\u2014variables. Recall from <a href=\"https:\/\/pressbooks.palomar.edu\/introtostats\/part\/unit-1-fundamentals-of-statistics\/\"><span class=\"Hyperlink-underscore\">Unit 1<\/span><\/a> that nominal variables have no specified order and can only be described by their names and the frequencies with which they occur in the dataset. Thus, unlike the other variables we have tested, we cannot describe our data for the <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test using means and standard deviations. Instead, we will use frequencies tables.<\/p>\n<p class=\"Text\"><a href=\"#_idTextAnchor284\"><span class=\"Fig-table-number-underscore\">Table 14.1<\/span><\/a> gives an example of a frequency table used for a <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test. The columns represent the different categories within our single variable, which in this example is pet preference. The <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test can assess as few as two categories, and there is no technical upper limit on how many categories can be included in our variable, although, as with ANOVA, having too many categories makes our computations long and our interpretation difficult. The final column in the table is the total number of observations, or <img decoding=\"async\" class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/>. The <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test assumes that each observation comes from only one person and that each person will provide only one observation, so our total observations will always equal our sample size.<\/p>\n<div class=\"_idGenObjectLayout-1\">\n<div id=\"_idContainer657\" class=\"_idGenObjectStyleOverride-1\">\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor284\"><\/a>Table 14.1.<\/span> Community Resource Priorities<\/p>\n<table id=\"table085\" class=\"Foster-table\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-67\" \/>\n<col class=\"_idGenTableRowColumn-113\" \/>\n<col class=\"_idGenTableRowColumn-81\" \/>\n<col class=\"_idGenTableRowColumn-124\" \/>\n<col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-76\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\n<p class=\"Table-col-hd ParaOverride-4\">Affordable Housing<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Mental Health Services<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd\">Youth Programs<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Observed<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">14<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">17<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body\">5<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">36<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\n<p class=\"Table-col-hd\">Expected<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body ParaOverride-4\">12<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">12<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body\">12<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">36<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p class=\"Text\">There are two rows in this table. The first row gives the observed frequencies of each category from our dataset; in this example, 14 people reported affordable housing as a priority, 17 people reported mental health services as a priority, and 5 people reported youth programs as a priority. The second row gives expected values; <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_723\"><a id=\"_idTextAnchor285\"><\/a><\/a><span class=\"key-term\">expected values<\/span> are what would be found if each category had equal representation. The calculation for an expected value is:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-233\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.2-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">where <img decoding=\"async\" class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/> is the total number of people in our sample and <span class=\"italic\">C<\/span> is the number of categories in our variable (also the number of columns in our table). The expected values correspond to the null hypothesis for <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests: equal representation of categories. Our first of two <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests, the test for goodness of fit, will assess how well our data lines up with, or deviates from, this assumption.<\/p>\n<h3 class=\"H1\">Test for Goodness of Fit<\/h3>\n<p class=\"Text-1st\">The <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_726\"><a id=\"_idTextAnchor286\"><\/a><\/a><span class=\"key-term\">test for goodness of fit<\/span> assesses one categorical variable against a null hypothesis of equally sized frequencies. Equal frequency distributions are what we would expect to get if categorization was completely random. We could, in theory, also test against a specific distribution of category sizes if we have a good reason to. If we have information about how a population is distributed, we could compare our observed sample distribution to the expected values if the sample followed the same distribution as the population.<\/p>\n<h4 class=\"H2\">Hypotheses<\/h4>\n<p class=\"Text-1st\">All <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests, including the test for goodness of fit, are <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_725\"><a id=\"_idTextAnchor287\"><\/a><\/a><span class=\"key-term\">nonparametric tests<\/span>. This means that there is no population parameter we are estimating or testing against; we are working only with our sample data. Because of this, there are no mathematical statements for <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> hypotheses. This should make sense because the mathematical hypothesis statements were always about population parameters (e.g., <img decoding=\"async\" class=\"_idGenObjectAttribute-31\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn2.14-mu-12.png\" alt=\"mu\" \/>), so if we are nonparametric, we have no parameters and therefore no mathematical statements.<\/p>\n<p class=\"Text\">We do, however, still state our hypotheses verbally. For <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests for goodness of fit, our null hypothesis is that there is an equal number of observations in each category. That is, there is no difference between the categories in how prevalent they are. Our alternative hypothesis says that the categories do differ in their frequency. We do not have specific directions or one-tailed tests for <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>, matching our lack of mathematical statements.<\/p>\n<h4 class=\"H2\">Degrees of Freedom and the <img decoding=\"async\" class=\"_idGenObjectAttribute-3\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1-chiBold-h2-2.png\" alt=\"\" \/> Table<\/h4>\n<p class=\"Text-1st\">Our degrees of freedom for the <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test are based on the number of categories we have in our variable, not on the number of people or observations like it was for our other tests. Luckily, they are still as simple to calculate:<\/p>\n<p class=\"Equation\"><strong>df: (rows-1) \u00d7 (columns &#8211; 1)<\/strong><\/p>\n<p class=\"Text\">So for our community priority example, we have 3 categories, thus we have 2 degrees of freedom. Our degrees of freedom, along with our significance level (still defaulted to <span class=\"Symbol\">a<\/span> = .05) are used to find our critical values in the <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> table, a portion of which is shown in <a href=\"#_idTextAnchor288\"><span class=\"Fig-table-number-underscore\">Table 14.2<\/span><\/a>. (The complete <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>\u00a0table can be found in <a href=\"#_idTextAnchor302\"><span class=\"Hyperlink-underscore\">Appendix E<\/span><\/a>.) Because we do not have directional hypotheses for <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests, we do not need to differentiate between critical values for one- or two-tailed tests. In fact, just like our <span class=\"italic\">F\u00a0<\/span>tests for regression and ANOVA, all <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests are one-tailed tests.<\/p>\n<div class=\"_idGenObjectLayout-1\">\n<div id=\"_idContainer675\" class=\"_idGenObjectStyleOverride-1\">\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor288\"><\/a>Table 14.2.<\/span> Critical Values for Chi-Square (<img decoding=\"async\" class=\"_idGenObjectAttribute-235\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1a-2.png\" alt=\"\" \/> Table)<\/p>\n<table id=\"table086\" class=\"Foster-table\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-90\" \/>\n<col class=\"_idGenTableRowColumn-93\" \/>\n<col class=\"_idGenTableRowColumn-93\" \/>\n<col class=\"_idGenTableRowColumn-93\" \/>\n<col class=\"_idGenTableRowColumn-93\" \/>\n<col class=\"_idGenTableRowColumn-60\" \/> <\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-8\" rowspan=\"2\">\n<p class=\"Table-col-hd ParaOverride-4\"><span class=\"bold-italic\">df<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-21\" colspan=\"5\">\n<p class=\"Table-straddle-hd\">Proportion in Critical Region<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">.1<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">.05<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">.02<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-78 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">.01<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">.005<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">1<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-5\">2.706<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-5\">3.841<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-5\">5.024<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-5\">6.635<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-5\">7.879<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">2<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">4.605<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">5.991<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">7.378<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">9.210<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">10.597<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">3<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">6.251<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">7.815<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">9.348<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">11.345<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">12.838<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">4<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">7.779<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">9.488<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">11.143<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">13.277<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">14.860<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">5<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">9.236<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">11.070<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">12.833<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">15.086<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">16.750<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">6<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">10.645<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">12.592<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">14.449<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">16.812<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">18.548<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">7<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">12.017<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">14.067<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">16.013<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">18.475<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">20.278<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">8<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">13.362<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">15.507<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">17.535<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">20.090<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">21.955<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">9<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">14.684<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">16.919<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">19.023<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-8 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">21.666<\/p>\n<\/td>\n<td class=\"Foster-table Table-body _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-5\">23.589<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\n<p class=\"Table-body ParaOverride-4\">10<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\n<p class=\"Table-body ParaOverride-5\">15.987<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\n<p class=\"Table-body ParaOverride-5\">18.307<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\n<p class=\"Table-body ParaOverride-5\">20.483<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-8\">\n<p class=\"Table-body ParaOverride-5\">23.209<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body\">\n<p class=\"Table-body ParaOverride-5\">25.188<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3 class=\"H1\"><img decoding=\"async\" class=\"_idGenObjectAttribute-235\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1-chiBold-h1-2.png\" alt=\"\" \/> Statistic<\/h3>\n<p class=\"Text-1st\">The calculations for our test statistic in <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> tests combine our information from our observed frequencies (<span class=\"italic\">O<\/span>) and our expected frequencies (<span class=\"italic\">E<\/span>) for each level of our categorical variable. For each cell (category) we find the difference between the observed and expected values, square them, and divide by the expected values. We then sum this value across cells for our test statistic. This is shown in the formula:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-236\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.4-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">For our community priority preference data, we would have:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-237\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.5-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">Notice that, for each cell\u2019s calculation, the expected value in the numerator and the expected value in the denominator are the same value. Let\u2019s now take a look at an example from start to finish.<\/p>\n<p class=\"Example-New\"><span class=\"Example--\">Example: Support for Ending Cash Bail<\/span><\/p>\n<p class=\"p1\">Cash bail policies\u2014which often require people to pay money to secure their release while awaiting trial\u2014have long raised serious social justice concerns. Research shows that cash bail disproportionately harms low-income people and communities of color, keeping legally innocent individuals incarcerated simply because they cannot afford to pay. To better understand public attitudes toward reform, we gather data from a group of adults, asking whether they support ending cash bail (Yes or No).<\/p>\n<h3 class=\"H3-step\"><span class=\"Step--\">Step 1:<\/span> State the Hypotheses<\/h3>\n<p class=\"p1\">We begin with our hypotheses. Our <span class=\"s1\">null hypothesis<\/span> of no difference states that an equal number of people will support and not support ending cash bail. Our <span class=\"s1\">alternative hypothesis<\/span> is that one position is more common than the other.<\/p>\n<p>H<sub>0<\/sub>: An equal number of people are in support and not in support of ending cash bail.<\/p>\n<p>H<sub>a<\/sub>: A significant majority of people are in support or not in support of ending cash bail.<\/p>\n<h3 class=\"H3-step\"><span class=\"Step--\">Step 2:<\/span> Find the Critical Value<\/h3>\n<p class=\"Text-1st\">To avoid any potential bias in this crucial analysis, we will leave <img decoding=\"async\" class=\"_idGenObjectAttribute-89\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn7.1-alpha-7.png\" alt=\"alpha\" \/> at its typical level. We have two options in our data (Yes or No), which will give us two categories. Based on this, we will have 1\u00a0degree of freedom. From our <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> table, we find a critical value of 3.84.<\/p>\n<h3 class=\"H3-step\"><span class=\"Step--\">Step 3:<\/span> Calculate the Test Statistic<\/h3>\n<p class=\"Text-1st\">The results of the data collection are presented in <a href=\"#_idTextAnchor289\"><span class=\"Fig-table-number-underscore\">Table 14.3<\/span><\/a>. We had data from 45 people in all and 2 categories, so our expected values are <span class=\"italic\">E<\/span> = 45\/2 = 22.50.<\/p>\n<div class=\"_idGenObjectLayout-1\">\n<div id=\"_idContainer684\" class=\"_idGenObjectStyleOverride-1\">\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor289\"><\/a>Table 14.3.<\/span> <span class=\"Example--\">Support for Ending Cash Bail<\/span><\/p>\n<table id=\"table087\" class=\"Foster-table\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-27\" \/>\n<col class=\"_idGenTableRowColumn-34\" \/>\n<col class=\"_idGenTableRowColumn-18\" \/>\n<col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-76\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\n<p class=\"Table-col-hd ParaOverride-4\">Yes<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Observed<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body\">26<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body\">19<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">45<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\n<p class=\"Table-col-hd\">Expected<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body\">22.50<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body\">22.50<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">45<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p class=\"Text\">We can use these to calculate our <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> statistic:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-240\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.8-2.png\" alt=\"\" \/><\/p>\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 4:<\/span> Make the Decision<\/h5>\n<p class=\"Text-1st\">Our observed test statistic had a value of 1.08 and our critical value was 3.84. Our test statistic was smaller than our critical value, so we fail to reject the null hypothesis. <span style=\"text-align: initial;font-size: 1.125rem\">Based on our sample of 45 people, there is no significant difference between the observed and expected values for support or non support for ending cash bail, <\/span><img decoding=\"async\" class=\"_idGenObjectAttribute-235\" style=\"text-align: initial;font-size: 1.125rem\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.1a-2.png\" alt=\"\" \/><span style=\"text-align: initial;font-size: 1.125rem\"> (1, <\/span><span class=\"italic\" style=\"text-align: initial;font-size: 1.125rem\">N<\/span><span style=\"text-align: initial;font-size: 1.125rem\">\u00a0=\u00a045) = 1.089, <\/span><span class=\"italic\" style=\"text-align: initial;font-size: 1.125rem\">p<\/span><span style=\"text-align: initial;font-size: 1.125rem\"> = .297.<\/span><\/p>\n<h2 class=\"H1\">Contingency Tables for Two Variables<\/h2>\n<p class=\"p1\">The test for goodness of fit is a useful tool for assessing a single categorical variable. However, what is more common is wanting to know if two categorical variables are related to one another. This type of analysis is similar to a correlation, the only difference being that we are working with nominal data, which violates the assumptions of traditional correlation coefficients. This is where the test for independence comes in handy.<\/p>\n<p class=\"Text\">As noted above, our only description for nominal data is frequency, so we will again present our observations in a frequency table. When we have two categorical variables, our frequency table is crossed. That is, each combination of levels from each categorical variable is presented. This type of frequency table is called a <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_722\"><a id=\"_idTextAnchor291\"><\/a><\/a><span class=\"key-term\">contingency table<\/span> because it shows the frequency of each category in one variable, contingent upon the specific level of the other variable.<\/p>\n<p class=\"Text\">An example contingency table is shown in <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, which displays whether or not 168 college students <span class=\"s1\">experienced housing insecurity as children<\/span> (Yes\/No) and whether the students\u2019 <span class=\"s1\">final decision about which college to attend<\/span> was influenced by the college\u2019s <span class=\"s1\">basic-needs support systems<\/span> (Yes, primary; Yes, somewhat; No).<\/p>\n<div class=\"_idGenObjectLayout-1\">\n<div id=\"_idContainer697\" class=\"_idGenObjectStyleOverride-1\">\n<p class=\"Table-title\"><span class=\"Fig-table-number\"><a id=\"_idTextAnchor292\"><\/a>Table 14.4. <\/span>Contingency table of childhood housing insecurity and the role of basic-needs support in college decision-making<\/p>\n<table id=\"table088\" class=\"Foster-table\" style=\"height: 85px\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-106\" \/>\n<col class=\"_idGenTableRowColumn-62\" \/>\n<col class=\"_idGenTableRowColumn-122\" \/>\n<col class=\"_idGenTableRowColumn-100\" \/>\n<col class=\"_idGenTableRowColumn-125\" \/>\n<col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\" style=\"height: 17px\">\n<td class=\"Foster-table Table-col-hd CellOverride-21\" style=\"height: 17px;width: 135.555px\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-21\" style=\"height: 17px;width: 37.625px\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-79\" style=\"height: 17px;width: 178.555px\" colspan=\"3\">\n<p class=\"Table-straddle-hd\">Basic-Needs Support<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-80\" style=\"height: 17px;width: 37.7656px\"><\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-5\" style=\"height: 17px\">\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 135.555px\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 37.625px\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-81 _idGenCellOverride-4\" style=\"height: 17px;width: 58.8125px\">\n<p class=\"Table-col-hd\">Primary<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 76.75px\">\n<p class=\"Table-col-hd\">Somewhat<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\" style=\"height: 17px;width: 22.9922px\">\n<p class=\"Table-col-hd\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\" style=\"height: 17px;width: 37.7656px\">\n<p class=\"Table-col-hd\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\" style=\"height: 17px\">\n<td class=\"Foster-table Table-body CellOverride-83 _idGenCellOverride-1\" style=\"height: 34px;width: 135.555px\" rowspan=\"2\">\n<p class=\"Table-straddle-hd ParaOverride-51\">Childhood Housing Insecurity<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\" style=\"height: 17px;width: 37.625px\">\n<p class=\"Table-col-hd\">Yes<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\" style=\"height: 17px;width: 58.8125px\">\n<p class=\"Table-body ParaOverride-4\">47<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\" style=\"height: 17px;width: 76.75px\">\n<p class=\"Table-body ParaOverride-4\">26<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\" style=\"height: 17px;width: 22.9922px\">\n<p class=\"Table-body ParaOverride-4\">14<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\" style=\"height: 17px;width: 37.7656px\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 87<\/span><\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\" style=\"height: 17px\">\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-2\" style=\"height: 17px;width: 37.625px\">\n<p class=\"Table-col-hd\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-2\" style=\"height: 17px;width: 58.8125px\">\n<p class=\"Table-body ParaOverride-4\">21<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\" style=\"height: 17px;width: 76.75px\">\n<p class=\"Table-body ParaOverride-4\">23<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\" style=\"height: 17px;width: 22.9922px\">\n<p class=\"Table-body ParaOverride-4\">37<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\" style=\"height: 17px;width: 37.7656px\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 81<\/span><\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-11\" style=\"height: 17px\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-84\" style=\"height: 17px;width: 135.555px\"><\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\" style=\"height: 17px;width: 37.625px\">\n<p class=\"Table-col-hd\">Total<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\" style=\"height: 17px;width: 58.8125px\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">68<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\" style=\"height: 17px;width: 76.75px\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">49<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\" style=\"height: 17px;width: 22.9922px\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">51<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\" style=\"height: 17px;width: 37.7656px\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">168<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p class=\"Text\">In contrast to the frequency table for our test for goodness of fit, our contingency table does not contain expected values, only observed data. Within our table, wherever our rows and columns cross, we have a cell. A cell contains the frequency of observing its corresponding specific levels of each variable at the same time. The top left cell in <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a> shows us that 47 people in our study experienced housing insecurity a child <span class=\"italic\">and the need for basic-needs support was a primary factor in making a decision of which college to attend.\u00a0<\/span><\/p>\n<p class=\"Text\">Cells are numbered based on which row they are in (rows are numbered top to bottom) and which column they are in (columns are numbered left to right). We always name the cell using (<span class=\"italic\">R<\/span>,<span class=\"italic\">C<\/span>), with the row first and the column second.\u00a0 Based on this convention, the top left cell containing our 47 participants who experienced housing insecurity as a child and had basic needs support as a primary criteria is cell (1,1). Next to it, which has 26 people who did experience housing insecurity as a child, but the college&#8217;s basics needs support only somewhat affect their decision, is cell (1,2), and so on. We only number the cells where our categories cross. We do not number our total cells, which have their own special name: marginal values.<\/p>\n<p class=\"Text\"><span class=\"key-term\"><a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_724\"><a id=\"_idTextAnchor293\"><\/a><\/a>Marginal values<\/span> are the total values for a single category of one variable, added up across levels of the other variable. In <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, these marginal values have been made bold for ease of explanation, though this is not normally the case. We can see that, in total, 87 of our participants (47 + 26 + 14) reported yes to having housing insecurity growing up and 81 (21 + 23 + 37) did not. The total of these two marginal values is 168, the total number of people in our study. Likewise, 68 people used basic needs support as a primary criterion for deciding which college to attend, 50 considered it somewhat, and 50 did not consider it at all. The total of these marginal values is also 168, our total number of people. The marginal values for rows and columns will always both add up to the total number of participants, <img decoding=\"async\" class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/>, in the study. If they do not, then a calculation error was made and you must go back and check your work.<\/p>\n<h4 class=\"H2\">Expected Values of Contingency Tables<\/h4>\n<p class=\"Text-1st\">Our expected values for contingency tables are based on the same logic as they were for frequency tables, but now we must incorporate information about how frequently each row and column was observed (the marginal values) and how many people were in the sample overall (<img decoding=\"async\" class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/>) to find what random chance would have made the frequencies out to be. Specifically:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-243\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.9-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">The subscripts <span class=\"italic\">i <\/span>and <span class=\"italic\">j <\/span>indicate which row and column, respectively, correspond to the cell we are calculating the expected frequency for, and the <span class=\"italic\">R<\/span><span class=\"subscript-italic _idGenCharOverride-1\">i<\/span> and <span class=\"italic\">C<\/span><span class=\"subscript-italic _idGenCharOverride-1\">j<\/span> are the row and column marginal values, respectively. <img decoding=\"async\" class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/> is still the total sample size. Using the data from <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, we can calculate the expected frequency for cell (1,1), the housing insecurity and based needs support as primary criteria in deciding what college to attend, to be:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-244\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.10-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">We can follow the same math to find all the expected values for this table:<\/p>\n<table id=\"table089\" class=\"Foster-table _idGenTablePara-1\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-106\" \/>\n<col class=\"_idGenTableRowColumn-62\" \/>\n<col class=\"_idGenTableRowColumn-122\" \/>\n<col class=\"_idGenTableRowColumn-100\" \/>\n<col class=\"_idGenTableRowColumn-124\" \/>\n<col class=\"_idGenTableRowColumn-40\" \/> <\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-79\" colspan=\"3\">\n<p class=\"Table-straddle-hd\">Basic Needs Support<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-80\"><\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-81 _idGenCellOverride-4\">\n<p class=\"Table-col-hd\">Primary<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\">\n<p class=\"Table-col-hd\">Somewhat<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\n<p class=\"Table-col-hd\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\n<p class=\"Table-straddle-hd ParaOverride-51\">Housing Insecurity<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Yes<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body\">35.21<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body\">25.38<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body\">26.41<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 87<\/span><\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-2\">\n<p class=\"Table-col-hd\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-2\">\n<p class=\"Table-body\">32.79<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\n<p class=\"Table-body\">23.62<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\n<p class=\"Table-body\">24.59<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\"> 81<\/span><\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-11\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-84\"><\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\n<p class=\"Table-col-hd\">Total<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body\"><span class=\"bold\">68<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body\"><span class=\"bold\">49<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body\"><span class=\"bold\">51<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\"><span class=\"bold\">168<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"Text\">Notice that the marginal values still add up to the same totals as before. This is because the expected frequencies are just row and column averages simultaneously. Our total <img decoding=\"async\" class=\"_idGenObjectAttribute-36\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn3.2-upperN-4.png\" alt=\"Upper N\" \/> will also add up to the same value.<\/p>\n<p class=\"Text\">The observed and expected frequencies can be used to calculate the same <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> statistic as we calculated for the test for goodness of fit. Before we get there, though, we should look at the hypotheses and degrees of freedom used for contingency tables.<\/p>\n<h3 class=\"H1\">Test for Independence<\/h3>\n<p class=\"Text-1st\">The <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test performed on contingency tables is known as the <a class=\"glossary-term\" aria-haspopup=\"dialog\" aria-describedby=\"definition\" href=\"#term_462_727\"><a id=\"_idTextAnchor294\"><\/a><\/a><span class=\"key-term\">test for independence<\/span>. In this analysis, we are looking to see if the values of each categorical variable (that is, the frequency of their levels) is related to or independent of the values of the other categorical variable. Because we are still doing a <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>\u00a0test, which is nonparametric, we still do not have mathematical versions of our hypotheses. The actual interpretations of the hypotheses are quite simple: the null hypothesis says that the variables are independent or not related, and the alternative hypothesis says that they are not independent or that they are related. Using this setup and the data provided in <a href=\"#_idTextAnchor292\"><span class=\"Fig-table-number-underscore\">Table 14.4<\/span><\/a>, let\u2019s formally test for whether having housing insecurity\u00a0 as a child is related to using basic needs as a criteria for selecting a college to attend.<\/p>\n<p class=\"Example-New\">We will follow the same four-step procedure as we have since <a href=\"https:\/\/pressbooks.palomar.edu\/introtostats\/chapter\/chapter-7\/\"><span class=\"Hyperlink-underscore\">Chapter 7<\/span><\/a>.<\/p>\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 1:<\/span> State the Hypotheses<\/h5>\n<p class=\"Text-1st\">Our null hypothesis of no difference will state that there is no relationship between our variables, and our alternative will state that our variables are related.<\/p>\n<p>H<sub>0<\/sub>:\u00a0There is <span class=\"s1\">no association<\/span> between whether students experienced housing insecurity as children and whether basic-needs support (primary, somewhat, no) influenced their college choice.<\/p>\n<p>H<sub>a<\/sub>: There is an association between childhood housing insecurity and whether basic-needs support (primary, somewhat, no) influenced students\u2019 college choice.<\/p>\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 2:<\/span> Find the Critical Value<\/h5>\n<p class=\"Text-1st\">Our critical value will come from the same table that we used for the test for goodness of fit, but our degrees of freedom will change. Because we now have rows and columns (instead of just columns) our new degrees of freedom use information from both:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-247\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.13-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">In our example:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-248\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.14-2.png\" alt=\"\" \/><\/p>\n<p class=\"Text\">Based on our 2 degrees of freedom, our critical value from our table is 5.991.<\/p>\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 3:<\/span> Calculate the Test Statistic<\/h5>\n<p class=\"Text-1st\">The same formula for <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> is used once again:<\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-236\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.4-2.png\" alt=\"\" \/><\/p>\n<p class=\"Equation\"><img decoding=\"async\" class=\"_idGenObjectAttribute-249\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.16-2.png\" alt=\"\" \/><\/p>\n<p class=\"Equation ParaOverride-52\"><img decoding=\"async\" class=\"_idGenObjectAttribute-250\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.17-2.png\" alt=\"\" \/><\/p>\n<h5 class=\"H3-step\"><span class=\"Step--\">Step 4:<\/span> Make the Decision<\/h5>\n<p class=\"Text-1st\">The final decision for our test of independence is still based on our observed value (20.31) and our critical value (5.991). Because our observed value is greater than our critical value, we can reject the null hypothesis.<\/p>\n<p class=\"Text-indented-2p\">Reject <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>. Based on our data from 168 people, we can say that there is a statistically significant relationship between whether someone has had housing insecurity and the influence a college\u2019s basic needs support have on that person\u2019s decision on which college to attend.<\/p>\n<div class=\"_idGenObjectStyleOverride-2\"><\/div>\n<div>\n<h2 class=\"p1\">Conclusion:<\/h2>\n<p class=\"p1\">The chi-square test is a powerful tool for uncovering patterns in categorical data that signal whether social experiences are distributed equitably across different groups. By comparing observed frequencies to what would be expected by chance, chi-square helps us see when structural forces\u2014such as housing insecurity, discrimination, resource access, or policy barriers\u2014shape people\u2019s opportunities in ways that are not random. In social justice research, this matters greatly: detecting associations between lived experiences and outcomes can reveal inequities that might otherwise remain hidden in simple averages or narratives. Whether we are examining disparities in educational pathways, health outcomes, employment practices, or interactions with social institutions, chi-square enables us to document unequal patterns, question why they exist, and begin imagining data-driven interventions that promote fairness and support communities most impacted by systemic inequality.<\/p>\n<\/div>\n<h3 class=\"H1\">Exercises<\/h3>\n<ol>\n<li class=\"Numbered-list-Exercises-1st\">What does a frequency table display? What does a contingency table display?<\/li>\n<li class=\"Numbered-list-Exercises\">What does a test for goodness of fit assess?<\/li>\n<li class=\"Numbered-list-Exercises\">How do expected frequencies relate to the null hypothesis?<\/li>\n<li class=\"Numbered-list-Exercises\">What does a test for independence assess?<\/li>\n<li class=\"Numbered-list-Exercises\">Compute the expected frequencies for the following contingency table:<br \/>\n<table id=\"table090\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-111\" \/>\n<col class=\"_idGenTableRowColumn-109\" \/>\n<col class=\"_idGenTableRowColumn-44\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-54\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\n<p class=\"Table-col-hd ParaOverride-4\">Category A<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Category B<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-85 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Category C<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">22<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">38<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-85\">\n<p class=\"Table-col-hd\">Category D<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body ParaOverride-4\">16<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">14<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li class=\"Numbered-list-Exercises\">Test significance and find effect sizes for the following tests:\n<ol>\n<li class=\"Numbered-list-Exercises-sub _idGenParaOverride-1\"><span class=\"italic\">N <\/span>= 19, <span class=\"italic\">R<\/span> = 3, <span class=\"italic\">C<\/span> = 2, <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(2) = 7.89, <span class=\"Symbol\">a<\/span> = .05<\/li>\n<li class=\"Numbered-list-Exercises-sub _idGenParaOverride-1\"><span class=\"italic\">N <\/span>= 12, <span class=\"italic\">R<\/span> = 2, <span class=\"italic\">C<\/span> = 2, <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(1) = 3.12, <span class=\"Symbol\">a<\/span> = .05<\/li>\n<li class=\"Numbered-list-Exercises-sub _idGenParaOverride-1\"><span class=\"italic\">N <\/span>= 74, <span class=\"italic\">R<\/span> = 3, <span class=\"italic\">C<\/span> = 3, <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(4) = 28.41, <span class=\"Symbol\">a<\/span> = .01<\/li>\n<\/ol>\n<\/li>\n<li class=\"Numbered-list-Exercises\">You hear a lot of people claim that <span class=\"italic\">The Empire Strikes Back<\/span> is the best movie in the original <span class=\"italic\">Star\u00a0Wars<\/span> trilogy, and you decide to collect some data to demonstrate this empirically (pun intended). You ask 48 people which of the original movies they liked best; 8 said <span class=\"italic\">A New Hope <\/span>was their favorite, 23 said <span class=\"italic\">The Empire Strikes Back <\/span>was their favorite, and 17 said <span class=\"italic\">Return of the Jedi <\/span>was their favorite. Perform a <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/> test on these data at the .05 level of significance.<\/li>\n<li class=\"Numbered-list-Exercises\">A pizza company wants to know if people order the same number of different toppings. They look at how many pepperoni, sausage, and cheese pizzas were ordered in the last week. Fill out the rest of the frequency table and test for a difference.<br \/>\n<table id=\"table091\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-27\" \/>\n<col class=\"_idGenTableRowColumn-73\" \/>\n<col class=\"_idGenTableRowColumn-97\" \/>\n<col class=\"_idGenTableRowColumn-55\" \/>\n<col class=\"_idGenTableRowColumn-40\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-86\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\n<p class=\"Table-col-hd ParaOverride-4\">Pepperoni<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Sausage<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd\">Cheese<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Observed<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">320<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">275<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">251<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\"><\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\n<p class=\"Table-col-hd\">Expected<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\"><\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li class=\"Numbered-list-Exercises\">A university administrator wants to know if there is a difference in proportions of students who go on to grad school across different majors. Use the data below to test whether there is a relationship between college major and going to grad school.<br \/>\n<table id=\"table092\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-106\" \/>\n<col class=\"_idGenTableRowColumn-126\" \/>\n<col class=\"_idGenTableRowColumn-33\" \/>\n<col class=\"_idGenTableRowColumn-83\" \/>\n<col class=\"_idGenTableRowColumn-127\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-79\" colspan=\"3\">\n<p class=\"Table-straddle-hd\">Major<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-87 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Psychology<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Business<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Math<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\n<p class=\"Table-straddle-hd ParaOverride-51\">Graduate School<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Yes<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">32<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">8<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">36<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\n<p class=\"Table-col-hd\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body ParaOverride-4\">15<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">41<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">12<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li class=\"Numbered-list-Exercises\">A company you work for wants to make sure they are not discriminating against anyone in their promotion process. You have been asked to look across gender to see if there are differences in promotion rate (i.e., if gender and promotion rate are independent or not). The following data should be assessed at the normal level of significance:<br \/>\n<table id=\"table093\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-81\" \/>\n<col class=\"_idGenTableRowColumn-80\" \/>\n<col class=\"_idGenTableRowColumn-128\" \/>\n<col class=\"_idGenTableRowColumn-129\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-19\">\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-88\" colspan=\"2\">\n<p class=\"Table-straddle-hd\">Promoted in Last Two Years?<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-89 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Yes<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-90 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">No<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\n<p class=\"Table-straddle-hd ParaOverride-51\">Gender<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Women<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-91 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">8<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-2 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">5<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\n<p class=\"Table-col-hd\">Men<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-91\">\n<p class=\"Table-body ParaOverride-4\">9<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">7<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ol>\n<div class=\"textbox textbox--learning-objectives\">\n<header class=\"textbox__header\">\n<h3 class=\"H1\">Answers to Odd-Numbered Exercises<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h3 class=\"H1\">1)<br \/>\nFrequency tables display observed category frequencies and (sometimes) expected category frequencies for a single categorical variable. Contingency tables display the frequency of observing people in crossed category levels for two categorical variables, and (sometimes) the marginal totals of each variable level.<\/h3>\n<p>3)<br \/>\n<span style=\"font-size: 0.8em;font-weight: lighter\">Expected values are what we would observe if the proportion of categories was completely random (i.e., no consistent difference other than chance), which is the same was what the null hypothesis predicts to be true.<\/span><\/p>\n<p>5)<br \/>\n<span style=\"font-size: 0.8em;font-weight: lighter\">Observed:<\/span><\/p>\n<table id=\"table094\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-111\" \/>\n<col class=\"_idGenTableRowColumn-109\" \/>\n<col class=\"_idGenTableRowColumn-44\" \/>\n<col class=\"_idGenTableRowColumn-63\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-54\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\n<p class=\"Table-col-hd ParaOverride-4\">Category A<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Category B<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-85 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Category C<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">22<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">38<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">60<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-7\">\n<td class=\"Foster-table Table-body CellOverride-85 _idGenCellOverride-2\">\n<p class=\"Table-col-hd\">Category D<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">16<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">14<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">30<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-11\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-85\">\n<p class=\"Table-col-hd\">Total<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body ParaOverride-4\">38<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">52<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">90<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Expected:<\/p>\n<table id=\"table095\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-111\" \/>\n<col class=\"_idGenTableRowColumn-103\" \/>\n<col class=\"_idGenTableRowColumn-57\" \/>\n<col class=\"_idGenTableRowColumn-63\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-54\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-92\">\n<p class=\"Table-col-hd ParaOverride-4\">Category A<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-93\">\n<p class=\"Table-col-hd ParaOverride-4\">Category B<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-84\">\n<td class=\"Foster-table Table-body CellOverride-94 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Category C<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-95 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\"><img decoding=\"async\" class=\"_idGenObjectAttribute-251\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.22-2.png\" alt=\"\" \/><\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-96 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\"><img decoding=\"async\" class=\"_idGenObjectAttribute-251\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.24-2.png\" alt=\"\" \/><\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-97 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">60<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-130\">\n<td class=\"Foster-table Table-body CellOverride-94 _idGenCellOverride-2\">\n<p class=\"Table-col-hd\">Category D<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-95 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\"><img decoding=\"async\" class=\"_idGenObjectAttribute-252\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.23-2.png\" alt=\"\" \/><\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-96 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\"><img decoding=\"async\" class=\"_idGenObjectAttribute-252\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.25-2.png\" alt=\"\" \/><\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-97 _idGenCellOverride-2\">\n<p class=\"Table-body ParaOverride-4\">30<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-11\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-85\">\n<p class=\"Table-col-hd\">Total<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-92\">\n<p class=\"Table-body ParaOverride-4\">38<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-93\">\n<p class=\"Table-body ParaOverride-4\">52<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">90<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>7)<\/p>\n<p><span class=\"italic\">Step 1:<\/span> <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>: \u201cThere is no difference in preference for one movie,\u201d <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">A<\/span>: \u201cThere is a difference in how many people prefer one movie over the others.\u201d<br \/>\n<span class=\"italic\">Step 2:<\/span> Three categories (columns) gives <span class=\"italic\">d<\/span><span class=\"italic\">f<\/span> = 2, <img decoding=\"async\" class=\"_idGenObjectAttribute-253\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.20-2.png\" alt=\"\" \/> = 5.991<br \/>\n<span class=\"italic\">Step 3:<\/span> Based on the given frequencies:<\/p>\n<table id=\"table096\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-27\" \/>\n<col class=\"_idGenTableRowColumn-73\" \/>\n<col class=\"_idGenTableRowColumn-106\" \/>\n<col class=\"_idGenTableRowColumn-27\" \/>\n<col class=\"_idGenTableRowColumn-40\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-86\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-58\">\n<p class=\"Table-col-hd ParaOverride-4\"><span class=\"bold-italic\">New Hope<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\"><span class=\"bold-italic\">Empire<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd\"><span class=\"bold-italic\">Jedi<\/span><\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-1\">\n<p class=\"Table-col-hd ParaOverride-4\">Total<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body CellOverride-77 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Observed<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">8<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">23<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">17<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">48<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-77\">\n<p class=\"Table-col-hd\">Expected<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body ParaOverride-4\">16<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">16<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">16<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img decoding=\"async\" class=\"_idGenObjectAttribute-216\" style=\"font-size: 0.8em;font-weight: lighter\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/><span style=\"font-size: 0.8em;font-weight: lighter\"> = 7.13. This is a statistically significant result<\/span><\/p>\n<p><span class=\"italic\">Step 4:<\/span> Our obtained statistic is greater than our critical value, reject <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>. Based on our sample of 48 people, there is a statistically significant difference in the proportion of people who prefer one <span class=\"italic\">Star Wars<\/span> movie over the others, <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(2, <span class=\"italic\">N<\/span> = 48) = 7.13, <span class=\"italic\">p<\/span> &lt; .05.<\/p>\n<p>9)<br \/>\n<span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">Step 1:<\/span> <span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">H<\/span><span class=\"subscript _idGenCharOverride-1\" style=\"font-size: 0.8em;font-weight: lighter\">0<\/span><span style=\"font-size: 0.8em;font-weight: lighter\">: \u201cThere is no relationship between college major and going to grad school,\u201d <\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">H<\/span><span class=\"subscript _idGenCharOverride-1\" style=\"font-size: 0.8em;font-weight: lighter\">A<\/span><span style=\"font-size: 0.8em;font-weight: lighter\">: \u201cGoing to grad school is related to college major.\u201d<br \/>\n<\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">Step 2:<\/span> <span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">d<\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">f<\/span><span style=\"font-size: 0.8em;font-weight: lighter\"> = 2, <\/span><img decoding=\"async\" class=\"_idGenObjectAttribute-253\" style=\"font-size: 0.8em;font-weight: lighter\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2024\/10\/Eqn14.20-2.png\" alt=\"\" \/><span style=\"font-size: 0.8em;font-weight: lighter\"> = 5.991<br \/>\n<\/span><span class=\"italic\" style=\"font-size: 0.8em;font-weight: lighter\">Step 3:<\/span><span style=\"font-size: 0.8em;font-weight: lighter\"> Based on the expected frequencies:<\/span><\/p>\n<\/div>\n<div class=\"textbox__content\">\n<table id=\"table097\" class=\"Foster-table _idGenTablePara-2\">\n<colgroup>\n<col class=\"_idGenTableRowColumn-106\" \/>\n<col class=\"_idGenTableRowColumn-126\" \/>\n<col class=\"_idGenTableRowColumn-33\" \/>\n<col class=\"_idGenTableRowColumn-83\" \/>\n<col class=\"_idGenTableRowColumn-124\" \/><\/colgroup>\n<thead>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-21\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-98\" colspan=\"3\">\n<p class=\"Table-straddle-hd\">Major<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-5\">\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-23 _idGenCellOverride-4\"><\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-87 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Psychology<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Business<\/p>\n<\/td>\n<td class=\"Foster-table Table-col-hd CellOverride-82 _idGenCellOverride-4\">\n<p class=\"Table-col-hd ParaOverride-4\">Math<\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"Foster-table _idGenTableRowColumn-6\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-83 _idGenCellOverride-1\" rowspan=\"2\">\n<p class=\"Table-straddle-hd ParaOverride-51\">Graduate School<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-45 _idGenCellOverride-1\">\n<p class=\"Table-col-hd\">Yes<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-58 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">24.81<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">25.86<\/p>\n<\/td>\n<td class=\"Foster-table Table-body CellOverride-1 _idGenCellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">25.33<\/p>\n<\/td>\n<\/tr>\n<tr class=\"Foster-table _idGenTableRowColumn-8\">\n<td class=\"Foster-table Table-body-last Table-body CellOverride-45\">\n<p class=\"Table-col-hd\">No<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-58\">\n<p class=\"Table-body ParaOverride-4\">22.19<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">23.14<\/p>\n<\/td>\n<td class=\"Foster-table Table-body-last Table-body CellOverride-1\">\n<p class=\"Table-body ParaOverride-4\">22.67<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img decoding=\"async\" class=\"_idGenObjectAttribute-216\" style=\"font-size: 0.8em;font-weight: lighter\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/><span style=\"font-size: 0.8em;font-weight: lighter\"> = 2.09 + 12.34 + 4.49 + 2.33 + 13.79 + 5.02 = 40.05<\/span><span class=\"italic\">Step 4:<\/span> Obtained statistic is greater than the critical value, reject <span class=\"italic\">H<\/span><span class=\"subscript _idGenCharOverride-1\">0<\/span>. Based on our data, there\u00a0is\u00a0a\u00a0statistically significant relationship between college major and going to grad school, <img decoding=\"async\" class=\"_idGenObjectAttribute-216\" src=\"https:\/\/pressbooks.palomar.edu\/wp-content\/uploads\/sites\/8\/2021\/12\/Eqn14.1-2.png\" alt=\"chi square\" \/>(2, <span class=\"italic\">N<\/span> = 144) = 40.05, <span class=\"italic\">p<\/span> &lt; .05<\/p>\n<div class=\"_idFootnotes\">\n<div id=\"footnote-000\" class=\"_idFootnote\">\n<p class=\"Footnote-Ahrndt\">\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"glossary\"><span class=\"screen-reader-text\" id=\"definition\">definition<\/span><template id=\"term_462_721\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_721\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><template id=\"term_462_723\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_723\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><template id=\"term_462_726\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_726\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><template id=\"term_462_725\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_725\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><template id=\"term_462_722\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_722\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><template id=\"term_462_724\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_724\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><template id=\"term_462_727\"><div class=\"glossary__definition\" role=\"dialog\" data-id=\"term_462_727\"><div tabindex=\"-1\"><\/div><button><span aria-hidden=\"true\">&times;<\/span><span class=\"screen-reader-text\">Close definition<\/span><\/button><\/div><\/template><\/div>","protected":false},"author":7,"menu_order":8,"template":"","meta":{"pb_show_title":"","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-462","chapter","type-chapter","status-publish","hentry"],"part":335,"_links":{"self":[{"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/chapters\/462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/wp\/v2\/users\/7"}],"version-history":[{"count":11,"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/chapters\/462\/revisions"}],"predecessor-version":[{"id":1011,"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/chapters\/462\/revisions\/1011"}],"part":[{"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/parts\/335"}],"metadata":[{"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/chapters\/462\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/wp\/v2\/media?parent=462"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/pressbooks\/v2\/chapter-type?post=462"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/wp\/v2\/contributor?post=462"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.palomar.edu\/introtostats\/wp-json\/wp\/v2\/license?post=462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}