Function description

119 Views Asked by At

I have function looks like this:

enter image description here

So, the point is after it comes to steady state, it slowly goes down. How can I describe such a behaviour?

The datapoints are:

x        y
1        10
2        60
3        72
4        70
5        69,8
6        69,6
7        69,4
8        69,2
9        69
10        68,8
11        68,6
12        68,4
13        68,2
14        68
15        67,8
16        67,6
1

There are 1 best solutions below

5
On BEST ANSWER

I don't think there's a one-word name for such a situation.

Depending on exactly what you want to do with the data when you are done, you might be looking for Segmented (Piecewise) Regression. It is clear that after a "breakpoint" in your model1, you experience completely linear behavior ($x > 3$). The first part looks quadratic.

Let's split our database into two separate lists:

Quadratic
    1        10
    2        60
    3        72

Linear
    4         70
    5         69,8
    6         69,6
    7         69,4
    8         69,2
    9         69
    10        68,8
    11        68,6
    12        68,4
    13        68,2
    14        68
    15        67,8
    16        67,6

Run regression on the first data set, receiving $f_1(x) = -19x^2 + 107x - 78$.

Run regression on the second data set, receiving $f_2(x) = -0.2x + 70.8$.

Now create the piecewise function: $$ f(x) = \left\{ \begin{array}{lr} -19x^2 + 107x - 78 & (x \le 3)\\ -0.2x + 70.8 & (x > 3)\\ \end{array} \right. $$

Perhaps we want such a function to be continuous. If you want, you can set the two function equal to each other, and you will find they intersect2 at $3 \le \dfrac{268+2\sqrt{286}}{95} \approx 3.17708 \le 4 $. So you could write: $$ f(x) = \left\{ \begin{array}{lr} -19x^2 + 107x - 78 & (x \le 3.17708)\\ -0.2x + 70.8 & (x > 3.17708)\\ \end{array} \right. $$

Now your function is continuous as well.


I would definitely recommend the piecewise regression method, but by using symbolic regression and the software Eureqa, I was able to find a quite interesting formula:

$$ 70.8 \cdot \mathrm{logistic}(3.541x - 5.323) - 0.2x $$

Where $\mathrm{logistic}(x) = \dfrac{1}{1 + e^{-x}}$, which is a quite common function, so you should have no trouble describing it.

If I was describing it to a friend, I would probably say "a logistic function followed by a linear decrease" or perhaps "a logistic function".

Some stats:

  • $ R^2 \approx 0.999 $
  • Maximum error at $x=3$ with $\approx 2.151$
  • $\mathrm{MSE} \approx 0.309 $

1 There are varying algorithms for determining breakpoints, one such algorithm is listed briefly here.

2 Is this allowed? Will this always be the case? Perhaps an algorithmic approach would be better.