Is the formula for standard error for the slope of a linear regression with intercept the same as without?

140 Views Asked by At

If we are given sets $X$ and $Y$. The standart error formula for $\alpha$ coefficient of the regrssion $\hat{y} = \alpha x + \beta$ is $$ \frac{\sum{(y_i -\hat{y})^2}/(n-2)}{\sqrt{\sum(x_i-\bar{x})^2}}$$ How the formula for $S.E(\alpha)$ would change if we considered $\hat{y} = \alpha x$

1

There are 1 best solutions below

0
On BEST ANSWER

I advise using a matrix form for independent variable $X$. Then for both cases $$s.e.(\hat{\alpha}) = \sqrt{Var(\hat{\alpha})} = \sqrt{\sigma_u^2(X^TX)^{-1}}$$ where $\sigma_u^2$ is the variance of the disturbance term.
The only difference is $X$:

$$ \text{With intercept: } \quad X = \begin{bmatrix} 1 & x_1\\ 1 & x_2 \\ \vdots & \vdots \\ 1 & x_n \\ \end{bmatrix} $$ and $$ \text{Without intercept: } \quad X = \begin{bmatrix} x_1\\ x_2 \\ \vdots \\ x_n \\ \end{bmatrix} $$