# What is this formula, related to simple linear regression, called?

This is my first post here. I hope I can make myself clear. Right now I'm learning linear regression as part of an introduction class to machine learning.

After going over the steps in the simple regression formulae, I realized that I had been doing something similar in the past to construct lines. In Python:

data = [{'x': 1, 'y': 2}, {'x': 5, 'y': 7}, {'x': 6, 'y': 8}]
coeff = sum([d['x'] / d['y'] for d in data]) / len(data)


Here, we're calculating the mean ratio between the variables, which we can use as a coefficient for constructing a line. Does this method have a name, and how does it relate to simple linear regression?

• Something similar (instead of dividing x to y, divide the difference to y) is called mean absolute percentage error (en.wikipedia.org/wiki/Mean_absolute_percentage_error) but percentages/ratios require absolute zeros. Regression does not have that requirement and the calculations are quite different actually. Jun 22 '16 at 8:12

It gives you the inverse of the average slope of lines passing through $(0,0)$ and $(x_i,y_i)$. If the $(x,y)$ are almost aligned with $(0,0)$, this is an estimate of the inverse of the slope of a line passing through the points.
Linear regression is quite different, as it involves cross-products of sums of $x$ or $y$.