Need to find function by the data

240 Views Asked by At

I have found interesting sequence, but I can't find its function. Graph of the unknown function

Here are the input and output data:

0   30
1   26.7
2   24
3   21.8
4   20
5   18.5
6   17.1
7   16
8   15
9   13.3
10  12
11  10.9
12  10
13  9.2
14  8.6
15  8
16  7.5
17  6.7
18  6
19  5.5
20  5
21  4.6
22  4.3
23  4
24  3.7
25  3.3
26  3
27  2.7
28  2.5
29  2.3
30  2.1
31  2

Does anybody know what is behind this sequence? Please help.

2

There are 2 best solutions below

6
On BEST ANSWER

Using MATLAB:

Fourier with 3 terms:

General model Fourier3:
     f(x) =  a0 + a1*cos(x*w) + b1*sin(x*w) + 
               a2*cos(2*x*w) + b2*sin(2*x*w) + a3*cos(3*x*w) + b3*sin(3*x*w)
Coefficients (with 95% confidence bounds):
       a0 =   1.095e+11  (-8.143e+14, 8.145e+14)
       a1 =  -1.641e+11  (-1.221e+15, 1.221e+15)
       b1 =  -5.669e+09  (-3.516e+13, 3.515e+13)
       a2 =   6.553e+10  (-4.879e+14, 4.88e+14)
       b2 =   4.533e+09  (-2.811e+13, 2.812e+13)
       a3 =  -1.089e+10  (-8.118e+13, 8.116e+13)
       b3 =  -1.132e+09  (-7.026e+12, 7.024e+12)
       w =     0.00206  (-2.553, 2.557)

Goodness of fit:
  SSE: 0.9513
  R-square: 0.9995
  Adjusted R-square: 0.9994
  RMSE: 0.1991

Polynomial of degree 5:

Linear model Poly5:
     f(x) = p1*x^5 + p2*x^4 + p3*x^3 + p4*x^2 + p5*x + p6
Coefficients (with 95% confidence bounds):
       p1 =  -3.164e-06  (-5.386e-06, -9.426e-07)
       p2 =   0.0002865  (0.0001134, 0.0004596)
       p3 =     -0.0103  (-0.01514, -0.005463)
       p4 =      0.2077  (0.1496, 0.2659)
       p5 =      -3.051  (-3.331, -2.772)
       p6 =       29.66  (29.25, 30.06)

Goodness of fit:
  SSE: 1.484
  R-square: 0.9992
  Adjusted R-square: 0.9991
  RMSE: 0.2389

Smoothing Spline:

Smoothing spline:
       f(x) = piecewise polynomial computed from p
Smoothing parameter:
       p = 0.9

Goodness of fit:
  SSE: 0.04464
  R-square: 1
  Adjusted R-square: 0.9999
  RMSE: 0.06053

Exponential with 2 terms:

General model Exp2:
     f(x) = a*exp(b*x) + c*exp(d*x)
Coefficients (with 95% confidence bounds):
       a =       28.49  (28.09, 28.9)
       b =    -0.08572  (-0.08712, -0.08433)
       c =       1.528  (0.9799, 2.076)
       d =      -1.313  (-2.479, -0.1475)

Goodness of fit:
  SSE: 1.015
  R-square: 0.9995
  Adjusted R-square: 0.9994
  RMSE: 0.1904
0
On

I like to use Eureqa Formulize to find models to fit data, such as what is given here. Formulze found

$$y = 29.14*e^{-0.08755x}.$$

Here is what the output looks like. Statistical fit data is included. For larger size, open in new tab.

enter image description here