Nota: = Suma de cuadrados totales, = Suma de errores al cuadrado, y = Suma de cuadrados de la regresión. La ecuación en el título a menudo se escribe como:
Pregunta bastante directa, pero estoy buscando una explicación intuitiva. Intuitivamente, me parece que tendría más sentido. Por ejemplo, supongamos que el punto tiene el valor y correspondiente y , donde es el punto correspondiente en la línea de regresión. También suponga que el valor medio de y para el conjunto de datos es . Entonces, para este punto particular i, , mientras que y . Obviamente, . ¿No se generalizaría este resultado a todo el conjunto de datos? No lo entiendoy i = 3 y i ˉ y = 0 S S T = ( 5 - 0 ) 2 = 5 2 = 25 S S E = ( 5 - 3 ) 2 = 2 2 = 4 S S
Respuestas:
Sumar y restar da Entonces, tenemos que demostrar que∑ n i = 1
En realidad, creo (a) es más fácil de mostrar en notación matricial para la regresión múltiple general de que el caso única variable es un caso especial:
fuente
(1) Intuition for whySST=SSR+SSE
When we try to explain the total variation in Y (SST ) with one explanatory variable, X, then there are exactly two sources of variability. First, there is the variability captured by X (Sum Square Regression), and second, there is the variability not captured by X (Sum Square Error). Hence, SST=SSR+SSE (exact equality).
(2) Geometric intuition
Please see the first few pictures here (especially the third): https://sites.google.com/site/modernprogramevaluation/variance-and-bias
Some of the total variation in the data (distance from datapoint toY¯ ) is captured by the regression line (the distance from the regression line to Y¯ ) and error (distance from the point to the regression line). There's not room left for SST to be greater than SSE+SSR .
(3) The problem with your illustration
You can't look at SSE and SSR in a pointwise fashion. For a particular point, the residual may be large, so that there is more error than explanatory power from X. However, for other points, the residual will be small, so that the regression line explains a lot of the variability. They will balance out and ultimatelySST=SSR+SSE . Of course this is not rigorous, but you can find proofs like the above.
Also notice that regression will not be defined for one point:b1=∑(Xi−X¯)(Yi−Y¯)∑(Xi−X¯)2 , and you can see that the denominator will be zero, making estimation undefined.
Hope this helps.
--Ryan M.
fuente
When an intercept is included in linear regression(sum of residuals is zero),SST=SSE+SSR .
proveSST====∑i=1n(yi−y¯)2∑i=1n(yi−y^i+y^i−y¯)2∑i=1n(yi−y^i)2+2∑i=1n(yi−y^i)(y^i−y¯)+∑i=1n(y^i−y¯)2SSE+SSR+2∑i=1n(yi−y^i)(y^i−y¯)
Just need to prove last part is equal to 0:
∑i=1n(yi−y^i)(y^i−y¯)==∑i=1n(yi−β0−β1xi)(β0+β1xi−y¯)(β0−y¯)∑i=1n(yi−β0−β1xi)+β1∑i=1n(yi−β0−β1xi)xi
In Least squares regression, the sum of the squares of the errors is minimized.
SSE=∑i=1n(ei)2=∑i=1n(yi−yi^)2=∑i=1n(yi−β0−β1xi)2
Take the partial derivative of SSE with respect to β0 and setting it to zero.
∂SSE∂β0=∑i=1n2(yi−β0−β1xi)1=0
So
∑i=1n(yi−β0−β1xi)1=0
Take the partial derivative of SSE with respect to β1 and setting it to zero.
∂SSE∂β1=∑i=1n2(yi−β0−β1xi)1xi=0
So
∑i=1n(yi−β0−β1xi)1xi=0
Hence,
∑i=1n(yi−y^i)(y^i−y¯)=(β0−y¯)∑i=1n(yi−β0−β1xi)+β1∑i=1n(yi−β0−β1xi)xi=0
SST=SSE+SSR+2∑i=1n(yi−y^i)(y^i−y¯)=SSE+SSR
fuente
This is just the Pythagorean theorem!
fuente