Why do the widths of confidence & prediction intervals change across a regression line - shouldn't it be the same with i.i.d? I thought that we assume i.i.d and therefore identically distributed (constant variance) over the line? But aren't the below saying that technically the distribution changes from one X value to another?
Example images of confidence intervals:


I thought that we assume i.i.d and therefore identically distributed (constant variance) over the line? But aren't the above saying that technically the distribution changes from one X value to another?
Edit
I think what I'm saying may be better described by the below image.
If we had enough data and could theoretically make a slice at each value of x_1, so as to obtain a theoretical conditional probability distribution of x_2 | x_1, wouldn't we expect this distribution to be the same around the best fit line for all x_1, for it to satisfy i.i.d? In the case of say normally distributed prediction intervals that widen as we go further from the centre of the data, it seems to me that we're suggesting the variance is not constant and therefore the distributions are not identical for all x.
Sorry if this makes no sense.


The intervals are informed by precision of estimates of $y|x$, so for OLS regression the estimates near the lowest and highest $x$ values are farthest away on average from all the $x$ points, and thus less precise. In the GAM case, this is somewhat ameliorated by estimation weighted towards values of $x$ local to the point being estimated, so the narrowness of the intervals follow the tightest clustering of $x$ values.
