Correlated Residuals - The Big Bad Wolf of Statistics? In a probability and statistics class, we are often told about the requirement of residuals being uncorrelated when fitting a regression model.
We are often told that the reason for this requirement is that the absence of this usually suggests low quality data.
But mathematically, is there a mathematical reason as to why residuals need to be uncorrelated? What happens if the residuals are in fact correlated?
Can someone please comment on this?

Uncorrelated or independent residuals/observations/errors* are often assumed (but not required) for statistical inference like computing confidence intervals or p-values. If that assumption is wrong then the computed values are wrong (and methods that assume correlated observations would have been better).
See for instance the following time series that are randomly generated.

*

*First 49 times two autocorrelated series with $cov(y_i,y_j) = 0.9^{|i-j|}$
Among these first 49 cases there are 20 cases with $p<0.05$ (shown in red text) and the p-values are underestimated (and significance is overestimated).


*Second 49 correlated series without auto-correlation.
Here there is only one case with $p<0.05$ which is closer to the expected number.


It is not the residuals, but the error terms or observations that are assumed to be independent. The residuals will be correlated. See for instance the illustration in Why are the residuals in $\mathbb{R}^{n-p}$?
