{"id":3374,"date":"2015-04-12T00:17:15","date_gmt":"2015-04-12T05:17:15","guid":{"rendered":"http:\/\/www.ssc.wisc.edu\/~jfrees\/?page_id=3374"},"modified":"2015-08-17T14:41:59","modified_gmt":"2015-08-17T19:41:59","slug":"prediction-intervals","status":"publish","type":"page","link":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/regression\/basic-linear-regression\/2-5-statistical-inference\/prediction-intervals\/","title":{"rendered":"Prediction Intervals"},"content":{"rendered":"<p>In Section 2.1, we showed how to use least squares estimators to predict the lottery sales for a zip code, outside of our sample, having a population of 10,000. Because prediction is such an important task for actuaries, we formalize the procedure so that it can be used on a regular basis. <\/p>\n<p> To predict an additional observation, we assume that the level of explanatory variable is known and is denoted by \\(x_{\\ast}\\). For example, in our previous lottery sales example we used \\(x_{\\ast} = 10,000\\). We also assume that the additional observation follows the same linear regression model as the observations in the sample. <\/p>\n<p> Using our least square estimators, our point prediction is \\(\\widehat{y}_{\\ast} = b_0 + b_1 x_{\\ast}\\), the height of the fitted regression line at \\(x_{\\ast}\\) We may decompose the prediction error into two parts: <\/p>\n<p> \\begin{matrix}<br \/>\n \\begin{array}{ccccc} \\underbrace{y_{\\ast} &#8211; \\widehat{y}_{\\ast}} &#038; = &#038; \\underbrace{\\beta_0 &#8211; b_0 + \\left( \\beta_1 &#8211; b_1 \\right) x_{\\ast}} &#038; + &#038; \\underbrace{\\varepsilon_{\\ast}} \\\\ \\text{prediction error} &#038; {\\small =} &#038; \\text{error in estimating the } &#038; {\\small +} &#038; \\text{deviation of the additional } \\\\ &#038;  &#038; \\text{regression line at }x_{\\ast} &#038;  &#038; \\text{response from its mean}<br \/>\n\\end{array} \\end{matrix} <\/p>\n<p> It can be shown that the standard error of the prediction is \\begin{equation*} se(pred) = s \\sqrt{1+\\frac{1}{n}+\\frac{\\left( x_{\\ast}-\\overline{x}\\right) ^2}{(n-1)s_x^2}}. \\end{equation*} As with \\(se(b_1)\\), the terms \\(n^{-1}\\) and \\(\\left( x_{\\ast}-\\overline{x} \\right) ^2\/\\left[ (n-1)s_x^2\\right] \\) become close to zero as the sample size \\(n\\) becomes large. Thus, for large \\(n\\), we have that \\(se(pred)\\approx s\\), reflecting that the error in estimating the regression line at a point becomes negligible and deviation of the additional response from its mean becomes the entire source of uncertainty.<br \/>\n <div class=\"scbb-content-box scbb-content-box-gray\"><em>Definition<\/em>. A \\(100(1-\\alpha)\\)% prediction interval at \\(x_{\\ast}\\) is \\begin{equation}\\label{E2:predinteval} \\widehat{y}_{\\ast} \\pm t_{n-2,1-\\alpha \/2} ~se(pred) \\end{equation} where the \\(t\\)-value \\(t_{n-2,1-\\alpha \/2}\\) is the same as used for hypothesis testing and the confidence interval. <\/div> <\/p>\n<p>  For example, the point prediction at \\(x_{\\ast} = 10,000\\) is \\(\\widehat{y}_{\\ast}\\)= 469.7 + 0.647 (10000) = 6,939.7. The standard error of this prediction is \\begin{equation*} se(pred) = 3,792 \\sqrt{1+\\frac{1}{50} + \\frac{\\left( 10,000-9,311\\right)^2}{(50-1)(11,098)^2}} = 3,829.6. \\end{equation*} With a \\(t\\)-value equal to 2.011, this yields an approximate 95% prediction interval \\begin{equation*} 6,939.7 \\pm (2.011)(3,829.6) = 6,939.7 \\pm 7,701.3 = (-761.6, ~14,641.0). \\end{equation*} We interpret these results by first pointing out that our best estimate of lottery sales for a zip code with a population of 10,000 is $6,939.70. Our 95% prediction interval represents a range of reliability for this prediction. If we could see many zip codes, each with a population of 10,000, on average we expect about 19 out of 20, or 95%, would have lottery sales between 0 and $14,641. It is customary to truncate the lower bound of the prediction interval to zero if negative values of the response are deemed to be inappropriate.<br \/>\n<div class=\"scbb-content-box scbb-content-box-gray\">[WpProQuiz 13]<\/div><\/p>\n<p><div class=\"alignleft\"><a href=\"https:\/\/users.ssc.wisc.edu\/~ewfrees\/regression\/basic-linear-regression\/2-5-statistical-inference\/confidence-intervals\/\" title=\"Confidence Intervals\">&#9668 Previous page<\/a><\/div><div class=\"alignright\"><a href=\"https:\/\/users.ssc.wisc.edu\/~ewfrees\/regression\/basic-linear-regression\/2-6-building-a-better-model-residual-analysis\/\" title=\"2.6 Building a Better Model: Residual Analysis\">Next page &#9658<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Section 2.1, we showed how to use least squares estimators to predict the lottery sales for a zip code, outside of our sample, having a population of 10,000. Because prediction is such an important &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3343,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"jetpack_post_was_ever_published":false},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P8cLPd-Sq","acf":[],"_links":{"self":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/3374"}],"collection":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/comments?post=3374"}],"version-history":[{"count":5,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/3374\/revisions"}],"predecessor-version":[{"id":4895,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/3374\/revisions\/4895"}],"up":[{"embeddable":true,"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/pages\/3343"}],"wp:attachment":[{"href":"https:\/\/users.ssc.wisc.edu\/~ewfrees\/wp-json\/wp\/v2\/media?parent=3374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}