Skip to content

Mathematics and Statistics · Ch 11 — Linear Regression

The Two Lines of Regression and Their Equations

2

The Two Lines of Regression and Their Equations

For a linear relationship there are two lines of regression, one for each direction of estimation. Both are straight lines and both pass through the point of means (xˉ, yˉ)(\bar x,\ \bar y).

(1) Regression line of YY on XX — used to estimate YY for a given XX:

y−yˉ=byx (x−xˉ),y - \bar y = b_{yx}\,(x - \bar x),

where byxb_{yx} is the regression coefficient of YY on XX, given by

byx=r σyσx=Cov⁡(x,y)σx2=∑(x−xˉ)(y−yˉ)∑(x−xˉ)2=n∑xy−∑x∑yn∑x2−(∑x)2.b_{yx} = r\,\frac{\sigma_y}{\sigma_x} = \frac{\operatorname{Cov}(x,y)}{\sigma_x^{2}} = \frac{\sum (x-\bar x)(y-\bar y)}{\sum (x-\bar x)^{2}} = \frac{n\sum xy - \sum x\sum y}{n\sum x^{2} - (\sum x)^{2}}.

(2) Regression line of XX on YY — used to estimate XX for a given YY:

x−xˉ=bxy (y−yˉ),x - \bar x = b_{xy}\,(y - \bar y),

where bxyb_{xy} is the regression coefficient of XX on YY, given by

bxy=r σxσy=Cov⁡(x,y)σy2=∑(x−xˉ)(y−yˉ)∑(y−yˉ)2=n∑xy−∑x∑yn∑y2−(∑y)2.b_{xy} = r\,\frac{\sigma_x}{\sigma_y} = \frac{\operatorname{Cov}(x,y)}{\sigma_y^{2}} = \frac{\sum (x-\bar x)(y-\bar y)}{\sum (y-\bar y)^{2}} = \frac{n\sum xy - \sum x\sum y}{n\sum y^{2} - (\sum y)^{2}}.

Choosing the right line. To estimate yy from a given xx, use the line of YY on XX; to estimate xx from a given yy, use the line of XX on YY. Using the wrong line gives a poorer estimate, so always match the line to the variable you are predicting.

Both lines pass through (xˉ,yˉ)(\bar x, \bar y). Substituting x=xˉx=\bar x in the first line gives y=yˉy=\bar y, and similarly for the second — so the two lines intersect exactly at the point of means. This fact lets us recover xˉ\bar x and yˉ\bar y by solving the two regression equations simultaneously (§4).

Tip

A quick way to write the equations …

Definition 1Regression coefficient of $Y$ on $X$ ($b_{yx}$)

The slope of the line of YY on XX: byx=rσyσx=∑(x−xˉ)(y−yˉ)∑(x−xˉ)2b_{yx}=r\dfrac{\sigma_y}{\sigma_x}=\dfrac{\sum(x-\bar x)(y-\bar y)}{\sum(x-\bar x)^2}. It gives the average change in …

Definition 2Regression coefficient of $X$ on $Y$ ($b_{xy}$)

The slope (measured against YY) of the line of XX on YY: bxy=rσxσy=∑(x−xˉ)(y−yˉ)∑(y−yˉ)2b_{xy}=r\dfrac{\sigma_x}{\sigma_y}=\dfrac{\sum(x-\bar x)(y-\bar y)}{\sum(y-\bar y)^2}. It gives the average chang …

Definition 3Point of means

The point (xˉ,yˉ)(\bar x,\bar y) through which both regression lines pass; it is their point …