1

In a regression with dependent variable $Y$ and two independent variables $X_1$ and $X_2$, I know that the coefficient $\beta_1$ is given by:

$$\beta_1 = \frac{(\sum x_2^2)(\sum x_1 y)-(\sum x_1x_2)(\sum x_2y)}{(\sum x_1^2)(\sum x_2^2)-(\sum x_1x_2)^2}$$

What I am trying to find out is the analogous formula (not using matrices) for the regression with three independent variables $X_1$, $X_2$ and $X_3$ so I can understand how to extend it further.

blipblop
  • 19
  • 3
  • 5
    I realize the duplicate is only for three predictors. However, there has to be an end somewhere, lest we accumulate a growing list of versions of this question where "two" becomes "three" becomes "four" *ad infinitum* and *ad nauseam.* At some point--and I sincerely think it has occurred by the time there are two dependent variables (which, with a constant, actually make *three*)--it becomes clear that these questions are asking for painful elaboration of the complicated formulas lurking behind the matrix equations, and as such they have no interest for statistics or computation. – whuber Feb 12 '17 at 21:29
  • @whuber Your point does not make sense. The precise reason why I asked for the case with 3 variables is to help me and others understand **how to generalize** it further from 2 variables. It is not obvious how to go from 2 to 3, or to `n` if you prefer (e.g. which additional terms would have to be included besides the analogous to 2-variable case). But if we have a 3 variable case, then generalization becomes easy. Marking this as duplicate misses the point why I asked the question - which is to escape from the simplicity of the 2-variable case. It's a very stretched and rush judgment call. – blipblop Feb 12 '17 at 21:34
  • 4
    Generalization is incredibly obvious: **use matrices.** If you really want to unfold the formulas for matrix inversion into sums and products, then go ahead. But I stand by my opinion that this is of no interest or use in statistics or machine learning. – whuber Feb 12 '17 at 21:43
  • 1
    @whuber Isn't this site exactly to ask questions when we in difficulty of achieving something? That is precisely what I am in difficulty with. This question is **not** a duplicate. You are stretching the rules at your arbitrary will and for no reason: there is just no cost in leaving the question open since it is **not** duplicate. **You** find it to be a not-useful question, which I guess is not covered by the rules of the site: "closing the question because I don't like it". – blipblop Feb 12 '17 at 21:47
  • 5
    You might find it informative, as well as useful, to know that as soon as you have a formula for even *one* independent variable, you can leverage it into an algorithm for any number of independent variables. I have explained this in answers at http://stats.stackexchange.com/questions/46185 and http://stats.stackexchange.com/questions/17336, *inter alia*. I'm not saying there's anything the matter with your question or that it's somehow stupid--it's not. It's just that it makes no sense--and would even be counterproductive--to attempt an answer in light of the facts I have brought forward. – whuber Feb 12 '17 at 21:56
  • 1
    @whuber Thanks for the references. I will take a look at them right away. I understand your point, even if I disagree with it. However, it still does not change the fact that the question is not a duplicate. It simply does not fit into the definition of duplicate that this very site adopts. You find it no sensical to answer it? Fine, don't. Now, mark it as "non-sensical". Oh, there is no such an option? Too bad: closing it as duplicate when it is not, is stretching the rules – blipblop Feb 12 '17 at 22:03

0 Answers0