+ - 0:00:00
Notes for current slide
Notes for next slide

Prediction Intervals

Dr. D’Agostino McGowan

1 / 13

Predictions

Once we have built a model, y^=Xβ^, we can calculate predicted y, y^0 values for a new set of predictors, x0.

2 / 13

Predictions

Once we have built a model, y^=Xβ^, we can calculate predicted y, y^0 values for a new set of predictors, x0.

y^0=x0Tβ^

2 / 13

Predictions

Once we have built a model, y^=Xβ^, we can calculate predicted y, y^0 values for a new set of predictors, x0.

y^0=x0Tβ^

For example, if we fit a model y^=1.2+2.5x1+3x2

And would like to know the predicted value for someone with x1=3 and x2=2, we would calculate

2 / 13

Predictions

Once we have built a model, y^=Xβ^, we can calculate predicted y, y^0 values for a new set of predictors, x0.

y^0=x0Tβ^

For example, if we fit a model y^=1.2+2.5x1+3x2

And would like to know the predicted value for someone with x1=3 and x2=2, we would calculate

y^0=[132][1.22.53]

2 / 13

Predictions

Once we have built a model, y^=Xβ^, we can calculate predicted y, y^0 values for a new set of predictors, x0.

y^0=x0Tβ^

For example, if we fit a model y^=1.2+2.5x1+3x2

And would like to know the predicted value for someone with x1=3 and x2=2, we would calculate

y^0=[132][1.22.53] y^0=14.7

2 / 13

Application Exercise

We are interested in predicting a chicken's weight based on their diet using the chickwts dataset

  • Fit the model of interest and extract the estimated β coefficients
  • Construct x0 for a chicken that is eating "sunflower".
  • Find the predicted weight for a chicken eating sunflowers.
3 / 13

Predictions

There are ✌️ kinds of predictions that can be made from regression models

4 / 13

Predictions

There are ✌️ kinds of predictions that can be made from regression models

  • A predicted mean response
4 / 13

Predictions

There are ✌️ kinds of predictions that can be made from regression models

  • A predicted mean response
  • A prediction of a future observation
4 / 13

Predictions

There are ✌️ kinds of predictions that can be made from regression models

  • A predicted mean response
  • A prediction of a future observation

This matters for estimating the uncertainty

4 / 13

Example

  • What would a chicken who eats sunflowers weigh on average?
5 / 13

Example

  • What would a chicken who eats sunflowers weigh on average?
  • Suppose you want to feed your chicken sunflowers, what will your chicken's predicted weight be?
5 / 13

Example

  • What would a chicken who eats sunflowers weigh on average?
  • Suppose you want to feed your chicken sunflowers, what will your chicken's predicted weight be?

What is the difference?

5 / 13

Example

  • What would a chicken who eats sunflowers weigh on average?
  • Suppose you want to feed your chicken sunflowers, what will your chicken's predicted weight be?

What is the difference?

  • one is a prediction for an average one is for an individual
5 / 13

Prediction of the mean response

Example: What would a chicken who eats sunflowers weigh on average?

The prediction is x0Tβ, estimated by x0Tβ^.

6 / 13

Prediction of the mean response

Example: What would a chicken who eats sunflowers weigh on average?

The prediction is x0Tβ, estimated by x0Tβ^.

What is the variance of this prediction?

6 / 13

Application Exercise

Show that the variance of x0Tβ^ is

var(x0Tβ^)=x0T(XTX)1x0σ2

7 / 13

Confidence interval for a mean response

y0^±tσ^x0T(XTX)1x0

8 / 13

Prediction of a future value

Example: Suppose you want to feed your chicken sunflowers, what will your chicken's predicted weight be?

The prediction is x0Tβ+ϵ.

What is the expected value? What is the variance?

9 / 13

Application Exercise

  • What is the expected value of x0Tβ+ϵ?
  • Show that the variance is

(1+x0T(XTX)1x0)σ2

10 / 13

Prediction Intervals

y^0±tσ^1+x0T(XTX)1x0

11 / 13

Prediction Intervals

  • There is an important conceptual difference here
12 / 13

Prediction Intervals

  • There is an important conceptual difference here
  • parameters (like β1, β2, etc) are considered fixed but unknown (they are not random) which is why we interpret confidence intervals like we do
12 / 13

Prediction Intervals

  • There is an important conceptual difference here
  • parameters (like β1, β2, etc) are considered fixed but unknown (they are not random) which is why we interpret confidence intervals like we do
  • A future observation is a random variable. Therefore, we are saying there is a 95% chance that the future value falls within this interval
12 / 13

Prediction Intervals

  • There is an important conceptual difference here
  • parameters (like β1, β2, etc) are considered fixed but unknown (they are not random) which is why we interpret confidence intervals like we do
  • A future observation is a random variable. Therefore, we are saying there is a 95% chance that the future value falls within this interval
  • THIS IS NOT the correct interpretation of a parameter's confidence interval. It is the correct interpretation of a prediction interval
12 / 13

Prediction Intervals

Which is larger?

(x0T(XTX)1x0)σ2

or

(1+x0T(XTX)1x0)σ2

13 / 13

Prediction Intervals

Which is larger?

(x0T(XTX)1x0)σ2

or

(1+x0T(XTX)1x0)σ2

  • prediction intervals tend to be wider than confidence intervals for a mean response
13 / 13

Predictions

Once we have built a model, y^=Xβ^, we can calculate predicted y, y^0 values for a new set of predictors, x0.

2 / 13
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow