# Curve fitting, Polynomial [closed]

I have a data set in such a manner

{x,y}= {
{10^-6,10^-15},
{10^-5,10^-14},
{10^-4,10^-14},
{10^-3,10^-13},
{10^-2,10^-11},
{10^-1,10^-9},
{1,10^-8}
}


I want to fit a polynomial for these data sets.

• see Interpolation and Fit – kglr Jul 17 '18 at 9:36
• I've voted to close because fitting polynomials is readily available in the documentation, there is essentially no effort, and a polynomial is not appropriate for the artificial data (although a log transformation for both variables would make a polynomial more appropriate). – JimB Jul 17 '18 at 15:44

xy = {{10^-6, 10^-15}, {10^-5, 10^-14}, {10^-4, 10^-14}, {10^-3,
10^-13}, {10^-2, 10^-11}, {10^-1, 10^-9}, {1, 10^-8}};


### Interpolation

ClearAll[intf]
intf = Interpolation[xy, InterpolationOrder -> 3];
Plot[intf[t], {t, 0, 1}] ### Fit

ClearAll[fitf]
fitf[x_] := Evaluate@Fit[xy, {1, x, x^2, x^3}, {x}]
Plot[fitf[x], {x, 0, 1}] xy = {{10^-6, 10^-15}, {10^-5, 10^-14}, {10^-4, 10^-14},
{10^-3, 10^-13}, {10^-2, 10^-11}, {10^-1, 10^-9}, {1, 10^-8}};

{x, y} = Transpose[xy];

X = Transpose[{x^3, x^2, x^1, x^0}];

{a, b, c, d} = Inverse[Transpose[X].X].Transpose[X].y;

{from, to} = x[[{1, -1}]];

Show[ListPlot[xy, PlotMarkers -> {Automatic, Medium}],
Plot[a x^3 + b x^2 + c x + d, {x, from, to}],
PlotRange -> All] 