# Thread: How to find the hidden formula behind a set of numbers

1. ## How to find the hidden formula behind a set of numbers

Question: I'm looking for help in finding the original equation behind a set of given answers:

when x = 100, the answer is 0.5 (1/2)
when x = 200, the answer is 0.6666 (2/3rds)
when x = 300, the answer is 0.75 (3/4ths)
when x = 400, the answer is 0.8 (4/5ths)

There is a pattern, and I tried approaching this problem as a Sequence, but could not get the differences to converge.

I cheated, and found the hidden formula (shown below) which governs the above sequence, but I still want to know how to reverse-engineer this problem so I could have found the "Hidden Formula" without looking up the answer.

Hidden Formula: x ÷ (x + 100)
so when x = 100, the formula would be: 100 ÷ (100 + 100) = 100 ÷ 200 = 0.5

2. ## Re: How to find the hidden formula behind a set of numbers

Pick a big n > 1. For the first n elements of the sequence, write down a formula for drawing a polynomial through them. See if that formula matches the remaining elements a_{n+1}, a_{n+2}, .... Experiment with n. It would be easiest to do this programmatically.

If the polynomials are no good, try regressing the sequence on functions of the form

(x - mu)^k, k = ..., -2, -1, 0, 1, 2, ...

k^x, log_k(x), k = 1, 2, ...

etc.

3. ## Re: How to find the hidden formula behind a set of numbers

There will exist an infinite number of solutions because there exist an infinite number of graphs through any finite set of points. In particular, given n "data points" there always exists a unique polynomial of degree n- 1 that passes through those points. Here, you are given 4 points so there exist a unique cubic satisfying this.

Any cubic can be written $\displaystyle ax^3+ bx^2+ cx+ d$. you must
$\displaystyle a(100)^3+ b(100)^2+ c(100)+ d= 1000000a+ 10000b+ 100c+ d= 1/2$
$\displaystyle a(200)^3+ b(200)^2+ c(200)+ d= 8000000a+ 40000b+ 200c+ d= 2/3$
$\displaystyle a(300)^3+ b(300)^2+ c(300)+ d=27000000a+ 90000b+ 300c+ d= 3/4$
$\displaystyle a(400)^3+ b(400)^2+ d(400)+ d= 64000000a+ 160000b+ 400c+ d= 4/5$

four equations to solve for a, b, c, and d.