[Math] How to fit a set of data points to a hyperbola, a square root function or a logarithmic function

least squaresregressionstatistics

Hello StackExchange community!

I am currently a 12th grader who has to research statistics on a post-high school level.

The topic that I was assigned is least-squares regression. So far I have read about and understood the concept behind linear least-squares regression. I then needed to gather data for regression analysis and now that I have gathered sufficient data, I know that the data does not follow a linear model. I, however, am really struggling to understand any other forms of curve fitting apart from data that follows a linear relationship, so here is the situation:

I have a set of points in the form of (x,y) that l can either fit by a hyperbola of the form $y=k/x$, a logarithmic function of the form $y=a*ln(cx+d)+g,$ or a square root function of the form $y=a(\sqrt {bx+c})+d$. All that I have to do using the least-squares method.

Could someone please explain to me (step-by-step and in easy terms) how I would do that? An example would be greatly appreciated! I already read something about linearization and then using linear regression, but frankly speaking I don't quite understand that either, so it'd be great if you could explain that too. You would help out a high-schooler in great despair haha.

Thank you very much in advance!

(P.S I apologize for any semantic or grammatic mistakes. English is not my native language.)

Best Answer

Linearization is a blanket term which refers to modifying the independent variable so it relates linearly to the dependent variable. The idea is to linearize the data via the three potential models, and then try least squared regression on all of them.

For example, to linearize the hyperbola, introduce a new independent variable $z=\frac1x$. Why is this helpful? Well, note that in the hyperbola model, $y=kz$. So, you can do LS regression on $y$ and $z$ to fit the hyperbolic model.

Likewise, we can linearize $x$ into $z$ to fit the other models.

To linearize the logarithm, let $z=\ln(cx)$, which makes the logarithmic model $y=a\ln(d)\cdot z+g$.

To linearize the square root, let $z=\sqrt{bx+c}$, which makes the square root model $y=az+d$.