0

I know that the answer is Estimator of beta [1]

But i need to get this in matrix form.

Can anyone help ?

Sam88
  • 348

1 Answers1

2

A sum of products like $\sum_i a_i b_i$ is a particular kind of inner product. Inner products are often written as $\langle a,b\rangle$. When dealing specifically with Euclidean vectors, they may also be called a dot product and would then normally be written $a\cdot b$.

If you're working with matrices, you would more commonly write the dot product of the vectors as $a^\top b$. If you're asking how to translate the formula you have, this would leave you nothing to do but simple substitution, so I won't take it any further.

Note that $\frac{1}{c^\top d}$ could also be written as $(c^\top d)^{-1}$ and so $a^\top b/c^\top d$ could more suggestively (in the sense of suggesting the relevant generalization) be written as $(c^\top d)^{-1}(a^\top b)$.

If instead you want to consider the case of multiple regression rather than simple regression, your $x$ will not be a vector but a matrix. However, there's no indication that I can discern in your question that you're asking about multiple regression.

Glen_b
  • 282,281
  • Hi i know that but i want to know how the parameter differ when there is no intercept (regression through origin) instead of normal regression – Sam88 Sep 21 '16 at 14:42
  • This is all deals with multiple linear regression . that why i am asking how to deal with matrices regarding this – Sam88 Sep 21 '16 at 14:43
  • 1
    @dhan Then your question is actively misleading- 1. you say "I know the answer is $\hat{\beta}=\sum x_iY_i/\sum x_i^2$". If you know that's "the answer" then you cannot be talking about multiple regression. 2. Your title says "regression line". If it's a line, you cannot be talking about multiple regression. 3. When I asked if the problem was just that you didn't know how to write inner products of vectors, you said that it was ... again, that confirmed that you were not talking about multiple regression. $:$ You have many things in your question that must be fixed before it can be answered – Glen_b Sep 21 '16 at 15:11
  • @dhanushkaSampath That is, please fix your question so it's clear what you want. – Glen_b Sep 21 '16 at 15:18
  • It sounds like this question might be a duplicate of http://stats.stackexchange.com/questions/46151. – whuber Sep 21 '16 at 15:21
  • @whuber It's possible but if I now understand the intent, I don't think it's a duplicate of that one. I think what's probably being sought is just the usual formula for the estimate of the beta vector in multiple regression but where $X$ doesn't have a constant column. I was looking for a duplicate of that just now but didn't spot one. – Glen_b Sep 21 '16 at 15:27
  • If it's multiple regression through the origin, then any post that presents the solution of the Normal equations (in a general form) will do: simply omit the constant vector from the design matrix. – whuber Sep 21 '16 at 15:47
  • 1
    @whuber as I mentioned to Tim when he suggested such a post as a duplicate -- the problem is the indicated post doesn't mention that need to omit the column (as you just described, and I did in the comment you responded to). I guess we could mention it in comments and close as duplicate but since "through the origin" is a focus of the question that seems inadequate. I think a suitable answer would have to address it (assuming that's what the question is after) – Glen_b Sep 21 '16 at 15:55
  • Either way this answer doesn't serve. I will delete it once it's clear the OP is aware of the above issues (I'm worried they won't see the comments) – Glen_b Sep 21 '16 at 15:57