Intuition for confidence intervals vs prediction intervals for linear regression I am having a bit of trouble understanding the difference between a confidence and prediction interval in the context of linear regression, and in what scenario we would use either of them. I've posed a scenario below to show what my current understanding is, can anyone confirm my thinking is correct? If not, can you explain the difference between them and when we would use either?
'Imagine we’re running a study on the IQ scores of children between the ages of 1 and 10. We are doing a simple linear model using only their age as a regressor. Say we’ve studied ‘3 children aged 1, 10 children aged 2, 14 children aged 4 (note I have explicitly skipped children aged 3 for this example) and so on and so forth’. Two new children are to be tested: one who is aged 2 and the other who is aged 3. If I wanted to find their IQ score based on their age would I do it like this:
We already have data about children aged 2, so I would be interested in the confidence interval for the expected mean response, when predicting this childs IQ.
Then, for the other child who is aged 3 (an age we haven’t recorded any data for), here, I would use a prediction interval instead of a confidence interval, because I have no data to work with for children aged 3.'

You can understand the confidence interval as an interval for the mean, which gives information about the uncertainty/variance of the model itself.
A prediction interval is an interval for a single prediction, therefore it takes into account both the variance of the model AND the variance of the data (and thats why the prediction interval is bigger). Most of the time, a prediction interval is what you really need...
