TOPICS
Search

Least Squares Fitting--Logarithmic


LeastSquaresLog

Given a function of the form

 y=a+blnx,
(1)

the coefficients can be found from least squares fitting as

b=(nsum_(i=1)^(n)(y_ilnx_i)-sum_(i=1)^(n)y_isum_(i=1)^(n)lnx_i)/(nsum_(i=1)^(n)(lnx_i)^2-(sum_(i=1)^(n)lnx_i)^2)
(2)
a=(sum_(i=1)^(n)y_i-bsum_(i=1)^(n)(lnx_i))/n.
(3)

See also

Least Squares Fitting, Least Squares Fitting--Exponential, Least Squares Fitting--Power Law

Explore with Wolfram|Alpha

Cite this as:

Weisstein, Eric W. "Least Squares Fitting--Logarithmic." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/LeastSquaresFittingLogarithmic.html

Subject classifications