4
$\begingroup$

I've got a problem that can be summarized as a linear regression. Thus it takes the following form:

$$ Y=X \beta +\epsilon $$

where $Y$ and $\epsilon$ are vectors of size $N\times1$, $X$ is a matrix of size $N\times3$, and $\beta$ is a vector of size $3\times1$ (i.e., I am solving for three parameters).

The proper way to solve this under an ordinary least squares framework is via the normal equations—that is, taking the partial derivative of the sum of squared errors with respect to each parameter, and solving for where that equals zero in order to minimize the sum of squared errors.

However, this works rather poorly for me. On a whim, I tried just doing the following to solve for the parameters instead:

$$ \beta = X^{-1}Y $$

This actually works out really, really nicely. The problem is, I can't justify it, and I don't know what it's doing! Note that it's basically ignoring the idea that there are any errors at all.

Any ideas as to what's going on here? Thanks in advance.

$\endgroup$
2
  • 1
    $\begingroup$ Please define what you meant with $X^{-1}$. Is it the inversion on a non squared matrix? $\endgroup$
    – niandra82
    Commented Aug 3, 2014 at 18:55
  • $\begingroup$ I agree with niandra - you should be explicit about what you're actually doing when you're inverting $X$. $\endgroup$
    – Glen_b
    Commented Aug 4, 2014 at 0:10

1 Answer 1

3
$\begingroup$

Since the regressor matrix is not square, it does not have an inverse. I suspect though that it is of full column rank ($=3$), i.e. that your three regressors are not perfectly colinear. Then, the regressor matrix has a "left inverse", i.e. a matrix $X^{-1}_{left}$ that satisfies

$$X^{-1}_{left}X =I$$

This matrix is, ahem, equal to $(X'X)^{-1}X'$. So essentially you found

$$\beta = X^{-1}_{left}Y = (X'X)^{-1}X'Y$$ which is exactly the solution to the normal equations written in matrix notation. I guess you did this by software -if you told the software to invert the regressor matrix, it, seeing that $X$ is not a square matrix, interpreted it as asking of it to calculate the left-inverse matrix.

Execution of statistical estimation does "ignore the idea that there are errors", because these errors are unknown, and so however we want it, they cannot be included in our calculations.

$\endgroup$
1
  • $\begingroup$ Ah! You hit it dead on the nose. I did indeed do this via software, and the MATLAB help page about the mldivide function/operator does indeed explain the behavior. Thanks for the explanation, and your patience with my ignorance :-) $\endgroup$
    – Sam R
    Commented Aug 4, 2014 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.