{"id":1404,"date":"2023-06-22T02:22:48","date_gmt":"2023-06-22T02:22:48","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/chi-square-test-for-goodness-of-fit-learn-it-1\/"},"modified":"2025-05-16T23:37:37","modified_gmt":"2025-05-16T23:37:37","slug":"chi-square-test-for-goodness-of-fit-learn-it-1","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/chi-square-test-for-goodness-of-fit-learn-it-1\/","title":{"raw":"Chi-Square Test for Goodness of Fit \u2013 Learn It 1","rendered":"Chi-Square Test for Goodness of Fit \u2013 Learn It 1"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Complete a chi-square test for goodness of fit and write its conclusion in context of the problem&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Complete a chi-square test for goodness of fit and write its conclusion in context of the problem<\/span><\/li>\r\n<\/ul>\r\n<\/section>\r\n<section class=\"textbox keyTakeaway\">\r\n<h3>[latex]\\chi^2[\/latex] test for goodness of fit<\/h3>\r\n<p>A <strong>goodness-of-fit hypothesis test<\/strong> determines whether or not the distribution of a categorical variable in a sample fits a claimed distribution in the population.<\/p>\r\n<\/section>\r\n<p>We can answer the following research questions with a chi-square goodness-of-fit test:<\/p>\r\n<ul>\r\n\t<li>According to the manufacturer of M&amp;M candy, the color distribution for plain chocolate M&amp;Ms is [latex]13\\%[\/latex] brown, [latex]13\\%[\/latex] red, [latex]14\\%[\/latex] yellow, [latex]24\\%[\/latex] blue, [latex]20\\%[\/latex] orange, and [latex]16\\%[\/latex] green. Do the M&amp;Ms in our sample suggest that the color distribution is different?<\/li>\r\n<\/ul>\r\n<ul>\r\n\t<li>The distribution of blood types for whites in the United States is [latex]45\\%[\/latex] type O, [latex]41\\%[\/latex] type A, [latex]10\\%[\/latex] type B, and [latex]4\\%[\/latex] type AB. Is the distribution of blood types different for Asian Americans?<\/li>\r\n<\/ul>\r\n<section class=\"textbox recall\">The <strong>null hypothesis<\/strong> states a specific distribution of proportions for each category of the variable in the population.<br \/>\r\nThe <strong>alternative hypothesis<\/strong> says that the distribution is different from that stated in the null hypothesis.<br \/>\r\nTo test our hypotheses, we select a random sample from the population and determine the distribution of the categorical variable in the data.<\/section>\r\n<p>Let's revisit the Italian football scenario. Recall that researchers measured birth rates in Italy and found the following results:<\/p>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Quarter<\/strong><\/td>\r\n<td>\r\n<p><strong>Quarter 1<\/strong><\/p>\r\n<p><strong>(Jan. \u2013 March)<\/strong><\/p>\r\n<\/td>\r\n<td>\r\n<p><strong>Quarter 2 <\/strong><\/p>\r\n<p><strong>(April \u2013 June)<\/strong><\/p>\r\n<\/td>\r\n<td>\r\n<p><strong>Quarter 3<\/strong><\/p>\r\n<p><strong>(July \u2013 Sept.)<\/strong><\/p>\r\n<\/td>\r\n<td>\r\n<p><strong>Quarter 4<\/strong><\/p>\r\n<p><strong>(Oct. \u2013 Dec.)<\/strong><\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Proportion of births in Italy<\/strong><\/td>\r\n<td>[latex]22.48\\%[\/latex]<\/td>\r\n<td>[latex]24.98\\%[\/latex]<\/td>\r\n<td>[latex]25.74\\%[\/latex]<\/td>\r\n<td>[latex]26.80\\%[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1 ]2353[\/ohm2_question]<\/section>\r\n<section class=\"textbox recall\">STEPS for Hypothesis Testing:\r\n\r\n<ol>\r\n\t<li>Write out the null and alternative hypotheses.<\/li>\r\n\t<li>Check the conditions\/assumptions.<\/li>\r\n\t<li>Calculate a test statistic.<\/li>\r\n\t<li>Calculate a P-value.<\/li>\r\n\t<li>Compare the P-value to the significance level, [latex]\\alpha[\/latex], to make a decision.<br \/>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Decision<\/strong><\/td>\r\n<td><strong>Conclusion<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td>If P-value [latex]\\le\\alpha[\/latex], there is enough evidence to reject the null hypothesis.<\/td>\r\n<td>At the [latex]\\alpha\\times[\/latex]100% significance level, the data provide convincing evidence in support of the alternative hypothesis.<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>If P-value [latex]\\gt\\alpha[\/latex], there is not enough evidence to reject the null hypothesis.<\/td>\r\n<td>At the [latex]\\alpha\\times[\/latex]100% significance level, the data do not provide convincing evidence in support of the alternative hypothesis.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n\t<li>Write a conclusion in context (e.g., we do\/do not have convincing evidence\u2026).<\/li>\r\n<\/ol>\r\n<\/section>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Complete a chi-square test for goodness of fit and write its conclusion in context of the problem&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Complete a chi-square test for goodness of fit and write its conclusion in context of the problem<\/span><\/li>\n<\/ul>\n<\/section>\n<section class=\"textbox keyTakeaway\">\n<h3>[latex]\\chi^2[\/latex] test for goodness of fit<\/h3>\n<p>A <strong>goodness-of-fit hypothesis test<\/strong> determines whether or not the distribution of a categorical variable in a sample fits a claimed distribution in the population.<\/p>\n<\/section>\n<p>We can answer the following research questions with a chi-square goodness-of-fit test:<\/p>\n<ul>\n<li>According to the manufacturer of M&amp;M candy, the color distribution for plain chocolate M&amp;Ms is [latex]13\\%[\/latex] brown, [latex]13\\%[\/latex] red, [latex]14\\%[\/latex] yellow, [latex]24\\%[\/latex] blue, [latex]20\\%[\/latex] orange, and [latex]16\\%[\/latex] green. Do the M&amp;Ms in our sample suggest that the color distribution is different?<\/li>\n<\/ul>\n<ul>\n<li>The distribution of blood types for whites in the United States is [latex]45\\%[\/latex] type O, [latex]41\\%[\/latex] type A, [latex]10\\%[\/latex] type B, and [latex]4\\%[\/latex] type AB. Is the distribution of blood types different for Asian Americans?<\/li>\n<\/ul>\n<section class=\"textbox recall\">The <strong>null hypothesis<\/strong> states a specific distribution of proportions for each category of the variable in the population.<br \/>\nThe <strong>alternative hypothesis<\/strong> says that the distribution is different from that stated in the null hypothesis.<br \/>\nTo test our hypotheses, we select a random sample from the population and determine the distribution of the categorical variable in the data.<\/section>\n<p>Let&#8217;s revisit the Italian football scenario. Recall that researchers measured birth rates in Italy and found the following results:<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Quarter<\/strong><\/td>\n<td>\n<p><strong>Quarter 1<\/strong><\/p>\n<p><strong>(Jan. \u2013 March)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Quarter 2 <\/strong><\/p>\n<p><strong>(April \u2013 June)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Quarter 3<\/strong><\/p>\n<p><strong>(July \u2013 Sept.)<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>Quarter 4<\/strong><\/p>\n<p><strong>(Oct. \u2013 Dec.)<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Proportion of births in Italy<\/strong><\/td>\n<td>[latex]22.48\\%[\/latex]<\/td>\n<td>[latex]24.98\\%[\/latex]<\/td>\n<td>[latex]25.74\\%[\/latex]<\/td>\n<td>[latex]26.80\\%[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm2353\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=2353&theme=lumen&iframe_resize_id=ohm2353&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<section class=\"textbox recall\">STEPS for Hypothesis Testing:<\/p>\n<ol>\n<li>Write out the null and alternative hypotheses.<\/li>\n<li>Check the conditions\/assumptions.<\/li>\n<li>Calculate a test statistic.<\/li>\n<li>Calculate a P-value.<\/li>\n<li>Compare the P-value to the significance level, [latex]\\alpha[\/latex], to make a decision.<br \/>\n<table>\n<tbody>\n<tr>\n<td><strong>Decision<\/strong><\/td>\n<td><strong>Conclusion<\/strong><\/td>\n<\/tr>\n<tr>\n<td>If P-value [latex]\\le\\alpha[\/latex], there is enough evidence to reject the null hypothesis.<\/td>\n<td>At the [latex]\\alpha\\times[\/latex]100% significance level, the data provide convincing evidence in support of the alternative hypothesis.<\/td>\n<\/tr>\n<tr>\n<td>If P-value [latex]\\gt\\alpha[\/latex], there is not enough evidence to reject the null hypothesis.<\/td>\n<td>At the [latex]\\alpha\\times[\/latex]100% significance level, the data do not provide convincing evidence in support of the alternative hypothesis.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>Write a conclusion in context (e.g., we do\/do not have convincing evidence\u2026).<\/li>\n<\/ol>\n<\/section>\n","protected":false},"author":8,"menu_order":13,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":1388,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1404"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":4,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1404\/revisions"}],"predecessor-version":[{"id":6867,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1404\/revisions\/6867"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1388"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1404\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1404"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1404"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1404"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}