# Impractical question: is it possible to find the regression line using a ruler and compass?

The ancient greeks famously sought to construct geometrical relationships using only a ruler and a compass. Given a set of points in a two dimensional plane, is it possible to find the OLS line using only such instruments?

This question has absolutely no practical application that I can think of.

• I was wondering if a physical device based on strings could be a practical implementation but Hooke's law states that the force scales linearly with the distance rather than as its square... Feb 1 at 5:56
• @Xi'an Is that a problem, though? Since the force scales linearly, the potential energy scales with the square of distance. A physical contraption will move towards a configuration that minimises its kinetic energy - which is to say, the sum of squares of spring displacements, weighted by spring stiffness - so it should be quite possible to build a spring-based line-of-best-fit machine. Feb 1 at 9:58
• @Xi'an it is not, you would end up implementing PCA, not linear regression (unless the springs are limited to "vertical" movement only) Feb 1 at 15:18
• I was indeed thinking of imposing vertical forces! Feb 1 at 15:44
• @Xi'an Rubber bands don't quite follow Hooke's law, because when compressed they don't exert much restoring force. If you wanted to use those, you'd need something like opposing pairs of bands so that they're always in tension, as well as something to impose the vertical-only movement restriction. But it should be doable. Feb 2 at 1:25 • @simoncoleman because it's simpler, I fit a model without intercept -- $y_i = mx_i + \epsilon_i$. Knowing that this is possible, it's pretty easy to convince myself (and hopefully everyone else) there's nothing which would make fitting an intercept impossible. i just didn't bother because i didn't think the added complexity would give any deep insight. Feb 2 at 14:47