You might think of y = β0 + β1•x1 + β2•x2 + ... + e But it's better to see it as x1•β1 + x2•β2 + ... + e The *X* matrix is like our spreadsheet so that order is necessary for the dimensions to line up in the matrix multiplication. It's a bunch of known constants acting as the coefficients in a system of equations. Similar to the matrix equation *Ax* = *b* It's *Xβ* = *y* *β* is the variable vector transformed by *X*. Regression is about a linear combination of the β's. Given *Y* = *XB* + *e* E(*Y* | *X*) = *XB* + 0 The error term averages out to 0, i.e. we regress back to the (conditional) mean of Y. The product of a vector with its transpose collapses into the sum of its squared elements. *x’x* = Σx.i ² Variance is the average of squared deviations. (*x* - μ)’(*x* - μ) = Σi(x.i - μ)² Divide that by n for σ² , by n-1 for s². Similarly Cov(x1, x2) = Σi(x.i1 - μ1)(x.i2 - μ2) / n σ1,2= (*x1* - μ1)’(*x2* - μ2) / n Generalize it to (*X* - *M*)’(*X* - *M*) / n If the variables were mean centered first their means are 0. Therefore *M* = *0* and the covariance matrix is *X’X* divided by n or n-1.
Thanks, G. We out here makin moves, matricizing* linear regression. You know what it be. Stat boiis and girls comin in hard WOOOO
the first TH-cam teacher that has actually helped. Thank you
Thanks!! I am happy that this video was helpful!
thank you so much for making this playlist, it saves my Semester
Have you considered putting your videos into a playlist? 😅
Yup. I have lots of playlists. This one might interest you: Simple Linear Regression: th-cam.com/play/PLJDUkOtqDm6UeH59-jG31Cma-abXLNse_.html
@@Stats4Everyone Oh weird-when I went to your playlists tab earlier they didn’t load, but I see them now. Thanks!
In 2022. Thank u Michelle for this video... saving lives
Perfect, I was confused between the two representations.
You might think of y = β0 + β1•x1 + β2•x2 + ... + e
But it's better to see it as
x1•β1 + x2•β2 + ... + e
The *X* matrix is like our spreadsheet so that order is necessary for the dimensions to line up in the matrix multiplication. It's a bunch of known constants acting as the coefficients in a system of equations.
Similar to the matrix equation *Ax* = *b*
It's *Xβ* = *y*
*β* is the variable vector transformed by *X*. Regression is about a linear combination of the β's.
Given *Y* = *XB* + *e*
E(*Y* | *X*) = *XB* + 0
The error term averages out to 0, i.e. we regress back to the (conditional) mean of Y.
The product of a vector with its transpose collapses into the sum of its squared elements.
*x’x* = Σx.i ²
Variance is the average of squared deviations.
(*x* - μ)’(*x* - μ) = Σi(x.i - μ)²
Divide that by n for σ² , by n-1 for s².
Similarly Cov(x1, x2)
= Σi(x.i1 - μ1)(x.i2 - μ2) / n
σ1,2= (*x1* - μ1)’(*x2* - μ2) / n
Generalize it to (*X* - *M*)’(*X* - *M*) / n
If the variables were mean centered first their means are 0. Therefore *M* = *0* and the covariance matrix is *X’X* divided by n or n-1.
But why we should write variance and covariance in matrix form like this!!
And average of y is = average of (XB)?
Thank you!!
Thank u!