Limits and variations of linear regression#
The question and the claim#
Diagnostics ask whether a model is adequate for a stated use. Nonlinearity, heteroskedasticity, dependence, influential observations, and extrapolation have different consequences. Correlated predictors can inflate uncertainty without invalidating regression.
What you should be able to do#
Specify the scientific target and the observations needed to address it.
Name a diagnostic failure, propose a remedy tied to the target, and show both its benefit and a remaining limitation.
Explain the assumptions, uncertainty, and limits of your conclusion.
Worked investigation#
Simulate a nonlinear mean with changing residual variance; compare linear and quadratic fits and evaluate prediction on an untouched set. The worked notebook is self-contained and uses documented teaching data. Its output is evidence about that example, not a finding about a human population.
Challenge the result#
Removing observations or predictors because they make a p-value inconvenient changes the analysis. A better-fitting curve does not resolve dependent errors or causal confounding. Before running an analysis, predict what this failure would change. After running it, distinguish a software check from a scientific justification.
Practice and verification#
Complete the exercise, then discuss the interpretation questions. Submit a runnable notebook, your assumptions, and a short evidence-based interpretation. The shared analysis workflow defines the reporting and assessment standard.
For AI assistance, first write your own target and expected behavior. Use generated suggestions as candidates, inspect the code or claims, and retain evidence of the checks you performed. The AI analysis guide includes a saved-output activity that requires no account or paid service.
Connection across lessons#
Use the OLS objective and assumptions to decide when a different mean or outcome model is needed.
Earlier lecture resources#
The recordings and slides below are retained from the earlier course edition and have not been revised. Use the written chapter, revised notebook, and exercise for current definitions and procedures; earlier examples may conflict with the corrections described here.
