Читать книгу Applied Regression Modeling - Iain Pardoe - Страница 26

1.7 Random Errors and Prediction

Оглавление

So far, we have focused on estimating a univariate population mean, , and quantifying our uncertainty about the estimate via confidence intervals or hypothesis tests. In this section, we consider a different problem, that of “prediction.” In particular, rather than estimating the mean of a population of ‐values based on a sample, , consider predicting an individual ‐value picked at random from the population.

Intuitively, this sounds like a more difficult problem. Imagine that rather than just estimating the mean sale price of single‐family homes in the housing market based on our sample of 30 homes, we have to predict the sale price of an individual single‐family home that has just come onto the market. Presumably, we will be less certain about our prediction than we were about our estimate of the population mean (since it seems likely that we could be further from the truth with our prediction than when we estimated the mean—for example, there is a chance that the new home could be a real bargain or totally overpriced). Statistically speaking, Figure 1.5 illustrates this “extra uncertainty” that arises with prediction—the population distribution of data values, (more relevant to prediction problems), is much more variable than the sampling distribution of sample means, (more relevant to mean estimation problems).

We can tackle prediction problems with a similar process to that of using a confidence interval to tackle estimating a population mean. In particular, we can calculate a prediction interval of the form “point estimate uncertainty” or “(point estimate uncertainty, point estimate uncertainty).” The point estimate is the same one that we used for estimating the population mean, that is, the observed sample mean, . This is because is an unbiased estimate of the population mean, , and we assume that the individual ‐value we are predicting is a member of this population. As discussed in the preceding paragraph, however, the “uncertainty” is larger for prediction intervals than for confidence intervals. To see how much larger, we need to return to the notion of a model that we introduced in Section 1.2.

We can express the model we have been using to estimate the population mean, , as


In other words, each sample ‐value (the index keeps track of the sample observations) can be decomposed into two pieces, a deterministic part that is the same for all values, and a random error part that varies from observation to observation. A convenient choice for the deterministic part is the population mean, , since then the random errors have a (population) mean of zero. Since is the same for all ‐values, the random errors, , have the same standard deviation as the ‐values themselves, that is, . We can use this decomposition to derive the confidence interval and hypothesis test results of Sections 1.5 and 1.6 (although it would take more mathematics than we really need for our purposes in this book). Moreover, we can also use this decomposition to motivate the precise form of the uncertainty needed for prediction intervals (without having to get into too much mathematical detail).

In particular, write the ‐value to be predicted as , and decompose this into two pieces as above:


Then subtract , which represents potential values of repeated sample means, from both sides of this equation:

(1.1)

Thus, in estimating the population mean, the only error we have to worry about is estimation error, whereas in predicting an individual ‐value, we have to worry about both estimation error and random error.

Recall from Section 1.5 that the form of a confidence interval for the population mean is


The term in this formula is an estimate of the standard deviation of the sampling distribution of sample means, , and is called the standard error of estimation. The square of this quantity, , is the estimated variance of the sampling distribution of sample means, . Then, thinking of as some fixed, unknown constant, is also the estimated variance of the estimation error, , in expression (1.1).

The estimated variance of the random error, , in expression (1.1) is . It can then be shown that the estimated variance of the prediction error, , in expression (1.1) is . Then, is called the standard error of prediction.

Thus, in general, we can write a prediction interval for an individual ‐value, as


where is the sample mean, is the sample standard deviation, is the sample size, and the t‐percentile comes from a t‐distribution with degrees of freedom.

For example, for a 95% interval (i.e., with 2.5% in each tail), the 97.5th percentile would be needed, whereas for a 90% interval (i.e., with 5% in each tail), the 95th percentile would be needed. These percentiles can be obtained from Table C.1. For example, the 95% prediction interval for an individual value of picked at random from the population of single‐family home sale prices is calculated as


What about the interpretation of a prediction interval? Well, for the home prices example, loosely speaking, we can say that “we are 95% confident that the sale price for an individual home picked at random from all single‐family homes in this housing market will be between and .” More precisely, if we were to take a large number of random samples of size 30 from our population of sale prices and calculate a 95% prediction interval for each, then 95% of those prediction intervals would contain the (unknown) sale price for an individual home picked at random from the population.

Interpretation of a prediction interval for an individual ‐value:

Suppose we have calculated a 95% prediction interval for an individual ‐value to be (, ). Then we can say that we are 95% confident that the individual ‐value is between and .

As discussed at the beginning of this section, the 95% prediction interval for an individual value of , , is much wider than the 95% confidence interval for the population mean single‐family home sale price, which was calculated as


Unlike for confidence intervals for the population mean, statistical software does not generally provide an automated method to calculate prediction intervals for an individual ‐value. Thus, they have to be calculated by hand using the sample statistics, and . However, there is a trick that can get around this (although it makes use of simple linear regression, which we cover in Chapter 2). First, create a variable that consists only of the value 1 for all observations. Then, fit a simple linear regression model using this variable as the predictor variable and as the response variable, and restrict the model to fit without an intercept (see computer help #25 in the software information files available from the book website). The estimated regression equation for this model will be a constant value equal to the sample mean of the response variable. Prediction intervals for this model will be the same for each value of the predictor variable (see computer help #30), and will be the same as a prediction interval for an individual ‐value. As further practice, calculate a 90% prediction interval for an individual sale price (see Problem 1.10). Calculate it by hand or using the trick just described. You should find that the interval is (, ).

We derived the formula for a confidence interval for a univariate population mean from the t‐version of the central limit theorem, which does not require the data ‐values to be normally distributed. However, the formula for a prediction interval for an individual univariate ‐value tends to work better for datasets in which the ‐values are at least approximately normally distributed—see Problem 1.12.

Applied Regression Modeling

Подняться наверх