{"id":1491,"date":"2023-06-22T02:36:55","date_gmt":"2023-06-22T02:36:55","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/indicator-variable-apply-it-1\/"},"modified":"2025-05-17T02:45:30","modified_gmt":"2025-05-17T02:45:30","slug":"indicator-variable-apply-it-1","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/indicator-variable-apply-it-1\/","title":{"raw":"Indicator Variable - Apply It 1","rendered":"Indicator Variable &#8211; Apply 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;Define what an indicator variable is&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;}\">Know what an indicator variable is<\/span><\/li>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Find and describe an appropriate multiple linear regression model equation with categorical predictors&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;}\">Find and describe an appropriate multiple linear regression model equation with categorical predictors<\/span><\/li>\r\n<\/ul>\r\n<\/section>\r\n<p>Recall that the data set contains information about high school student achievement scores on math, science, reading, writing, and social studies tests. The data set contains information about [latex]200[\/latex] high school students and [latex]10[\/latex] variables for each student. Descriptions of the variables are as follows:<\/p>\r\n<div style=\"text-align: left;\" align=\"center\">\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>Variable name<\/strong><\/td>\r\n<td><strong>Definition<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>id<\/em><\/td>\r\n<td>Identification number of the student<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>female<\/em><\/td>\r\n<td>Gender of the student (0 = male, 1 = female)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>race<\/em><\/td>\r\n<td>Ethnic background of the student (1 = Hispanic, 2 = Asian, 3 = Black, 4 = White)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>ses<\/em><\/td>\r\n<td>Socio-economic status of the student (1 = low, 2 = medium, 3 = high)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>schtyp<\/em><\/td>\r\n<td>School type (1 = public, 2 = private)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>prog<\/em><\/td>\r\n<td>Program type (1 = general, 2 = academic preparatory, 3 = vocational\/technical)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>read<\/em><\/td>\r\n<td>Score from test of reading<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>write<\/em><\/td>\r\n<td>Score from test of writing<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>math<\/em><\/td>\r\n<td>Score from test of math<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>science<\/em><\/td>\r\n<td>Score from test of science<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><em>socst<\/em><\/td>\r\n<td>Score from test of social studies<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]3267[\/ohm2_question]<\/section>\r\n<section class=\"textbox recall\">Indicator variables can only have values of [latex]0[\/latex] or [latex]1[\/latex]. So, if the categorical variable has more than two categories, additional indicator variables will be needed.<\/section>\r\n<section class=\"textbox example\">\r\n<p class=\"para\">For the variable <i>prog<\/i>, we will need to create two indicator variables to add the explanatory variable into the model.<\/p>\r\n<p class=\"para\">One indicator variable for <i>prog<\/i> could be defined as <i>academic preparatory<\/i>, and the other indicator variable for <i>prog <\/i>could be defined as <i>vocational\/technical<\/i>.<\/p>\r\n<p class=\"para\">These two indicator variables would be defined using the following:<\/p>\r\n<ul>\r\n\t<li class=\"para\">If <i>prog<\/i> = academic preparatory, the indicator variable for <i>academic_preparatory<\/i> = [latex]1[\/latex]. Otherwise, if <i>prog<\/i> = vocation\/technical or general, the indicator variable for <i>academic_preparatory<\/i> = [latex]0[\/latex].<\/li>\r\n\t<li class=\"para\">If <i>prog<\/i> = vocational\/technical, the indicator variable for <i>vocational_technical<\/i> = [latex]1[\/latex]. Otherwise, if <i>prog<\/i> = academic preparatory or general, the indicator variable for <i>vocational_technical<\/i> = [latex]0[\/latex].<\/li>\r\n<\/ul>\r\n<p class=\"para\">We do not need three indicator variables because <i>prog<\/i> = general is captured when <i>academic_preparatory<\/i> = 0 and <i>vocational_technical<\/i> = 0.<\/p>\r\n<\/section>\r\n<section class=\"textbox proTip\">In general, we will need [latex]k-1[\/latex] indicator variables for a categorical variable with [latex]k[\/latex] categories.<\/section>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]3268[\/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;Define what an indicator variable is&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;}\">Know what an indicator variable is<\/span><\/li>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Find and describe an appropriate multiple linear regression model equation with categorical predictors&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;}\">Find and describe an appropriate multiple linear regression model equation with categorical predictors<\/span><\/li>\n<\/ul>\n<\/section>\n<p>Recall that the data set contains information about high school student achievement scores on math, science, reading, writing, and social studies tests. The data set contains information about [latex]200[\/latex] high school students and [latex]10[\/latex] variables for each student. Descriptions of the variables are as follows:<\/p>\n<div style=\"text-align: left; margin: auto;\">\n<table>\n<tbody>\n<tr>\n<td><strong>Variable name<\/strong><\/td>\n<td><strong>Definition<\/strong><\/td>\n<\/tr>\n<tr>\n<td><em>id<\/em><\/td>\n<td>Identification number of the student<\/td>\n<\/tr>\n<tr>\n<td><em>female<\/em><\/td>\n<td>Gender of the student (0 = male, 1 = female)<\/td>\n<\/tr>\n<tr>\n<td><em>race<\/em><\/td>\n<td>Ethnic background of the student (1 = Hispanic, 2 = Asian, 3 = Black, 4 = White)<\/td>\n<\/tr>\n<tr>\n<td><em>ses<\/em><\/td>\n<td>Socio-economic status of the student (1 = low, 2 = medium, 3 = high)<\/td>\n<\/tr>\n<tr>\n<td><em>schtyp<\/em><\/td>\n<td>School type (1 = public, 2 = private)<\/td>\n<\/tr>\n<tr>\n<td><em>prog<\/em><\/td>\n<td>Program type (1 = general, 2 = academic preparatory, 3 = vocational\/technical)<\/td>\n<\/tr>\n<tr>\n<td><em>read<\/em><\/td>\n<td>Score from test of reading<\/td>\n<\/tr>\n<tr>\n<td><em>write<\/em><\/td>\n<td>Score from test of writing<\/td>\n<\/tr>\n<tr>\n<td><em>math<\/em><\/td>\n<td>Score from test of math<\/td>\n<\/tr>\n<tr>\n<td><em>science<\/em><\/td>\n<td>Score from test of science<\/td>\n<\/tr>\n<tr>\n<td><em>socst<\/em><\/td>\n<td>Score from test of social studies<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm3267\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=3267&theme=lumen&iframe_resize_id=ohm3267&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<section class=\"textbox recall\">Indicator variables can only have values of [latex]0[\/latex] or [latex]1[\/latex]. So, if the categorical variable has more than two categories, additional indicator variables will be needed.<\/section>\n<section class=\"textbox example\">\n<p class=\"para\">For the variable <i>prog<\/i>, we will need to create two indicator variables to add the explanatory variable into the model.<\/p>\n<p class=\"para\">One indicator variable for <i>prog<\/i> could be defined as <i>academic preparatory<\/i>, and the other indicator variable for <i>prog <\/i>could be defined as <i>vocational\/technical<\/i>.<\/p>\n<p class=\"para\">These two indicator variables would be defined using the following:<\/p>\n<ul>\n<li class=\"para\">If <i>prog<\/i> = academic preparatory, the indicator variable for <i>academic_preparatory<\/i> = [latex]1[\/latex]. Otherwise, if <i>prog<\/i> = vocation\/technical or general, the indicator variable for <i>academic_preparatory<\/i> = [latex]0[\/latex].<\/li>\n<li class=\"para\">If <i>prog<\/i> = vocational\/technical, the indicator variable for <i>vocational_technical<\/i> = [latex]1[\/latex]. Otherwise, if <i>prog<\/i> = academic preparatory or general, the indicator variable for <i>vocational_technical<\/i> = [latex]0[\/latex].<\/li>\n<\/ul>\n<p class=\"para\">We do not need three indicator variables because <i>prog<\/i> = general is captured when <i>academic_preparatory<\/i> = 0 and <i>vocational_technical<\/i> = 0.<\/p>\n<\/section>\n<section class=\"textbox proTip\">In general, we will need [latex]k-1[\/latex] indicator variables for a categorical variable with [latex]k[\/latex] categories.<\/section>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm3268\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=3268&theme=lumen&iframe_resize_id=ohm3268&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<\/div>\n","protected":false},"author":8,"menu_order":18,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":1473,"module-header":"apply_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\/1491"}],"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":6,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1491\/revisions"}],"predecessor-version":[{"id":6912,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1491\/revisions\/6912"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1473"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1491\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1491"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1491"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1491"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}