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.'