seniorLinear Regression
What is the hat matrix in Linear Regression and why is it important?
Updated May 16, 2026
Short answer
The hat matrix maps observed target values to predicted values and reveals influence of each data point.
Deep explanation
The hat matrix H = X(XᵀX)⁻¹Xᵀ transforms y into predictions: ŷ = Hy. Its diagonal elements (hᵢᵢ) measure leverage of each point. It is fundamental in diagnostics because it quantifies how much each observation affects its own prediction.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro