# Regression coefficients without intercept [duplicate]

Could someone recommend a link or help me out here: where can I find the formula for the regression without an intercept, and how is it deriveed differently than the formula with the intercept? (matrix form)

It's the same formula you use in regression with an intercept: $$\hat{\beta}=\left(X^TX\right)^{-1}X^Ty$$. Just make sure there isn't a column of ones for the intercept. It's the same derivation as the formula with an intercept.

Here's a link to some notes that derive regression coefficients: Statistics 512: Applied Linear Models - Chapter 5: Linear Regression in Matrix Form [PDF].

• Thank you. If you don't mind me asking another question - if I'm looking to compare variances of the same regression with and without an intercept by looking at their ratio, is there a difference in formulas?
– user14386
Oct 28, 2012 at 20:59
• Yup. The model without an intercept is actually a special case (nested) of the model with an intercept. Without the intercept, we are actually assuming the intercept is zero. Oct 28, 2012 at 21:03
• But if I need to take a ratio of variances, doesn't that mean their formula will just be the same?
– user14386
Oct 28, 2012 at 21:11
• The residual sums of squares will not be the same unless the regression model with an intercept fits the intercept to zero. Oct 28, 2012 at 21:20
• I apologize. I think I read your initial comment incorrectly. The standard F Test for choosing between two models, one of which is nested in the other, is valid. It's no different because you aren't including an intercept. Oct 28, 2012 at 21:22