Mandelore Posted August 15, 2009 Share Posted August 15, 2009 Below is the first formula I'm trying to figure out, or find one that outputs something very similar. The numbers below are the answers. 2 3 3 4 5 6 7 9 10 12 15 18 21 26 31 37 44 53 64 77 So if anyone can find a formula that will get these numbers based on one changing variable then that would be greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/ Share on other sites More sharing options...
corbin Posted August 15, 2009 Share Posted August 15, 2009 Is the input 1, 2, 3, 4... so on? Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898631 Share on other sites More sharing options...
Mandelore Posted August 15, 2009 Author Share Posted August 15, 2009 the scripting is for a game a friend is making, i know how to do this using an array, but. "A formula will work faster because it would just be like lvl x lvl / 100 = ?? If I used an array, then I would be storing solid, unchangeable numbers. Array(1,3,3,4,5,6,7,9,10,12) etc... All buildings provide different Culture Points, so I kinda need the formula to work for one, so it will work for all by modifying maybe a number." that was his response when i suggested it. this is the only info i have currently just trying to get more, but if its possible to work out with what Ive given you and someone can help ill be forever grateful Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898650 Share on other sites More sharing options...
corbin Posted August 15, 2009 Share Posted August 15, 2009 Well unfortunately it's a bit difficult to come up with a formula for an input set that returns an output set without the input set as compared to the output set having some kind of trend. Give me a few minutes (hopefully I can find my good calculator somewhere around here), and I'll try to find something. You might have to just hard code the levels. Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898662 Share on other sites More sharing options...
Mandelore Posted August 15, 2009 Author Share Posted August 15, 2009 a formula that works, but will need rounding is 1.2^(input)*2 so say 1.2^(20)*2= approx 77 (76.6... unrounded) so yeah the input is 1, 2, 3, 4... so on if anyone can get me a more accurate formula that would be fantastic. Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898674 Share on other sites More sharing options...
corbin Posted August 15, 2009 Share Posted August 15, 2009 http://www.zweigmedia.com/RealWorld/calctopic1/regression.html Through exponential regression you could find the best fit possible with an exponential equation. You can do it by hand after reading that page, but I'm looking for my calculator still haha. Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898681 Share on other sites More sharing options...
Mandelore Posted August 15, 2009 Author Share Posted August 15, 2009 argh lol maths... i never was good at this. ironic. i have my lvl 6 diploma in ICT and i cant do maths... lol Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898686 Share on other sites More sharing options...
corbin Posted August 15, 2009 Share Posted August 15, 2009 Well, I can't find my calculator and don't have the time to do it by hand.... So.... Perhaps there's an easier way to do it, or if I have enough spare time sometime I might try to do it (never done exponential regression by hand before.... Woo for challenges!) Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898690 Share on other sites More sharing options...
Mandelore Posted August 15, 2009 Author Share Posted August 15, 2009 ill have a go at this myself, and let you know how i get on, challenges are fun, just not mathematical ones lol. but thanks for your help and ill let you know how i do. Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-898693 Share on other sites More sharing options...
Mark Baker Posted August 17, 2009 Share Posted August 17, 2009 Equation : Y = 1.8850458004 * 1.20483851017^X Goodness of fit (R2) = 0.999672213698 StdDev of Residuals = 0.557331474804 Covariance= 113.225 Correlation= 0.999022624894 SS Regression= 17051.652204 SS Residuals= 5.59113071052 DF Residuals= 18 F= 54895.8261866 Intersect = 1.8850458004 Intersect SE = 0.258898001508 Slope = 1.20483851017 Slope SE = 0.0216123875926 Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-899966 Share on other sites More sharing options...
Mardoxx Posted August 17, 2009 Share Posted August 17, 2009 it's not linear, please lrn2maths y=a+bln(x) a=-3.3748629 b = 5.3558899 kthxbai Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-900282 Share on other sites More sharing options...
Mardoxx Posted August 17, 2009 Share Posted August 17, 2009 oops... plotted it the wrong way... a = 1.8850458 b = 0.18534554 [tex]y = a e^{b x}[/tex] //edit... lol just realized, it was a carat, not a multiply ..... Mark Baker is right... but one normally would use [tex]e[/tex] Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-900307 Share on other sites More sharing options...
corbin Posted August 17, 2009 Share Posted August 17, 2009 oops... plotted it the wrong way... a = 1.8850458 b = 0.18534554 [tex]y = a e^{b x}[/tex] //edit... lol just realized, it was a carat, not a multiply ..... Mark Baker is right... but one normally would use [tex]e[/tex] What program is that screen shot from? Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-900329 Share on other sites More sharing options...
Mardoxx Posted August 17, 2009 Share Posted August 17, 2009 mathematica I couldn't find maple on my start menu oh I worked out the regression on my casio 9860 Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-900332 Share on other sites More sharing options...
Daniel0 Posted August 17, 2009 Share Posted August 17, 2009 Mark Baker is right... but one normally would use [tex]e[/tex] Not necessarily. From a purely mathematical standpoint there is no difference. First of all, I get [tex]f(x)=1.88504580039545 \cdot e^{0.186345541507008605x}[/tex] using Maple. We know that [tex]\left( x^a \right)^b = x^{ab}[/tex]. This means that [tex]e^{0.186345541507008605x} = \left(e^{0.186345541507008605}\right)^x[/tex]. So our base is [tex]e^{0.186345541507008605}=1.20483851017[/tex], which is what Mark got as well. Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-900376 Share on other sites More sharing options...
corbin Posted August 18, 2009 Share Posted August 18, 2009 mathematica I couldn't find maple on my start menu oh I worked out the regression on my casio 9860 Ahhh, I thought you worked out the regression in the same program in which you graphed it. Quote Link to comment https://forums.phpfreaks.com/topic/170342-math-formula-hope-your-good/#findComment-900666 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.