{"id":1306,"date":"2021-07-05T21:11:37","date_gmt":"2021-07-06T01:11:37","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=1306"},"modified":"2025-06-24T16:47:52","modified_gmt":"2025-06-24T20:47:52","slug":"13-8-inferences-for-the-parameters-in-slrm","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/13-8-inferences-for-the-parameters-in-slrm\/","title":{"raw":"13.8 Inferences for the Parameters in SLRM","rendered":"13.8 Inferences for the Parameters in SLRM"},"content":{"raw":"There are three population parameters in the simple regression model (SLRM): the population intercept [latex]\\beta_0 [\/latex], the population slope [latex]\\beta_1[\/latex] , and the standard deviation of the error [latex]\\sigma[\/latex]. The three population parameters can be estimated by the least-squares estimates:\r\n<ul>\r\n \t<li>[latex]b_0 = \\bar{y} - b_1 \\bar{x}[\/latex]\u00a0 estimates the population intercept [latex]\\beta_0 [\/latex];<\/li>\r\n \t<li>[latex]b_1 = \\frac{S_{xy}}{S_{xx}}[\/latex]\u00a0 estimates the population intercept [latex]\\beta_1[\/latex];<\/li>\r\n \t<li>the sample standard deviation of the residuals [latex]s_e = \\sqrt{\\frac{\\sum (e_i - \\bar{e})^2}{n-2}} = \\sqrt{\\frac{\\sum e_i^2}{n-2}} = \\sqrt{\\frac{SSE}{n-2}}[\/latex] estimates the standard deviation of the error term [latex]\\sigma[\/latex], where [latex]SSE = SST - SSR = SST - r^2 SST = S_{yy} - \\frac{S_{xy}^2}{S_{xx} S_{yy}} S_{yy} = S_{yy} - b_1 S_{xy}[\/latex].<\/li>\r\n<\/ul>\r\nWe are especially interested in testing whether the slope parameter [latex]\\beta_1[\/latex] differs from 0. If [latex]\\beta_1 = 0[\/latex], the predictor variable [latex]x[\/latex] provides no information about the conditional mean of [latex]Y[\/latex], and hence there is no point fitting a regression model. Inferences about [latex]\\beta_1[\/latex] are based on the distribution of the least-squares slope [latex]b_1[\/latex].\r\n<h1>13.8.1 Distribution of the Least-squares Slope <em>b<sub>1<\/sub><\/em><\/h1>\r\nIn the previous example, a least-squares regression line was developed to predict the price of used cars with their ages; using a sample of 15 used cars, the fitted line had a slope of [latex]b_1 = -0.9432[\/latex]. Does [latex]b_1 = -0.9432[\/latex] provide evidence of a linear association between the price and age of all used cars? In order to answer this question, we need a better understanding of the distribution of [latex]b_1[\/latex]. Suppose, for example, that we repeat this experiment 1000 times by obtaining 1000 samples of 15 used cars, fitting 1000 regression lines, and as such, getting 1000 different values of [latex]b_1[\/latex], each of which is a point estimate of the population slope [latex]\\beta_1[\/latex]. The distribution of these 1000 values of [latex]b_1[\/latex], therefore, provides an estimate of the true distribution of all such [latex]b_1[\/latex]. The following histogram illustrates the distribution of 1000 values of [latex]b_1[\/latex].<a id=\"retfig13.12\"><\/a>\r\n<table class=\"no-border\" style=\"width: 100%; height: 395px;\" cellspacing=\"0\" cellpadding=\"4\">\r\n<tbody>\r\n<tr style=\"height: 395px;\">\r\n<td style=\"width: 260px; height: 395px;\" valign=\"middle\">\r\n<div align=\"center\">[caption id=\"attachment_2942\" align=\"aligncenter\" width=\"300\"]<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist.png\"><img class=\"wp-image-2942 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-300x300.png\" alt=\"A histogram of the slope of b sub 1. The shape is close to normal. Image description available.\" width=\"300\" height=\"300\" \/><\/a> <strong>Figure 13.12<\/strong>: Distribution of the Least-Squares Slope b1. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig13.12\">Image Description (See Appendix D Figure 13.12)<\/a>] Click on the image to enlarge it.[\/caption]<\/div><\/td>\r\n<td style=\"width: 430px; height: 395px;\" valign=\"top\">It can be shown that the distribution of [latex]b_1[\/latex] is normal with\r\n<ul>\r\n \t<li>Mean: [latex]\\mu_{b_1} = \\beta_1[\/latex].<\/li>\r\n \t<li>Standard deviation: [latex]\\sigma_{b_1} = \\frac{\\sigma}{\\sqrt{S_{xx}}}[\/latex].<\/li>\r\n<\/ul>\r\nThat is [latex]b_1 \\sim N(\\beta_1, \\frac{\\sigma}{\\sqrt{S_{xx}}})[\/latex]. Thus, we can standardize\u00a0 [latex]b_1[\/latex] in order to obtain: \u00a0[latex]\\frac{b_1 - \\beta_1}{\\frac{\\sigma}{\\sqrt{S_{xx}}}} \\sim N(0, 1)[\/latex].\r\n\r\nWhen the standard deviation of the error term [latex]\\sigma[\/latex] is unknown, it can be estimated by the standard deviation of the residuals [latex]s_e[\/latex]. This leads to the studentized variable\r\n\r\n[latex]\\frac{b_1 - \\beta_1}{\\frac{s_e}{\\sqrt{S_{xx}}}} \\sim t \\text{ distribution with } df = n-2[\/latex].<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nHence, inferences about the slope parameter [latex]\\beta_1[\/latex] are based on a [latex]t[\/latex] distribution with degrees of freedom [latex]n-2[\/latex]. Note that we lose two degrees of freedom in finding [latex]b_0 [\/latex] and [latex]b_1[\/latex].\r\n<h1>13.8.2<em> t<\/em> Test and <em>t<\/em>\u00a0Interval for the Slope Parameter <em><strong>\u03b2<\/strong><\/em><strong><sub>1<\/sub><\/strong><\/h1>\r\n<div class=\"textbox\">\r\n\r\n<strong>Assumptions:<\/strong>\r\n<ol>\r\n \t<li>The response variable (or the error term) is normally distributed.<\/li>\r\n \t<li>The standard deviation of the response variable (or error term) is the same for all values of the predictor variable.<\/li>\r\n \t<li>The observations are independent.<\/li>\r\n \t<li>The data come from a simple random sample.<\/li>\r\n<\/ol>\r\n<strong>Steps to perform a <\/strong><strong>\u00a0test on the slope parameter [latex]\\beta_1[\/latex]:<\/strong>\r\n<ol>\r\n \t<li>Set up the hypotheses:\r\n<div align=\"center\">\r\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"text-align: center;\" valign=\"top\" bgcolor=\"#F3F0F0\" width=\"198\">\r\n<div align=\"center\">The predictor is <strong>useful<\/strong><\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" bgcolor=\"#F3F0F0\" width=\"236\">\r\n<div align=\"center\"><strong>\u00a0positive<\/strong> association<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" bgcolor=\"#F3F0F0\" width=\"233\">\r\n<div align=\"center\"><strong>negative<\/strong> association<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"198\">\r\n<div align=\"center\">[latex]H_0: \\beta_1 = 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"236\">\r\n<div align=\"center\">[latex]H_0: \\beta_1 \\leq 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"233\">\r\n<div align=\"center\">[latex]H_0: \\beta_1 \\geq 0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"198\">\r\n<div align=\"center\">[latex]H_a: \\beta_1 \\neq 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"236\">\r\n<div align=\"center\">[latex]H_a: \\beta_1 &gt; 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\" width=\"233\">\r\n<div align=\"center\">[latex]H_a: \\beta_1 &lt; 0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div><\/li>\r\n \t<li>State the significance level <em>[latex]\\alpha[\/latex].<\/em><\/li>\r\n \t<li>Compute the test statistic: [latex]t_o = \\frac{b_1}{\\frac{s_e}{\\sqrt{S_{xx}}}}[\/latex] \u00a0with degree of freedom [latex]df = n-2[\/latex].<\/li>\r\n \t<li>Find the P-value <strong>or<\/strong> rejection region\r\n<div align=\"center\">\r\n<table class=\"first-col-border\" style=\"width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td><\/td>\r\n<th style=\"text-align: center;\" scope=\"col\">\r\n<div align=\"center\">The predictor is useful<\/div><\/th>\r\n<th style=\"text-align: center;\" scope=\"col\">\r\n<div align=\"center\">positive association<\/div><\/th>\r\n<th style=\"text-align: center;\" scope=\"col\">\r\n<div align=\"center\">negative association<\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\">Null<\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\beta_1 = 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\beta_1 \\leq 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\beta_1 \\geq 0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\">Alternative<\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\beta_1 \\neq 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\beta_1 &gt; 0[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\beta_1 &lt; 0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\">P-value<\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]2P(t \\geq |t_o|)[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]P(t \\geq t_o)[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]P(t \\leq t_o)[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th scope=\"row\" valign=\"top\">Rejection region<\/th>\r\n<td style=\"text-align: center;\" valign=\"top\">\u00a0[latex]t \\geq t_{\\alpha \/2}[\/latex] or [latex]t \\leq - t_{\\alpha \/2}[\/latex]<\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]t \\geq t_{\\alpha}[\/latex]<\/div><\/td>\r\n<td style=\"text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]t \\leq - t_{\\alpha}[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div><\/li>\r\n \t<li>Reject the null [latex]H_0[\/latex]\u00a0if P-value\u00a0[latex]\\leq \\alpha[\/latex] or [latex]t_o[\/latex]\u00a0falls in the rejection region.<\/li>\r\n \t<li>Conclusion.<\/li>\r\n<\/ol>\r\nThe [latex](1 - \\alpha) \\times 100\\%[\/latex] [latex]t[\/latex] confidence interval for [latex]\\beta_1[\/latex] \u00a0corresponding to the [latex]t[\/latex] test:\r\n<div align=\"center\">\r\n<table class=\"first-col-border\" style=\"width: 90%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<td style=\"width: 9.12631%; height: 15px;\"><\/td>\r\n<th style=\"width: 35.3597%; text-align: center; height: 15px;\" scope=\"col\">The predictor is useful<\/th>\r\n<th style=\"width: 26.5195%; text-align: center; height: 15px;\" scope=\"col\">positive association<\/th>\r\n<th style=\"width: 24.7547%; text-align: center; height: 15px;\" scope=\"col\">negative association<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"width: 9.12631%; height: 15px;\" scope=\"row\" valign=\"top\" width=\"140\">Null<\/th>\r\n<td style=\"width: 35.3597%; text-align: center; height: 15px;\" valign=\"top\" width=\"268\">[latex]H_0: \\beta_1 = 0[\/latex]<\/td>\r\n<td style=\"width: 26.5195%; text-align: center; height: 15px;\" valign=\"top\" width=\"155\">[latex]H_0: \\beta_1 \\leq 0[\/latex]<\/td>\r\n<td style=\"width: 24.7547%; text-align: center; height: 15px;\" valign=\"top\" width=\"175\">[latex]H_0: \\beta_1 \\geq 0[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 30px;\">\r\n<th style=\"width: 9.12631%; height: 30px;\" scope=\"row\" valign=\"top\" width=\"140\">Alternative<\/th>\r\n<td style=\"width: 35.3597%; text-align: center; height: 30px;\" valign=\"top\" width=\"268\">[latex]H_a: \\beta_1 \\neq 0[\/latex]<\/td>\r\n<td style=\"width: 26.5195%; text-align: center; height: 30px;\" valign=\"top\" width=\"155\">[latex]H_a: \\beta_1 &gt; 0[\/latex]<\/td>\r\n<td style=\"width: 24.7547%; text-align: center; height: 30px;\" valign=\"top\" width=\"175\">[latex]H_a: \\beta_1 &lt; 0[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 45px;\">\r\n<th style=\"width: 9.12631%; height: 45px;\" scope=\"row\" valign=\"top\" width=\"140\">\u00a0CI<\/th>\r\n<td style=\"width: 35.3597%; text-align: center; height: 45px;\" valign=\"top\" width=\"268\">[latex]\\left( b_1 - t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}}, b_1 + t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}} \\right)[\/latex]<\/td>\r\n<td style=\"width: 26.5195%; text-align: center; height: 45px;\" valign=\"top\" width=\"155\">[latex](b_1 - t_{\\alpha} \\frac{s_e}{\\sqrt{S_{xx}}}, \\infty )[\/latex]<\/td>\r\n<td style=\"width: 24.7547%; text-align: center; height: 45px;\" valign=\"top\" width=\"175\">[latex]( - \\infty , b_1 + t_{\\alpha} \\frac{s_e}{\\sqrt{S_{xx}}} )[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"width: 9.12631%; height: 15px;\" scope=\"row\" valign=\"top\" width=\"140\">Decision<\/th>\r\n<td style=\"width: 86.6339%; height: 15px;\" colspan=\"3\" valign=\"top\" width=\"599\">Reject [latex]H_0[\/latex]\u00a0if the interval does not contain 0.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: t-Test and t Interval for the Slope Parameter [latex]\\color{white}{\\beta_1}[\/latex]<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nRecall the\u00a0used car example. We have the summaries\r\n<p align=\"center\">[latex]n = 15, \\sum x_i = 92, \\sum x_i^2 = 724, \\sum y_i = 125, \\sum y_i^2 = 1193, \\sum x_i y_i = 616[\/latex].<\/p>\r\nWe can calculate:\r\n<p align=\"center\">[latex]\\begin{align*}S_{xy} &amp;= \\sum x_i y_i - \\frac{\\left( \\sum x_i \\right) \\left( \\sum y_i \\right) }{n} = 616 - \\frac{92 \\times 125}{15} = -150.667,\\\\S_{xx} &amp;= \\sum x_i^2 - \\frac{ \\left( \\sum x_i\\right)^2 }{n} = 724 - \\frac{92^2}{15} = 159.733,\\\\S_{yy} &amp;= \\sum y_i^2 - \\frac{ \\left( \\sum y_i\r\n\\right)^2 }{n} = 1193 - \\frac{125^2}{15} = 151.333.\\end{align*}[\/latex]<\/p>\r\n<p align=\"center\">[latex]\\begin{align*}b_1 &amp;= \\frac{S_{xy}}{S_{xx}} = \\frac{-150.667}{159.733} = -0.9432; \\\\b_0&amp;=\\bar y-b_1\\bar x=\\frac{\\sum y_i}{n}-b_1 \\frac{\\sum x_i}{n}=\\frac{125}{15}-(-0.9432) \\frac{92}{15}=14.118.\\end{align*}[\/latex]<\/p>\r\nAnd the least-square straight line is [latex]\\widehat{\\text{price}} = 14.118 - 0.9432 \\times \\text{age}[\/latex].\r\n<ol type=\"a\">\r\n \t<li><strong>Test at the\u00a05% significance level whether age is a useful predictor for the price of a used car.<\/strong>\r\nSteps:\r\n<ol>\r\n \t<li>Set up the hypotheses. [latex]H_0: \\beta_1 = 0[\/latex] versus [latex]H_a: \\beta_1 \\neq 0[\/latex].<\/li>\r\n \t<li>The significance level is [latex]\\alpha = 0.05[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic: [latex]t_o = \\frac{b_1}{\\frac{s_e}{\\sqrt{S_{xx}}}}[\/latex] \u00a0with [latex]df = n -2.[\/latex] First, [latex]SSE = S_{yy} - b_1 S_{xy} = 151.333 - (-0.9432) \\times (-150.667) = 9.224[\/latex] so that [latex]s_e = \\sqrt{\\frac{SSE}{n-2}} = \\sqrt{\\frac{9.224}{13}} = 0.842[\/latex]. Therefore,\r\n<p align=\"center\">[latex]t_o = \\frac{b_1}{\\frac{s_e}{\\sqrt{S_{xx}}}} = \\frac{-0.9432}{\\left( \\frac{0.842}{\\sqrt{159.733}} \\right)} = -14.158, df = n-2 = 15-2 = 13[\/latex].<\/p>\r\n<\/li>\r\n \t<li>Find the P-value. For a two-tailed test with [latex]df=13[\/latex],\r\nP-value [latex]=2P(t \\geq |t_o|) = 2P(t \\geq 14.158) &lt; 2 \\times 0.0005 = 0.001[\/latex], since [latex]t_{0.0005} = 4.221.[\/latex]<\/li>\r\n \t<li>Decision: Reject the null [latex]H_0[\/latex] since P-value [latex]&lt; 0.001 &lt; 0.05 (\\alpha).[\/latex]<\/li>\r\n \t<li>Conclusion. At the 5% significance level, we have sufficient evidence that age is a <strong>useful predictor<\/strong> of the price of a used car.<\/li>\r\n<\/ol>\r\n<\/li>\r\n \t<li><strong>Obtain a [latex]t[\/latex]\u00a0confidence interval for the slope parameter [latex]\\beta_1[\/latex]\u00a0corresponding to the test in part (a)<\/strong>.\r\nA\u00a095% two-tailed interval corresponds to\u00a0a two-tailed test at the\u00a05% significance level.\u00a0Therefore,\u00a0since\r\n<p align=\"center\">[latex]df = 13, \\alpha = 0.05 [\/latex], and [latex]t_{\\alpha \/ 2} = t_{0.025} = 2.160[\/latex]<\/p>\r\nIt follows that a\u00a095% confidence interval for [latex]\\beta_1[\/latex] is:\r\n<p style=\"text-align: center;\">[latex]b_1 \\pm t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}} = (-0.9432) \\pm 2.160 \\times \\frac{0.842}{\\sqrt{159.733}} = (-1.087, -0.799)[\/latex].<\/p>\r\n<\/li>\r\n \t<li><strong>Interpret the interval.<\/strong> <strong>Does it support the conclusions of the hypothesis test in part (a)?<\/strong>\r\nWe are 95% confident that [latex]\\beta_1[\/latex] is somewhere between -1.087 and -0.799 ($1000 per year). Hence, we estimate that the <strong>mean price<\/strong> of used cars drops from $799 to $1087 when they get one year older.\r\nYes, it supports the conclusions of the hypothesis test in part (a). The interval does not contain 0; which implies [latex]\\beta_1 \\neq 0[\/latex] with 95% confidence. Therefore, the interval suggests age is a useful predictor for the price of used cars, which is the conclusion of the test in part (a).<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>","rendered":"<p>There are three population parameters in the simple regression model (SLRM): the population intercept [latex]\\beta_0[\/latex], the population slope [latex]\\beta_1[\/latex] , and the standard deviation of the error [latex]\\sigma[\/latex]. The three population parameters can be estimated by the least-squares estimates:<\/p>\n<ul>\n<li>[latex]b_0 = \\bar{y} - b_1 \\bar{x}[\/latex]\u00a0 estimates the population intercept [latex]\\beta_0[\/latex];<\/li>\n<li>[latex]b_1 = \\frac{S_{xy}}{S_{xx}}[\/latex]\u00a0 estimates the population intercept [latex]\\beta_1[\/latex];<\/li>\n<li>the sample standard deviation of the residuals [latex]s_e = \\sqrt{\\frac{\\sum (e_i - \\bar{e})^2}{n-2}} = \\sqrt{\\frac{\\sum e_i^2}{n-2}} = \\sqrt{\\frac{SSE}{n-2}}[\/latex] estimates the standard deviation of the error term [latex]\\sigma[\/latex], where [latex]SSE = SST - SSR = SST - r^2 SST = S_{yy} - \\frac{S_{xy}^2}{S_{xx} S_{yy}} S_{yy} = S_{yy} - b_1 S_{xy}[\/latex].<\/li>\n<\/ul>\n<p>We are especially interested in testing whether the slope parameter [latex]\\beta_1[\/latex] differs from 0. If [latex]\\beta_1 = 0[\/latex], the predictor variable [latex]x[\/latex] provides no information about the conditional mean of [latex]Y[\/latex], and hence there is no point fitting a regression model. Inferences about [latex]\\beta_1[\/latex] are based on the distribution of the least-squares slope [latex]b_1[\/latex].<\/p>\n<h1>13.8.1 Distribution of the Least-squares Slope <em>b<sub>1<\/sub><\/em><\/h1>\n<p>In the previous example, a least-squares regression line was developed to predict the price of used cars with their ages; using a sample of 15 used cars, the fitted line had a slope of [latex]b_1 = -0.9432[\/latex]. Does [latex]b_1 = -0.9432[\/latex] provide evidence of a linear association between the price and age of all used cars? In order to answer this question, we need a better understanding of the distribution of [latex]b_1[\/latex]. Suppose, for example, that we repeat this experiment 1000 times by obtaining 1000 samples of 15 used cars, fitting 1000 regression lines, and as such, getting 1000 different values of [latex]b_1[\/latex], each of which is a point estimate of the population slope [latex]\\beta_1[\/latex]. The distribution of these 1000 values of [latex]b_1[\/latex], therefore, provides an estimate of the true distribution of all such [latex]b_1[\/latex]. The following histogram illustrates the distribution of 1000 values of [latex]b_1[\/latex].<a id=\"retfig13.12\"><\/a><\/p>\n<table class=\"no-border\" style=\"width: 100%; height: 395px; border-spacing: 0px;\" cellpadding=\"4\">\n<tbody>\n<tr style=\"height: 395px;\">\n<td style=\"width: 260px; height: 395px;\" valign=\"middle\">\n<div style=\"margin: auto;\">\n<figure id=\"attachment_2942\" aria-describedby=\"caption-attachment-2942\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2942 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-300x300.png\" alt=\"A histogram of the slope of b sub 1. The shape is close to normal. Image description available.\" width=\"300\" height=\"300\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-300x300.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-150x150.png 150w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-65x65.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-225x225.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist-350x350.png 350w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/07\/regression_b1_dist.png 600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-2942\" class=\"wp-caption-text\"><strong>Figure 13.12<\/strong>: Distribution of the Least-Squares Slope b1. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig13.12\">Image Description (See Appendix D Figure 13.12)<\/a>] Click on the image to enlarge it.<\/figcaption><\/figure>\n<\/div>\n<\/td>\n<td style=\"width: 430px; height: 395px;\" valign=\"top\">It can be shown that the distribution of [latex]b_1[\/latex] is normal with<\/p>\n<ul>\n<li>Mean: [latex]\\mu_{b_1} = \\beta_1[\/latex].<\/li>\n<li>Standard deviation: [latex]\\sigma_{b_1} = \\frac{\\sigma}{\\sqrt{S_{xx}}}[\/latex].<\/li>\n<\/ul>\n<p>That is [latex]b_1 \\sim N(\\beta_1, \\frac{\\sigma}{\\sqrt{S_{xx}}})[\/latex]. Thus, we can standardize\u00a0 [latex]b_1[\/latex] in order to obtain: \u00a0[latex]\\frac{b_1 - \\beta_1}{\\frac{\\sigma}{\\sqrt{S_{xx}}}} \\sim N(0, 1)[\/latex].<\/p>\n<p>When the standard deviation of the error term [latex]\\sigma[\/latex] is unknown, it can be estimated by the standard deviation of the residuals [latex]s_e[\/latex]. This leads to the studentized variable<\/p>\n<p>[latex]\\frac{b_1 - \\beta_1}{\\frac{s_e}{\\sqrt{S_{xx}}}} \\sim t \\text{ distribution with } df = n-2[\/latex].<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Hence, inferences about the slope parameter [latex]\\beta_1[\/latex] are based on a [latex]t[\/latex] distribution with degrees of freedom [latex]n-2[\/latex]. Note that we lose two degrees of freedom in finding [latex]b_0[\/latex] and [latex]b_1[\/latex].<\/p>\n<h1>13.8.2<em> t<\/em> Test and <em>t<\/em>\u00a0Interval for the Slope Parameter <em><strong>\u03b2<\/strong><\/em><strong><sub>1<\/sub><\/strong><\/h1>\n<div class=\"textbox\">\n<p><strong>Assumptions:<\/strong><\/p>\n<ol>\n<li>The response variable (or the error term) is normally distributed.<\/li>\n<li>The standard deviation of the response variable (or error term) is the same for all values of the predictor variable.<\/li>\n<li>The observations are independent.<\/li>\n<li>The data come from a simple random sample.<\/li>\n<\/ol>\n<p><strong>Steps to perform a <\/strong><strong>\u00a0test on the slope parameter [latex]\\beta_1[\/latex]:<\/strong><\/p>\n<ol>\n<li>Set up the hypotheses:\n<div style=\"margin: auto;\">\n<table cellpadding=\"0\" style=\"border-spacing: 0px;\">\n<tbody>\n<tr>\n<td style=\"text-align: center; background-color: #F3F0F0; width: 198px;\" valign=\"top\">\n<div style=\"margin: auto;\">The predictor is <strong>useful<\/strong><\/div>\n<\/td>\n<td style=\"text-align: center; background-color: #F3F0F0; width: 236px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>\u00a0positive<\/strong> association<\/div>\n<\/td>\n<td style=\"text-align: center; background-color: #F3F0F0; width: 233px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>negative<\/strong> association<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center; width: 198px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\beta_1 = 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center; width: 236px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\beta_1 \\leq 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center; width: 233px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\beta_1 \\geq 0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center; width: 198px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\beta_1 \\neq 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center; width: 236px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\beta_1 > 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center; width: 233px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\beta_1 < 0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<li>State the significance level <em>[latex]\\alpha[\/latex].<\/em><\/li>\n<li>Compute the test statistic: [latex]t_o = \\frac{b_1}{\\frac{s_e}{\\sqrt{S_{xx}}}}[\/latex] \u00a0with degree of freedom [latex]df = n-2[\/latex].<\/li>\n<li>Find the P-value <strong>or<\/strong> rejection region\n<div style=\"margin: auto;\">\n<table class=\"first-col-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"border-bottom\">\n<td><\/td>\n<th style=\"text-align: center;\" scope=\"col\">\n<div style=\"margin: auto;\">The predictor is useful<\/div>\n<\/th>\n<th style=\"text-align: center;\" scope=\"col\">\n<div style=\"margin: auto;\">positive association<\/div>\n<\/th>\n<th style=\"text-align: center;\" scope=\"col\">\n<div style=\"margin: auto;\">negative association<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th scope=\"row\" valign=\"top\">Null<\/th>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\beta_1 = 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\beta_1 \\leq 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\beta_1 \\geq 0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\">Alternative<\/th>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\beta_1 \\neq 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\beta_1 > 0[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\beta_1 < 0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\">P-value<\/th>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]2P(t \\geq |t_o|)[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]P(t \\geq t_o)[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]P(t \\leq t_o)[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th scope=\"row\" valign=\"top\">Rejection region<\/th>\n<td style=\"text-align: center;\" valign=\"top\">\u00a0[latex]t \\geq t_{\\alpha \/2}[\/latex] or [latex]t \\leq - t_{\\alpha \/2}[\/latex]<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]t \\geq t_{\\alpha}[\/latex]<\/div>\n<\/td>\n<td style=\"text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]t \\leq - t_{\\alpha}[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<li>Reject the null [latex]H_0[\/latex]\u00a0if P-value\u00a0[latex]\\leq \\alpha[\/latex] or [latex]t_o[\/latex]\u00a0falls in the rejection region.<\/li>\n<li>Conclusion.<\/li>\n<\/ol>\n<p>The [latex](1 - \\alpha) \\times 100\\%[\/latex] [latex]t[\/latex] confidence interval for [latex]\\beta_1[\/latex] \u00a0corresponding to the [latex]t[\/latex] test:<\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border\" style=\"width: 90%; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<td style=\"width: 9.12631%; height: 15px;\"><\/td>\n<th style=\"width: 35.3597%; text-align: center; height: 15px;\" scope=\"col\">The predictor is useful<\/th>\n<th style=\"width: 26.5195%; text-align: center; height: 15px;\" scope=\"col\">positive association<\/th>\n<th style=\"width: 24.7547%; text-align: center; height: 15px;\" scope=\"col\">negative association<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<th style=\"width: 9.12631%; height: 15px; width: 140px;\" scope=\"row\" valign=\"top\">Null<\/th>\n<td style=\"width: 35.3597%; text-align: center; height: 15px; width: 268px;\" valign=\"top\">[latex]H_0: \\beta_1 = 0[\/latex]<\/td>\n<td style=\"width: 26.5195%; text-align: center; height: 15px; width: 155px;\" valign=\"top\">[latex]H_0: \\beta_1 \\leq 0[\/latex]<\/td>\n<td style=\"width: 24.7547%; text-align: center; height: 15px; width: 175px;\" valign=\"top\">[latex]H_0: \\beta_1 \\geq 0[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 30px;\">\n<th style=\"width: 9.12631%; height: 30px; width: 140px;\" scope=\"row\" valign=\"top\">Alternative<\/th>\n<td style=\"width: 35.3597%; text-align: center; height: 30px; width: 268px;\" valign=\"top\">[latex]H_a: \\beta_1 \\neq 0[\/latex]<\/td>\n<td style=\"width: 26.5195%; text-align: center; height: 30px; width: 155px;\" valign=\"top\">[latex]H_a: \\beta_1 > 0[\/latex]<\/td>\n<td style=\"width: 24.7547%; text-align: center; height: 30px; width: 175px;\" valign=\"top\">[latex]H_a: \\beta_1 < 0[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 45px;\">\n<th style=\"width: 9.12631%; height: 45px; width: 140px;\" scope=\"row\" valign=\"top\">\u00a0CI<\/th>\n<td style=\"width: 35.3597%; text-align: center; height: 45px; width: 268px;\" valign=\"top\">[latex]\\left( b_1 - t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}}, b_1 + t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}} \\right)[\/latex]<\/td>\n<td style=\"width: 26.5195%; text-align: center; height: 45px; width: 155px;\" valign=\"top\">[latex](b_1 - t_{\\alpha} \\frac{s_e}{\\sqrt{S_{xx}}}, \\infty )[\/latex]<\/td>\n<td style=\"width: 24.7547%; text-align: center; height: 45px; width: 175px;\" valign=\"top\">[latex]( - \\infty , b_1 + t_{\\alpha} \\frac{s_e}{\\sqrt{S_{xx}}} )[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<th style=\"width: 9.12631%; height: 15px; width: 140px;\" scope=\"row\" valign=\"top\">Decision<\/th>\n<td style=\"width: 86.6339%; height: 15px; width: 599px;\" colspan=\"3\" valign=\"top\">Reject [latex]H_0[\/latex]\u00a0if the interval does not contain 0.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: t-Test and t Interval for the Slope Parameter [latex]\\color{white}{\\beta_1}[\/latex]<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Recall the\u00a0used car example. We have the summaries<\/p>\n<p style=\"text-align: center;\">[latex]n = 15, \\sum x_i = 92, \\sum x_i^2 = 724, \\sum y_i = 125, \\sum y_i^2 = 1193, \\sum x_i y_i = 616[\/latex].<\/p>\n<p>We can calculate:<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align*}S_{xy} &= \\sum x_i y_i - \\frac{\\left( \\sum x_i \\right) \\left( \\sum y_i \\right) }{n} = 616 - \\frac{92 \\times 125}{15} = -150.667,\\\\S_{xx} &= \\sum x_i^2 - \\frac{ \\left( \\sum x_i\\right)^2 }{n} = 724 - \\frac{92^2}{15} = 159.733,\\\\S_{yy} &= \\sum y_i^2 - \\frac{ \\left( \\sum y_i  \\right)^2 }{n} = 1193 - \\frac{125^2}{15} = 151.333.\\end{align*}[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align*}b_1 &= \\frac{S_{xy}}{S_{xx}} = \\frac{-150.667}{159.733} = -0.9432; \\\\b_0&=\\bar y-b_1\\bar x=\\frac{\\sum y_i}{n}-b_1 \\frac{\\sum x_i}{n}=\\frac{125}{15}-(-0.9432) \\frac{92}{15}=14.118.\\end{align*}[\/latex]<\/p>\n<p>And the least-square straight line is [latex]\\widehat{\\text{price}} = 14.118 - 0.9432 \\times \\text{age}[\/latex].<\/p>\n<ol type=\"a\">\n<li><strong>Test at the\u00a05% significance level whether age is a useful predictor for the price of a used car.<\/strong><br \/>\nSteps:<\/p>\n<ol>\n<li>Set up the hypotheses. [latex]H_0: \\beta_1 = 0[\/latex] versus [latex]H_a: \\beta_1 \\neq 0[\/latex].<\/li>\n<li>The significance level is [latex]\\alpha = 0.05[\/latex].<\/li>\n<li>Compute the value of the test statistic: [latex]t_o = \\frac{b_1}{\\frac{s_e}{\\sqrt{S_{xx}}}}[\/latex] \u00a0with [latex]df = n -2.[\/latex] First, [latex]SSE = S_{yy} - b_1 S_{xy} = 151.333 - (-0.9432) \\times (-150.667) = 9.224[\/latex] so that [latex]s_e = \\sqrt{\\frac{SSE}{n-2}} = \\sqrt{\\frac{9.224}{13}} = 0.842[\/latex]. Therefore,\n<p style=\"text-align: center;\">[latex]t_o = \\frac{b_1}{\\frac{s_e}{\\sqrt{S_{xx}}}} = \\frac{-0.9432}{\\left( \\frac{0.842}{\\sqrt{159.733}} \\right)} = -14.158, df = n-2 = 15-2 = 13[\/latex].<\/p>\n<\/li>\n<li>Find the P-value. For a two-tailed test with [latex]df=13[\/latex],<br \/>\nP-value [latex]=2P(t \\geq |t_o|) = 2P(t \\geq 14.158) < 2 \\times 0.0005 = 0.001[\/latex], since [latex]t_{0.0005} = 4.221.[\/latex]<\/li>\n<li>Decision: Reject the null [latex]H_0[\/latex] since P-value [latex]< 0.001 < 0.05 (\\alpha).[\/latex]<\/li>\n<li>Conclusion. At the 5% significance level, we have sufficient evidence that age is a <strong>useful predictor<\/strong> of the price of a used car.<\/li>\n<\/ol>\n<\/li>\n<li><strong>Obtain a [latex]t[\/latex]\u00a0confidence interval for the slope parameter [latex]\\beta_1[\/latex]\u00a0corresponding to the test in part (a)<\/strong>.<br \/>\nA\u00a095% two-tailed interval corresponds to\u00a0a two-tailed test at the\u00a05% significance level.\u00a0Therefore,\u00a0since<\/p>\n<p style=\"text-align: center;\">[latex]df = 13, \\alpha = 0.05[\/latex], and [latex]t_{\\alpha \/ 2} = t_{0.025} = 2.160[\/latex]<\/p>\n<p>It follows that a\u00a095% confidence interval for [latex]\\beta_1[\/latex] is:<\/p>\n<p style=\"text-align: center;\">[latex]b_1 \\pm t_{\\alpha \/ 2} \\frac{s_e}{\\sqrt{S_{xx}}} = (-0.9432) \\pm 2.160 \\times \\frac{0.842}{\\sqrt{159.733}} = (-1.087, -0.799)[\/latex].<\/p>\n<\/li>\n<li><strong>Interpret the interval.<\/strong> <strong>Does it support the conclusions of the hypothesis test in part (a)?<\/strong><br \/>\nWe are 95% confident that [latex]\\beta_1[\/latex] is somewhere between -1.087 and -0.799 ($1000 per year). Hence, we estimate that the <strong>mean price<\/strong> of used cars drops from $799 to $1087 when they get one year older.<br \/>\nYes, it supports the conclusions of the hypothesis test in part (a). The interval does not contain 0; which implies [latex]\\beta_1 \\neq 0[\/latex] with 95% confidence. Therefore, the interval suggests age is a useful predictor for the price of used cars, which is the conclusion of the test in part (a).<\/li>\n<\/ol>\n<\/div>\n<\/div>\n","protected":false},"author":19,"menu_order":8,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1306","chapter","type-chapter","status-publish","hentry"],"part":1246,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":86,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1306\/revisions"}],"predecessor-version":[{"id":5600,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1306\/revisions\/5600"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/1246"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1306\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=1306"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=1306"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=1306"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=1306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}