# Why does the linear regression of “x on y” intersect with the linear regression of “y on x” at (x̄, ȳ)?

Problem:

The following table below shows the marks scored by seven students on two different mathematics tests.

$$\begin{array}{c|c|c|} \text{Test 1 (x)} & 15 & 23 & 25 & 30 & 34 & 34 & 40 \\ \hline \text{Test 2 (y)} & 20 & 26 & 27 & 32 & 35 & 37 & 35 \\ \hline \end{array}$$

Let $$L_{1}$$ be the regression line of x on y. The equation of the line $$L_{1}$$ can be written in the form $$x = ay + b$$.

(a) Find the value of $$a$$ and the value of $$b$$.

Let $$L_{2}$$ be the regression line of $$y$$ on $$x$$. The lines $$L_{1}$$ and $$L_{2}$$ pass through the same point with coordinates $$(p,q)$$.

(b) Find the value of $$p$$ and the value of $$q$$.

My solution:

I inputted both sets of data into the calculator (TI-84) and got a line of best fit for both.

$$x$$ on $$y$$: $$y=1.2908291457286x-10.379396984925$$

$$y$$ on $$x$$: $$y=0.69993188010899x+10.187670299727$$

These two lines intersect at $$(34.81,34.55)$$

The actual solution: The lines should meet at $$(x̄, ȳ) = (28.7,30.3)$$

Can anyone point me in the correct direction? I just don't see how these two lines could intersect at the mean x,y values when those values are obviously flipped in the two lines.

Edit: This problem is from the IB Math AA HL curriculum, exam code SPEC/5/MATAA/SP2/ENG/TZ0/XX/M . This is a practice test provided by IB.

• Welcome to CV! Is this a question from a course or textbook? If so, please add the [self-study] tag & read its wiki. – Stochastic Aug 12 '20 at 19:20
• This is called the point of averages; the link goes to a search that will show you many answers. – whuber Aug 12 '20 at 19:23

Any linear regression goes through $$\bar x,\bar y$$, hence, these two should intersect too.

Consider regressions $$y=a+bx+e$$ and $$x=c+dy+u$$, take the expectations of both sides of equations: $$E[y]=a+bE[x]+E[e]$$ $$E[y]=a+bE[x]$$ similarly $$E[x]=c+dE[y]$$

• For the 'x on y' case, wouldn't the linear regression pass through $\bar y, \bar x$? – maydc Aug 13 '20 at 15:15
• @maydc, yes, that's the point. except then you draw y on x-axis and vice versa, hence, the intersection – Aksakal Aug 13 '20 at 15:39
• A little unintentional pun there, haha. Thanks for the help – maydc Aug 13 '20 at 21:51

Ok, so I think I see where I messed up. In this line:

$$x$$ on $$y$$: $$y=1.2908291457286x-10.379396984925$$

The position of the x and y are reversed. The equation should be written as $$x=1.2908291457286y-10.379396984925$$

In order to put these two regression lines on the same graph, both equations need to be solved for the same variable (even if in the first equation, Y is the independent).

Now when I graph, I see that these two lines of regression do indeed intersect at the $$(\bar x,\bar y)$$ .