{"id":1455,"date":"2023-06-22T02:28:47","date_gmt":"2023-06-22T02:28:47","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/anova-for-regression-learn-it-2\/"},"modified":"2024-03-01T20:01:38","modified_gmt":"2024-03-01T20:01:38","slug":"anova-for-regression-learn-it-2","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/anova-for-regression-learn-it-2\/","title":{"raw":"ANOVA for Regression - Learn It 2","rendered":"ANOVA for Regression &#8211; Learn It 2"},"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;Understand what is measured by SSRegression, SSResiduals, and SSTotal in a regression context&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4609,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;Calibri&quot;}\">Understand what is measured by SSRegression, SSResiduals, and SSTotal in a regression context<\/span><\/li>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Discuss the factors that affect the value of F-statistics in a regression context&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4609,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;Calibri&quot;}\">Discuss the factors that affect the value of F-statistics in a regression context<\/span><\/li>\r\n<\/ul>\r\n<\/section>\r\n<section class=\"textbox keyTakeaway\">\r\n<h3>ANOVA for Regression<\/h3>\r\n<p>An <strong>ANOVA<\/strong> is a way to \u201cpartition\u201d the variation in the data. In other words, it divides the total variation into two parts: the part that is explained by the regression model (SSRegression) and the part that remains unexplained (SSResiduals).<\/p>\r\n<p style=\"text-align: center;\">[latex]\\text{SSTotal} = \\text{SSRegression} + \\text{SSResiduals}[\/latex]<\/p>\r\n<\/section>\r\n<p>Previously, you learned that the coefficient of determination, [latex]R^2[\/latex], is interpreted as the percentage of variation in the response variable that can be explained by the linear relationship with an explanatory variable. This quantity can be expressed using the sums of squares. Note that [latex]R^2[\/latex] can be expressed as a percentage or as a proportion.<\/p>\r\n<p style=\"text-align: center;\">[latex]R^2 = \\dfrac{\\text{variation explained}}{\\text{total variation}} = \\dfrac{\\text{SSRegression}}{\\text{SSTotal}} = 1-\\dfrac{\\text{SSResiduals}}{\\text{SSTotal}}[\/latex]<\/p>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]3154[\/ohm2_question]<\/section>\r\n<p>Sums of squares can be organized in an ANOVA table. The following table provides the information necessary to calculate an F-statistic in the context of regression. Note that [latex]n=[\/latex] sample size and [latex]p=[\/latex]\u00a0number of predictors. In simple linear regression, [latex]p=1[\/latex].<\/p>\r\n<div style=\"text-align: left;\" align=\"center\">\r\n<table class=\" alignleft\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 84.9306px;\">Source<\/td>\r\n<td style=\"width: 103.594px;\">[latex]df[\/latex]<\/td>\r\n<td style=\"width: 195.052px;\">Sum sq ([latex]\\text{SS}[\/latex])<\/td>\r\n<td style=\"width: 203.472px;\">Mean sq ([latex]\\text{MS}[\/latex])<\/td>\r\n<td style=\"width: 251.042px;\">F value<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 84.9306px;\">Regression<\/td>\r\n<td style=\"width: 103.594px;\">[latex]p[\/latex]<\/td>\r\n<td style=\"width: 195.052px;\">[latex]\\text{SSRegression}[\/latex]<\/td>\r\n<td style=\"width: 203.472px;\">[latex]\\text{MSRegression} = \\dfrac{\\text{SSRegression}}{p}[\/latex]<\/td>\r\n<td style=\"width: 251.042px;\">[latex]F = \\dfrac{\\text{MSRegression}}{\\text{MSResiduals})}[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 84.9306px;\">Residuals<\/td>\r\n<td style=\"width: 103.594px;\">[latex]n-1-p[\/latex]<\/td>\r\n<td style=\"width: 195.052px;\">[latex]\\text{SSResiduals}[\/latex]<\/td>\r\n<td style=\"width: 203.472px;\">[latex]\\text{MSResiduals} = \\dfrac{\\text{SSResiduals}}{n-1-p}[\/latex]<\/td>\r\n<td style=\"width: 251.042px;\">\u00a0<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 84.9306px;\"><strong>Total<\/strong><\/td>\r\n<td style=\"width: 103.594px;\">[latex]n-1[\/latex]<\/td>\r\n<td style=\"width: 195.052px;\">[latex]\\text{SSTotal}[\/latex]<\/td>\r\n<td style=\"width: 203.472px;\">\u00a0<\/td>\r\n<td style=\"width: 251.042px;\">\u00a0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<section class=\"textbox interact\">In the statistical tool below, follow the following steps:\r\n\r\n<p style=\"padding-left: 40px; text-align: left;\"><strong>Step 1:<\/strong> Select the \"Organic Foods\" data set.<\/p>\r\n<p style=\"padding-left: 40px; text-align: left;\"><strong>Step 2:<\/strong>Select \u201cAverage income in zip code\u201d as the explanatory ([latex]x[\/latex]) variable and \u201cNumber of organic items offered\u201d as the response ([latex]y[\/latex]) variable.<\/p>\r\n<p style=\"padding-left: 40px; text-align: left;\"><strong>Step 3: <\/strong>Under \u201cRegression Options,\u201d click the box to show the ANOVA table.<\/p>\r\n<\/section>\r\n<p><iframe src=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" width=\"100%\" height=\"1050\" frameborder=\"no\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><br \/>\r\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/p>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]3155[\/ohm2_question]<\/section>\r\n<\/div>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Understand what is measured by SSRegression, SSResiduals, and SSTotal in a regression context&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4609,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;Calibri&quot;}\">Understand what is measured by SSRegression, SSResiduals, and SSTotal in a regression context<\/span><\/li>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Discuss the factors that affect the value of F-statistics in a regression context&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:4609,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;Calibri&quot;}\">Discuss the factors that affect the value of F-statistics in a regression context<\/span><\/li>\n<\/ul>\n<\/section>\n<section class=\"textbox keyTakeaway\">\n<h3>ANOVA for Regression<\/h3>\n<p>An <strong>ANOVA<\/strong> is a way to \u201cpartition\u201d the variation in the data. In other words, it divides the total variation into two parts: the part that is explained by the regression model (SSRegression) and the part that remains unexplained (SSResiduals).<\/p>\n<p style=\"text-align: center;\">[latex]\\text{SSTotal} = \\text{SSRegression} + \\text{SSResiduals}[\/latex]<\/p>\n<\/section>\n<p>Previously, you learned that the coefficient of determination, [latex]R^2[\/latex], is interpreted as the percentage of variation in the response variable that can be explained by the linear relationship with an explanatory variable. This quantity can be expressed using the sums of squares. Note that [latex]R^2[\/latex] can be expressed as a percentage or as a proportion.<\/p>\n<p style=\"text-align: center;\">[latex]R^2 = \\dfrac{\\text{variation explained}}{\\text{total variation}} = \\dfrac{\\text{SSRegression}}{\\text{SSTotal}} = 1-\\dfrac{\\text{SSResiduals}}{\\text{SSTotal}}[\/latex]<\/p>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm3154\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=3154&theme=lumen&iframe_resize_id=ohm3154&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<p>Sums of squares can be organized in an ANOVA table. The following table provides the information necessary to calculate an F-statistic in the context of regression. Note that [latex]n=[\/latex] sample size and [latex]p=[\/latex]\u00a0number of predictors. In simple linear regression, [latex]p=1[\/latex].<\/p>\n<div style=\"text-align: left; margin: auto;\">\n<table class=\"alignleft\">\n<tbody>\n<tr>\n<td style=\"width: 84.9306px;\">Source<\/td>\n<td style=\"width: 103.594px;\">[latex]df[\/latex]<\/td>\n<td style=\"width: 195.052px;\">Sum sq ([latex]\\text{SS}[\/latex])<\/td>\n<td style=\"width: 203.472px;\">Mean sq ([latex]\\text{MS}[\/latex])<\/td>\n<td style=\"width: 251.042px;\">F value<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 84.9306px;\">Regression<\/td>\n<td style=\"width: 103.594px;\">[latex]p[\/latex]<\/td>\n<td style=\"width: 195.052px;\">[latex]\\text{SSRegression}[\/latex]<\/td>\n<td style=\"width: 203.472px;\">[latex]\\text{MSRegression} = \\dfrac{\\text{SSRegression}}{p}[\/latex]<\/td>\n<td style=\"width: 251.042px;\">[latex]F = \\dfrac{\\text{MSRegression}}{\\text{MSResiduals})}[\/latex]<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 84.9306px;\">Residuals<\/td>\n<td style=\"width: 103.594px;\">[latex]n-1-p[\/latex]<\/td>\n<td style=\"width: 195.052px;\">[latex]\\text{SSResiduals}[\/latex]<\/td>\n<td style=\"width: 203.472px;\">[latex]\\text{MSResiduals} = \\dfrac{\\text{SSResiduals}}{n-1-p}[\/latex]<\/td>\n<td style=\"width: 251.042px;\">\u00a0<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 84.9306px;\"><strong>Total<\/strong><\/td>\n<td style=\"width: 103.594px;\">[latex]n-1[\/latex]<\/td>\n<td style=\"width: 195.052px;\">[latex]\\text{SSTotal}[\/latex]<\/td>\n<td style=\"width: 203.472px;\">\u00a0<\/td>\n<td style=\"width: 251.042px;\">\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section class=\"textbox interact\">In the statistical tool below, follow the following steps:<\/p>\n<p style=\"padding-left: 40px; text-align: left;\"><strong>Step 1:<\/strong> Select the &#8220;Organic Foods&#8221; data set.<\/p>\n<p style=\"padding-left: 40px; text-align: left;\"><strong>Step 2:<\/strong>Select \u201cAverage income in zip code\u201d as the explanatory ([latex]x[\/latex]) variable and \u201cNumber of organic items offered\u201d as the response ([latex]y[\/latex]) variable.<\/p>\n<p style=\"padding-left: 40px; text-align: left;\"><strong>Step 3: <\/strong>Under \u201cRegression Options,\u201d click the box to show the ANOVA table.<\/p>\n<\/section>\n<p><iframe loading=\"lazy\" src=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" width=\"100%\" height=\"1050\" frameborder=\"no\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><br \/>\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/linear_regression\/\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/p>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm3155\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=3155&theme=lumen&iframe_resize_id=ohm3155&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<\/div>\n","protected":false},"author":8,"menu_order":15,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":1438,"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\/1455"}],"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\/1455\/revisions"}],"predecessor-version":[{"id":5838,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1455\/revisions\/5838"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1438"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1455\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1455"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1455"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1455"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}