Solve Equation from Table

92 Views Asked by At

I have a table of $X$ values and $Y$ values, and I'm trying to figure out the equation to get from one to the other. What's absolutely throwing me for a loop is how $334$ and $331$ can both be maped to $160$. Maybe it's a tiered system, where every five values in $X$ correlate with a bump in the value of $Y$? I'm lost.

X 132 186 199 224 242 297 300 318 331 334 365
Y  77 101 108 102 130 142 150 156 160 160 170
1

There are 1 best solutions below

0
On

Actually this kind of function guessing problems can fall into the category of polynomial interpolation.

Let's say you start with a function $(x_0,y_0)$ to $(x_1,y_1)$, and let $y = f(x)$ for easier notation, the answer is obvious:

$$f(x) = \frac{(y_1-y_0)}{(x_1-x_0)}(x-x_0) + y_0$$

Let's simplify it to

$$f(x) = p_0 x + k_0$$

Now you want to make $(x_2,y_2)$ also fitting to the above function. We add some things to $f(x)$ and call it $g(x)$

$$g(x) = f(x) + k*(x-x_1)*(x-x_0)$$

and try to figure out k by substituting new $g(x) = y_2$ and $x = x_2$. The later part is there because it could make the part $0$ if it uses older values that are already covered by $f(x)$, so the answer on $g(x)$ will be purely $f(x)$.

This can be done recursively for all data values. (And there are mechanical method to work it out too! Try to find it yourself!)

However this is not a good answer for statistical problem, since it totally ignores the fluctuation induced by higher degree.