A horizontal regression is defined as the following:
$m=\frac{\sum_{i=1}^n (x_i-\operatorname{average(x)})(y_i-\operatorname{average(y))}}{\sum_{i=1}^n (x_i-\operatorname{average(x)})^2}$
whereas a vertical regression is defined as
$m=\frac{\sum_{i=1}^n (y_i-\operatorname{average(y)})^2}{\sum_{i=1}^n (x_i-\operatorname{average(x))}(y_i-\operatorname{average(y))}}$
In several math-books it says that you use the horizontal regression if you want to calculate the x values to given y values and the vertical regression formula if you want to find the corresponding y values to given x values.
But how can it be that the function I get with the vertical regression formula is more accurate than the horizontal one for x on y values?
For example:
$ x := \{1,2,3,4,5,6,7,8\}$
$ y := \{0.3,0.5,0.7,1,1,1.5,1.6,2.1\}$
That gives me the vertical function: $f(x)=0.24404*x-0.0107$ and the horizontal function: $f(x)=0.25256*x-0.04902$
If I calculate the least-squares-sum (x on y):
$\sum_{i=0}^7 (x_i-f(y_i))^2$
I get 181.33... for the vertical one but 183.14... for the horizontal one.
Why is in general the horizontal regression associated with "x on y" if the vertical one obviously be more accurate?
Thanks a lot in advance!