\hat\beta=(X^TX)^{-1}X^TyVariables
- X: design matrix
- y: response vector
- β̂: estimated coefficients
How to use this formula
Computes ordinary least-squares coefficients when XᵀX is invertible.
Important notes
- Numerical software typically uses QR or SVD rather than forming the inverse.
- Collinearity can make XᵀX singular or poorly conditioned.
Quick example
For a full-rank design matrix, β̂ minimizes ||Xβ−y||².
Applicability, worked calculation, and verification
Assumptions and domain checks
- Numerical software typically uses QR or SVD rather than forming the inverse.
- Preserve matrix order and verify dimension compatibility; multiplication and inversion are not generally commutative or always defined.
- For the Least-Squares Normal Equation, identify whether each quantity is a sample statistic, population parameter, estimator, or model value, and check the method assumptions.
Worked example
For a full-rank design matrix, β̂ minimizes ||Xβ−y||².
Common mistakes
- Do not reorder factors or mix incompatible dimensions when using Least-Squares Normal Equation; matrix operations are order-sensitive.
- For the Least-Squares Normal Equation, do not interpret a descriptive statistic as a causal or population conclusion without the sampling and model assumptions.
Continue the workflow
Use Least-Squares Normal Equation in your own work
- Check the domainMatch the variables and assumptions to the problem before substituting values.
- Copy the exact notationPreserve grouping, signs, and exponents in
\hat\beta=(X^TX)^{-1}X^Ty. - Edit or convertOpen the expression in the LaTeX editor, then export it for your document or web page.
Review and verification
Last reviewed: 2026-07-23
Automated quality check: Kept noindex until the missing evidence is supplied.
Formula references
- Introductory Statistics 2eOpenStax, Rice University — Reviewed probability and statistics definitions, notation, and formulas.
Frequently asked questions
What is the Least-Squares Normal Equation used for?
Computes ordinary least-squares coefficients when XᵀX is invertible.
Can I copy this formula as LaTeX?
Yes. Copy \hat\beta=(X^TX)^{-1}X^Ty or open it in the LaTeX editor.
What should I check before using it?
Confirm that each variable, unit, domain restriction, and assumption matches the problem.