# About weird data points fitting

I have following data points:

{{0.4, 0.74}, {0.38, 0.7}, {0.36, 0.67}, {0.34, 0.63}, {0.32,
0.59}, {0.3, 0.56}, {0.28, 0.52}, {0.26, 0.48}, {0.24, 0.45}, {0.22,
0.41}, {0.2, 0.38}, {0.18, 0.34}, {0.16, 0.3}, {0.14, 0.26}, {0.12,
0.23}, {0.1, 0.19}, {0.08, 0.15}, {0.06, 0.11}, {0.05,
0.09}, {0.049, 0.08}, {0.048, 0.08}, {0.048, 0.01}, {0.047,
0.08 }, {0.047, 0.04}, {0.047, 0.02}, {0.047, 0}, {0.046,
0.08}, {0.046, 0.07}, {0.046, 0.06}, {0.046, 0.05}, {0.046, 0.03}}


which looks like this:

The upper part is the usual fitting, but with the concentrated dots, it seems harder.

Zoom in those very concentrated points, I have following data points:

  {{0.05, 0.09}, {0.049, 0.08}, {0.048, 0.08}, {0.048,
0.01}, {0.047, 0.08}, {0.047, 0.04}, {0.047, 0.02}, {0.047,
0}, {0.046, 0.08}, {0.046, 0.07}, {0.046, 0.06}, {0.046,
0.05}, {0.046, 0.03}}


What I wish for the fitting for the concentrated dots is something like this(much smoother than the drawing):

Every y value has the accuracy within +-0.01.

I am not sure how to fit those dots. Can anyone help? Thanks in advance!

• That seems rather arbitrary. Commented Sep 6, 2016 at 7:23
• Are you sure the samples at the beginning of your measurement are even significant? Commented Sep 6, 2016 at 8:00
• It definitely looks like measurement noise at the end (not the start, they are the higher numbers) of your set of points. What is the accuracy of your x values? Joined->True in the ListPlot would give you a line like the one you have drawn... Commented Sep 6, 2016 at 8:14

Inverse function is much more pleasant. Therefore exchange $x$ and $y$, fit, invert.

ptsn = DeleteDuplicates[pts[[All,{2, 1}]], Abs[First[#1]-First[#2]] < 0.001 &];
f = Interpolation[ptsn];
g[1] = ListPlot[ptsn, PlotRange -> All];
g[2] = Plot[f[x], {x, 0.0, 0.74}];
Show[{g[1], g[2]}, Axes -> False, Frame -> True]


## Original function

g[4] = Plot[InverseFunction[f][x], {x, 0.045, 0.39}];
g[3] = ListPlot[pts, PlotRange -> All];
Show[{g[3], g[4]}, PlotRange -> {{0.0, 0.4}, All}, Axes -> False,Frame -> True]


• Very nice solution. I think you may have a small typo. Should be pts[[All, {2, 1}]]` with two brackets? Commented Sep 6, 2016 at 16:23
• @JackLaVigne thank you, somethings strange happened during copy/paste. I had to remove a lot of backslashes and obviously remove too much. Will correct soon. Commented Sep 6, 2016 at 16:46