Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

If I have this pattern:

1 goes to 40

1000 goes to 1360

10000 goes to 3480

How do I ask Wolfram Alpha what 20,000,000 goes to?

This is my attempt: http://www.wolframalpha.com/input/?i=1-%3E+40%2C+1000-%3E+1360+%2C+10000+-%3E3480%2C+20000000+-%3E+y+

share|improve this question
2  
Is that an arithmetic or geometric progression? Could you elaborate on what you're trying to do? –  R.K. Jun 2 '11 at 11:16
    
I don't have know the terminology to articulate what I am trying to do. Given that pattern I have shown, what notation would I use to ask wolfram alpha what 20million goes to. –  Dan Jun 2 '11 at 13:06
    
Do you know the formula used to get those results? –  Stimy Jun 3 '11 at 17:05
    
Nope. I was hoping I could insert the pattern and wolfram could plot the graph? –  Dan Jun 5 '11 at 8:46

3 Answers 3

up vote 0 down vote accepted

So I am pretty sure that Wolfram cant solve stuff without a formula. So i tried a couple things. .

First I tried to Plot it out, which got me part of the way there but did not give me the full graph. http://www.wolframalpha.com/input/?i=plot+1%2F40%2C+1000%2F1360%2C10000%2F3480+

So next i went to a buddy of mine who is more a nerd then i am who has a program on his computer that given a set of numbers will find a formula that can generate more in that set. The program is called Eureqa and the formula it generated that fit the first 3 numbers in the set was 38.574093 + 1.426013*x - 0.00010458704*x*x

Plugging 20 000 000 into the equation got a value of -41806295701

and here is your graph of the formula via wolfram http://www.wolframalpha.com/input/?i=plot+38.574093+%2B+1.426013*x+-+0.00010458704*x*x

share|improve this answer
1  
Eureqa found a slightly better fitting equation. (100546.73 + 4841.2861*x)/(2633.7004 + x)but it yields a pretty drastically different result for 20 000 000. the problem is that with such a small data set to work there are multiple 'solutions' that could fit. –  Mickey Slater Jun 13 '11 at 17:58

As Phwd pointed out, the key word in Wolfram|Alpha is "fit", so
fit {{1,40},{1000,1360},{10000,3480}}
will give you some least square fits to a linear, log and periodic (sinusoidal) functions. But none of these work very well.

However, if you want to be more specific, in this case W|A actually accepts the normal Mathematica input (this is not always the case). Since the data looks logarithmic + corrections, I tried
Fit[{{1,40},{1000,1360},{10000,3480}}, {1, x, x^2, Log[x]}, x] to find the least squares fit. The result was
39.8988 + 0.101156 x + 8.141317224831925*^-6 x^2 + 175.282 Log[x]

(Aside: you could also try taking the log of the x values first, then a quadratic fit).

As expected, with 4 free parameters and 3 data points, we get a very good fit! enter image description here

The extrapolation up to x=20,000,000 should not be trusted (but I find 3.25855*10^9).

share|improve this answer
    
That notation doesn't work for me, it gives an output of {(Fit[data, funs, vars] | 40 Fit[data, funs, vars] 1000 Fit[data, funs, vars] | 1360 Fit[data, funs, vars] 10000 Fit[data, funs, vars] | 3480 Fit[data, funs, vars]), {1, x, x^2, log(x)}, x} –  endolith Apr 7 '12 at 4:28
    
@endolith: I'm not quite sure what you're talking about... –  Simon Apr 7 '12 at 5:29
    
http://www.wolframalpha.com/input/?i=[Fit{{1%2C40}%2C{1000%2C1360}%2C{10000%2C3‌​480}}%2C+{1%2C+x%2C+x^2%2C+Log[x]}%2C+x] –  endolith Apr 7 '12 at 15:04
1  
@endolith: Sorry about that, there was a problem with escaping the square bracket in the link text, which meant the bracket was in the was in the wrong place -- for some reason this broke W|A's natural language input processing and it returned half-baked nonsense. It's fixed now. –  Simon Apr 8 '12 at 0:00

You are looking for regression analysis. So first you would need to understand according to your data what you would expect.

Is it a wave, is it exponential, quadratic? This type of information leads to better results. On first inspection, one could see a linear regression will not do.

Linear fit http://www.wolframalpha.com/input/?i=linear+fit+{1%2C+40}%2C{1000%2C+1360}%2C{10000%2C+3480}

So the next step (within Wolfram's limitation) is a quadratic, which fits but only because there are so little points.

-0.000108587 x^2+1.43002 x+38.5701

Which agrees with what @Mickey is saying

Quadratic fit http://www.wolframalpha.com/input/?i=quadratic+fit+{1%2C+40}%2C{1000%2C+1360}%2C{10000%2C+3480}

The same could be achieved for cubic (i.e. no x^3),

-0.000108587 x^2+1.43002 x+38.5701

Exponential (exponential fit) and Logarithmic (log fit) do not work well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.