Results 1 to 6 of 6

Math Help - Turning sample data with two variables into a continuous function

  1. #1
    Newbie
    Joined
    Jun 2011
    Posts
    7

    Turning sample data with two variables into a continuous function

    Hello~!

    I dunno if I could have made that title better...
    Anyway... me and a friend are trying to "break" some random computer game using the power of math (so, no, this is not "urgent" or anything like that...) and he's got some pretty cool data...
    We'd like to turn that data into something like a continuous function where you plug any "x" and "y" (like, x = 82.66 and y = -5.7) and it returns a value f(x,y).

    The data looks like this (pretty long block of numbers ahead):

    x y f(x,y)
    100 17 0,88706
    100 15 0,86133
    100 12 0,82333
    100 9 0,79111
    100 6 0,76167
    100 3 0,74333
    100 -3 0,69000
    100 -6 0,66667
    100 -9 0,64889
    100 -12 0,62917
    100 -16 0,60938
    100 -20 0,59000
    100 -25 0,56800
    100 -30 0,54667
    95 17 1,13706
    95 15 1,09133
    95 12 1,03083
    95 9 0,98444
    95 6 0,93500
    95 3 0,89333
    95 -3 0,84667
    95 -6 0,81000
    95 -9 0,78333
    95 -12 0,75833
    95 -16 0,72875
    95 -20 0,70200
    95 -25 0,67280
    95 -30 0,64533
    90 17 1,46059
    90 15 1,38267
    90 12 1,28500
    90 9 1,20889
    90 6 1,14333
    90 3 1,09000
    90 -3 0,99000
    90 -6 0,95500
    90 -9 0,92111
    90 -12 0,89000
    90 -16 0,85250
    90 -20 0,81850
    90 -25 0,78000
    90 -30 0,74633
    85 17 1,89235
    85 15 1,74667
    85 12 1,58667
    85 9 1,46667
    85 6 1,37000
    85 3 1,29000
    85 -3 1,16667
    85 -6 1,11333
    85 -9 1,06889
    85 -12 1,02833
    85 -16 0,98063
    85 -20 0,93800
    85 -25 0,89000
    85 -30 0,84800
    80 17 2,54824
    80 15 2,23133
    80 12 1,94833
    80 9 1,76111
    80 6 1,62333
    80 3 1,51000
    80 -3 1,34333
    80 -6 1,27833
    80 -9 1,22111
    80 -12 1,16917
    80 -16 1,11000
    80 -20 1,05750
    80 -25 1,00000
    80 -30 0,94967

    So, we've figured that this data is definitely not "chaotic" and that turning it into some continuous function should be somehow possible, but... how are we supposed to do it?
    We've already done similar stuff with 1-variable functions with the aid of Graph... is there some other free program that could help us with that?

    (also, sorry for this being my first post :P I'm not too much into taking and not giving anything in return, but I see that most of the questions that are within my level are answered very quickly... I guess that's a good thing.)
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,111
    Thanks
    2
    Various models don't yield all that great a result.

    f(x) = ax + by
    f(x) = a/x + by
    f(x) = aln(x) + by
    f(x) = a/ln(x) + by

    Pretty much the same result. Some clue might be good. Check some first and second differences and see if you can find some sort of pattern.

    It does look like a quadratic relationship to 'y' is better than a linear relationship. I didn't test that. You have to do some work.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Misa View Post
    Hello~!

    I dunno if I could have made that title better...
    Anyway... me and a friend are trying to "break" some random computer game using the power of math (so, no, this is not "urgent" or anything like that...) and he's got some pretty cool data...
    We'd like to turn that data into something like a continuous function where you plug any "x" and "y" (like, x = 82.66 and y = -5.7) and it returns a value f(x,y).

    The data looks like this (pretty long block of numbers ahead):

    x y f(x,y)
    100 17 0,88706
    100 15 0,86133
    100 12 0,82333
    100 9 0,79111
    100 6 0,76167
    100 3 0,74333
    100 -3 0,69000
    100 -6 0,66667
    100 -9 0,64889
    100 -12 0,62917
    100 -16 0,60938
    100 -20 0,59000
    100 -25 0,56800
    100 -30 0,54667
    95 17 1,13706
    95 15 1,09133
    95 12 1,03083
    95 9 0,98444
    95 6 0,93500
    95 3 0,89333
    95 -3 0,84667
    95 -6 0,81000
    95 -9 0,78333
    95 -12 0,75833
    95 -16 0,72875
    95 -20 0,70200
    95 -25 0,67280
    95 -30 0,64533
    90 17 1,46059
    90 15 1,38267
    90 12 1,28500
    90 9 1,20889
    90 6 1,14333
    90 3 1,09000
    90 -3 0,99000
    90 -6 0,95500
    90 -9 0,92111
    90 -12 0,89000
    90 -16 0,85250
    90 -20 0,81850
    90 -25 0,78000
    90 -30 0,74633
    85 17 1,89235
    85 15 1,74667
    85 12 1,58667
    85 9 1,46667
    85 6 1,37000
    85 3 1,29000
    85 -3 1,16667
    85 -6 1,11333
    85 -9 1,06889
    85 -12 1,02833
    85 -16 0,98063
    85 -20 0,93800
    85 -25 0,89000
    85 -30 0,84800
    80 17 2,54824
    80 15 2,23133
    80 12 1,94833
    80 9 1,76111
    80 6 1,62333
    80 3 1,51000
    80 -3 1,34333
    80 -6 1,27833
    80 -9 1,22111
    80 -12 1,16917
    80 -16 1,11000
    80 -20 1,05750
    80 -25 1,00000
    80 -30 0,94967

    So, we've figured that this data is definitely not "chaotic" and that turning it into some continuous function should be somehow possible, but... how are we supposed to do it?
    We've already done similar stuff with 1-variable functions with the aid of Graph... is there some other free program that could help us with that?

    (also, sorry for this being my first post :P I'm not too much into taking and not giving anything in return, but I see that most of the questions that are within my level are answered very quickly... I guess that's a good thing.)
    Make a surface plot, any spreadsheet package will allow you to make such a plot. Then try a 2-variable quadratic surface.

    CB
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jun 2011
    Posts
    7
    Thanks, both of you! I'm short on free time so I still didn't look at that (maybe later today though)... however I figured that I should give you some word on how it's going (or not) :P

    Quote Originally Posted by TKHunny View Post
    It does look like a quadratic relationship to 'y' is better than a linear relationship. I didn't test that. You have to do some work.
    Yeah we're pretty sure that linear doesn't fit well.
    When I have some time I'll try and figure out how to plot it... anyway now it's my turn to do something, then I'll get back to you (hopefully) to say that "it's solved" and how it turned out ^^
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jun 2011
    Posts
    7
    No luck yet, but I guess that's due to my inability...
    I couldn't get to do something helpful on OpenOffice's CALC, and some searching didn't help much... would you recommend some other free program (some statistic package?) or is it good enough and I should look harder?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Misa View Post
    No luck yet, but I guess that's due to my inability...
    I couldn't get to do something helpful on OpenOffice's CALC, and some searching didn't help much... would you recommend some other free program (some statistic package?) or is it good enough and I should look harder?
    There are a number of ways of doing this, I think I would use the solver in Excel (if you have a machine with a copy of Excel), it could also be done with the non-linear solver in Gnumeric. Open/Libre Office if I recall correctly does not have a non-linear solver.

    CB

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Uniformly continuous function-two variables
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: May 26th 2011, 07:11 AM
  2. Categorical data and sample size
    Posted in the Statistics Forum
    Replies: 1
    Last Post: May 6th 2011, 03:04 AM
  3. How does one perform a Paired Sample t-Test with binary data?
    Posted in the Advanced Statistics Forum
    Replies: 9
    Last Post: December 17th 2009, 08:27 AM
  4. Estimation from Sample Data:
    Posted in the Statistics Forum
    Replies: 1
    Last Post: February 1st 2009, 09:38 AM
  5. Replies: 1
    Last Post: April 24th 2008, 11:41 AM

Search Tags


/mathhelpforum @mathhelpforum