Best fitting "curve"

62 Views Asked by At

Let $P$ be an $n$th degree polynomial. Find the $(n-1)$st degree polynomial $R$, whose arithmetic mean of distances to all of the points $P$ passes be minimum.

Best fit line using geometric distance (not vertical distance) is similar, but it doesn't help. Maybe it can be solved by using Deming Regression and limits ($\Delta x\to0$), but I don't know how to do it.

Calculus does what Deming Regression does, in a harder way. Maybe it's possible to use calculus "optimization" to do that, if it's not too complex.