TOPICS
Search

Least Squares Fitting--Power Law


LeastSquaresPower

Given a function of the form

 y=Ax^B,
(1)

least squares fitting gives the coefficients as

b=(nsum_(i=1)^(n)(lnx_ilny_i)-sum_(i=1)^(n)(lnx_i)sum_(i=1)^(n)(lny_i))/(nsum_(i=1)^(n)(lnx_i)^2-(sum_(i=1)^(n)lnx_i)^2)
(2)
a=(sum_(i=1)^(n)(lny_i)-bsum_(i=1)^(n)(lnx_i))/n,
(3)

where B=b and A=e^a.


See also

Least Squares Fitting, Least Squares Fitting--Exponential, Least Squares Fitting--Logarithmic

Explore with Wolfram|Alpha

Cite this as:

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

Subject classifications