Guessing Functional Forms For Data Fit

254 Views Asked by At

I have some data that I am trying to fit a curve to but curve fitting isn't something my discipline does a whole lot of (outside of a few standard curves). The functional form that is used in the picture was adopted from some literature and I have provided it below:

$$ Y = aXe^{-bX} $$

Ideally, I would like to try and fit a curve to the data that has a much easier inverse function to get at then the original functional form that I have provided above. I'm wondering if the community might have any ideas as to what type of functional form might be good to look into for fitting a curve for the data below?

enter image description here

Data:

X = numpy.array([0.0,56.39,132.68,200.87,260.01,310.59,353.62,390.24,421.52,
                 439.35,454.29,467.38,478.90,489.10,498.19,506.32])

Y = numpy.array([0.0,514.00,817.00,910.00,908.00,870.00,821.00,773.00,729.00,
                  681.00,640.00,606.00,577.00,552.00,531.00,512.00])
2

There are 2 best solutions below

0
On

Here's a fourth-order polynomial fit:

$$y = 5.94923 + 11.2234 x - 0.0487853 x^2 + 0.0000902936 x^3 - 6.69893 \cdot 10^{-8} x^4$$

data and fit

0
On

What is interesting is to plot $\frac y x$ as a function of $x$; this reveals an hyperbolic trend and then a possible model is $$y=x\left(-a+\frac b{c+x}\right)$$

This gives a very good fit with highly significant parameters $(R^2=0.999817)$ $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ a & 3.89210 & 0.18290& \{4.29060,3.49361\} \\ b & 3590.90 & 197.625 &\{3160.32,4021.49\} \\ c & 223.938 & 14.1943 & \{193.012,254.865\} \\ \end{array}$$

Below are the results for the predicted values $$\left( \begin{array}{ccc} x & y & y_{calc} \\ 0.0000 & 0.00 & 0.0000 \\ 56.390 & 514. & 502.86 \\ 132.68 & 817. & 819.59 \\ 200.87 & 910. & 916.15 \\ 260.01 & 908. & 917.29 \\ 310.59 & 870. & 877.66 \\ 353.62 & 821. & 822.27 \\ 390.24 & 773. & 762.75 \\ 421.52 & 729. & 704.46 \\ 439.35 & 681. & 668.55 \\ 454.29 & 640. & 637.11 \\ 467.38 & 606. & 608.61 \\ 478.90 & 577. & 582.84 \\ 489.10 & 552. & 559.51 \\ 498.19 & 531. & 538.33 \\ 506.32 & 512. & 519.08 \end{array} \right)$$

A better (but much difficult to invert) would be $$y=x\left(-a+\frac b{c+x^d}\right)$$

The parameter $d$ seems difficult to tune but discrete case studies show its impact on the sum of squares. A minimum value seems to happen close to $d=0.60$ which reduces the SSQ from $1387$ down to $781$. Tha adjusted parameters are $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ a & 8.57570 & 0.37796 & \{7.7522,9.39921\} \\ b & 640.203 & 42.2498 & \{548.15,732.258\} \\ c & 24.8265 & 1.81849 & \{20.864,28.7886\} \\ \end{array}$$

$$\left( \begin{array}{ccc} x & y & y_{calc} \\ 0.0000 & 0.00 & 0.0000 \\ 56.390 & 514. & 517.41 \\ 132.68 & 817. & 810.13 \\ 200.87 & 910. & 906.58 \\ 260.01 & 908. & 914.23 \\ 310.59 & 870. & 880.26 \\ 353.62 & 821. & 827.95 \\ 390.24 & 773. & 769.14 \\ 421.52 & 729. & 709.77 \\ 439.35 & 681. & 672.50 \\ 454.29 & 640. & 639.48 \\ 467.38 & 606. & 609.26 \\ 478.90 & 577. & 581.71 \\ 489.10 & 552. & 556.60 \\ 498.19 & 531. & 533.66 \\ 506.32 & 512. & 512.71 \end{array} \right)$$