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.