Linear regression and vectors: Help

histudnet

New member
Joined
Dec 30, 2019
Messages
3
Hi everyone, in Statistics I'm studying linear regression and least square methods but I haven't great knowledge about linear algebra and vectors. If I understood correctly, my notes say that, to find the approximative regression line, I need to find the value of [MATH]\widehat{y}[/MATH] that minimizes [MATH]|y- \widehat{y}|^2[/MATH] and this value can be found in the orthogonal projection of y (the vector of real data y1...yn) in the vector space E, whose basis are e and x (the real fixed values of x: x1...xn).
1578247753654.png

If I understood correctly, e is a unit column vector that's used to be multiplied by a scalar that has the value of the intercept, so that each yi will be defined taking account of the value of the intercept. But what's the usefulness of using a multiplied by a vector e=(1...1) instead of using directly a column vector a=(a...a)?
The formula is: [MATH]\widehat{y}=ae+bx[/MATH]Returning to the topic of the orthogonal projection, then my notes say that to find [MATH]\widehat{y}=ae+bx[/MATH] such that [MATH]y- \widehat{y}[/MATH] is orthogonal to all the elements of E is equal to find the value of [MATH]\widehat{y}[/MATH] and to to do that it's enough checking if [MATH]y- \widehat{y}[/MATH] is orthogonal to the elements of the basis: e and x, so that its product by e and x is 0.
It can be expressed in the system:
1578248147073.png
My question is, what's the meaning of M(a b)=z, and (a b) = M-1z? How they obtained it?
 

Attachments

  • 1578241336566.png
    1578241336566.png
    24.7 KB · Views: 1
  • 1578243222849.png
    1578243222849.png
    82.9 KB · Views: 1
Hi everyone, in Statistics I'm studying linear regression and least square methods but I haven't great knowledge about linear algebra and vectors. If I understood correctly, my notes say that, to find the approximative regression line, I need to find the value of [MATH]\widehat{y}[/MATH] that minimizes [MATH]|y- \widehat{y}|^2[/MATH] and this value can be found in the orthogonal projection of y (the vector of real data y1...yn) in the vector space E, whose basis are e and x (the real fixed values of x: x1...xn).
View attachment 15869

If I understood correctly, e is a unit column vector that's used to be multiplied by a scalar that has the value of the intercept, so that each yi will be defined taking account of the value of the intercept. But what's the usefulness of using a multiplied by a vector e=(1...1) instead of using directly a column vector a=(a...a)?
The formula is: [MATH]\widehat{y}=ae+bx[/MATH]Returning to the topic of the orthogonal projection, then my notes say that to find [MATH]\widehat{y}=ae+bx[/MATH] such that [MATH]y- \widehat{y}[/MATH] is orthogonal to all the elements of E is equal to find the value of [MATH]\widehat{y}[/MATH] and to to do that it's enough checking if [MATH]y- \widehat{y}[/MATH] is orthogonal to the elements of the basis: e and x, so that its product by e and x is 0.
It can be expressed in the system:
View attachment 15870
My question is, what's the meaning of M(a b)=z, and (a b) = M-1z? How they obtained it?
Do you understand that:

Inverse of matrix [M] = [M]-1

Inverse matrix has the property where:

[M][M]-1 = [I] ................. where [I] is the identity matrix. Does any of these terms ring a bell?
 
Do you understand that:

Inverse of matrix [M] = [M]-1

Inverse matrix has the property where:

[M][M]-1 = [I] ................. where [I] is the identity matrix. Does any of these terms ring a bell?
Yes, I know that the inverse of a matrix is the matrix that, multiplied by the original matrix, gives us the identity matrix (so the matrix with all 1 on the main diagonal and zero in all the other cells) and it can be obtained by doing the gaussian elimination. But I didn't understand the translation of the system in the matrix form.
Moreover, I forgot to specify that I didn't understand how do they arrived to M, z and their content:
1578253392809.png
I'm not understanding the content of the matrices M and z(I suppose that e^t refers to the transpose of e, but I'm still not understanding the content of M and z)
 
Last edited:
Top