Variance of the mean and predicted responses explained

In regression, mean response (or expected response) and predicted response, also known as mean outcome (or expected outcome) and predicted outcome, are values of the dependent variable calculated from the regression parameters and a given value of the independent variable. The values of these two responses are the same, but their calculated variances are different.The concept is a generalization of the distinction between the standard error of the mean and the sample standard deviation.

Background: simple linear regression

In simple linear regression (i.e., straight line fitting with errors only in the y-coordinate), the model is

yi=\alpha+\betaxi+\varepsiloni

where

yi

is the response variable,

xi

is the explanatory variable, εi is the random error, and

\alpha

and

\beta

are parameters. The mean, and predicted, response value for a given explanatory value, xd, is given by

\hat{y}d=\hat\alpha+\hat\betaxd,

while the actual response would be

yd=\alpha+\betaxd+\varepsilond

Expressions for the values and variances of

\hat\alpha

and

\hat\beta

are given in linear regression.

Variance

Variance of the mean response

Since the data in this context is defined to be (x, y) pairs for every observation, the mean response at a given value of x, say xd, is an estimate of the mean of the y values in the population at the x value of xd, that is

\hat{E}(y\midxd)\equiv\hat{y}d

. The variance of the mean response is given by

\operatorname{Var}\left(\hat{\alpha}+\hat{\beta}xd\right)=\operatorname{Var}\left(\hat{\alpha}\right)+\left(\operatorname{Var}

2
\hat{\beta}\right)x
d

+2xd\operatorname{Cov}\left(\hat{\alpha},\hat{\beta}\right).

This expression can be simplified to

\operatorname{Var}\left(\hat{\alpha}+\hat{\beta}xd\right)

2\left(1
m
=\sigma

+

\left(xd-\bar{x
\right)

2}{\sum(xi-\bar{x})2}\right),

where m is the number of data points.

To demonstrate this simplification, one can make use of the identity

\sum(xi-\bar{x})2=\sum

2
x
i

-

1
m

\left(\sum

2
x
i\right)

.

Variance of the predicted response

The predicted response distribution is the predicted distribution of the residuals at the given point xd. So the variance is given by

\begin{align} \operatorname{Var}\left(yd-\left[\hat{\alpha}+\hat{\beta}xd\right]\right)&=\operatorname{Var}(yd)+\operatorname{Var}\left(\hat{\alpha}+\hat{\beta}xd\right)-2\operatorname{Cov}\left(yd,\left[\hat{\alpha}+\hat{\beta}xd\right]\right)\\ &=\operatorname{Var}(yd)+\operatorname{Var}\left(\hat{\alpha}+\hat{\beta}xd\right). \end{align}

The second line follows from the fact that

\operatorname{Cov}\left(yd,\left[\hat{\alpha}+\hat{\beta}xd\right]\right)

is zero because the new prediction point is independent of the data used to fit the model. Additionally, the term

\operatorname{Var}\left(\hat{\alpha}+\hat{\beta}xd\right)

was calculated earlier for the mean response.

Since

2
\operatorname{Var}(y
d)=\sigma
(a fixed but unknown parameter that can be estimated), the variance of the predicted response is given by

\begin{align} \operatorname{Var}\left(yd-\left[\hat{\alpha}+\hat{\beta}xd\right]\right)&=\sigma2+

2\left(1
m
\sigma

+

\left(xd-\bar{x
\right)

2}{\sum(xi-\bar{x})2}\right)\\[4pt] &=\sigma2\left(1+

1
m

+

(xd-\bar{x
)

2}{\sum(xi-\bar{x})2}\right). \end{align}

Confidence intervals

See main article: article and Confidence interval. The

100(1-\alpha)\%

confidence intervals are computed as

yd\pm

t
\alpha,m-n-1
2

\sqrt{\operatorname{Var}}

. Thus, the confidence interval for predicted response is wider than the interval for mean response. This is expected intuitively – the variance of the population of

y

values does not shrink when one samples from it, because the random variable εi does not decrease, but the variance of the mean of the

y

does shrink with increased sampling, because the variance in

\hat\alpha

and

\hat\beta

decrease, so the mean response (predicted response value) becomes closer to

\alpha+\betaxd

.

This is analogous to the difference between the variance of a population and the variance of the sample mean of a population: the variance of a population is a parameter and does not change, but the variance of the sample mean decreases with increased sample size.

General case

The general case of linear regression can be written as

yi=\sum

n
j=1

Xij\betaj+\varepsiloni

Therefore, since

yd=\sum

n
j=1

Xdj\hat\betaj

the general expression for the variance of the mean response is
n
\operatorname{Var}\left(\sum
j=1

Xdj\hat\betaj\right)=

n
\sum
i=1
n
\sum
j=1

XdiSijXdj,

where S is the covariance matrix of the parameters, given by

2\left(XTX\right)
S=\sigma

-1.

See also

References