Results 1 to 12 of 12

Math Help - State an equation that best fits these results?

  1. #1
    Member
    Joined
    Sep 2010
    Posts
    100

    State an equation that best fits these results?

    Hi there, this is my first question on here that I am struggling with and would love some clarification:
    I needed to do some coin tosses (this has nothing to do with probability) and make a chart based on the tosses and values (starting with 20, each coin toss I would remove all heads up coins and, record what coins are left return all coins that are tails into the cup for the next toss). I would need to repeat this until no coins remain, so here's my results:

    toss=coins remaining
    0=20
    1=15
    2=12
    3=9
    4=5
    5=3
    6=1

    How would I graph these results? I would also need to state an equation that best fits these results? And lastly, I would have to state another equation that would predict the number of remaining coins if I began with N(base=0).

    I appreciate all help and thank you for your efforts.

    I am thinking that the coin tosses =x and the coins remaining after each toss = y? I would need confirmation on this and how to go about doing the equation normally and if I were to begin with N(base=0).
    Last edited by Pupil; September 23rd 2010 at 06:31 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    16,453
    Thanks
    1868
    What do you mean by "best fits these results". You are given 7 data points so there exist a sixth degree polynomial that exactly passes through those 7 points.
    You could set this up as y= ax^6+ bx^5+ cx^4+ dx^3+ ex^2+ fx+ g and then let x and y be from each data point to get 7 equations to solve for the 7 coefficients. For example, when x= 0, y= 20 so a(0^6)+ b(0^5)+ c(0^4)+ d(0^3)+ e(0^2)+ f(0)+ g= g= 20.

    On the other hand there are probably simpler functions (linear, quadratic, etc.) that come close to those points.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    I think the equation is going to be exponential, because on average, for each coin toss, you'll have 1/2 heads and 1/2 tails. That is, the number of coins that you remove for each round is going to be, on average, half of the coins you tossed. It's exactly like the exponential decay of radioactive materials. So I would assume a function of the form

    N=N_{0}e^{-kt},

    where N is the number of coins remaining at toss t, and N_{0} is the initial number of coins. You already know N_{0}. The trick is to figure out the k. I would probably use a least squares fit procedure. That is, try to minimize the error of

    E=\sum_{j=1}^{T}(y_{j}-N_{0}e^{-kt_{j}})^{2}. Set \dfrac{dE}{dk}=0 and off you go.

    Another equivalent approach would be to plot the logarithm of your data (essentially, you're plotting on a semilog plot). Then you can fit a straight line to the data. Theory:

    \dfrac{N}{N_{0}}=e^{-kt}, and therefore

    \ln\left(\dfrac{N}{N_{0}}\right)=-kt=\ln(N)-\ln(N_{0}).

    So, if you define a new variable, z=\ln(N), then you've got yourself the equation z=-kt+\ln(N_{0}). You can fit a straight line to that from your data, which is quite straight-forward to do in Excel, for example, and from that you can get your k. This is probably the easiest way to go.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Sep 2010
    Posts
    100
    Quote Originally Posted by HallsofIvy View Post
    What do you mean by "best fits these results". You are given 7 data points so there exist a sixth degree polynomial that exactly passes through those 7 points.
    You could set this up as y= ax^6+ bx^5+ cx^4+ dx^3+ ex^2+ fx+ g and then let x and y be from each data point to get 7 equations to solve for the 7 coefficients. For example, when x= 0, y= 20 so a(0^6)+ b(0^5)+ c(0^4)+ d(0^3)+ e(0^2)+ f(0)+ g= g= 20.

    On the other hand there are probably simpler functions (linear, quadratic, etc.) that come close to those points.
    Sorry for causing confusion, I have no problem graphing them anymore and that looks more like a polynomial. We have to put the equation in exponential form c(2^x-P)+q, and I'm completely stumped and don't know where to begin.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Sep 2010
    Posts
    100
    Quote Originally Posted by Ackbeet View Post
    I think the equation is going to be exponential, because on average, for each coin toss, you'll have 1/2 heads and 1/2 tails. That is, the number of coins that you remove for each round is going to be, on average, half of the coins you tossed. It's exactly like the exponential decay of radioactive materials. So I would assume a function of the form

    N=N_{0}e^{-kt},

    where N is the number of coins remaining at toss t, and N_{0} is the initial number of coins. You already know N_{0}. The trick is to figure out the k. I would probably use a least squares fit procedure. That is, try to minimize the error of

    E=\sum_{j=1}^{T}(y_{j}-N_{0}e^{-kt_{j}})^{2}. Set \dfrac{dE}{dk}=0 and off you go.

    Another equivalent approach would be to plot the logarithm of your data (essentially, you're plotting on a semilog plot). Then you can fit a straight line to the data. Theory:

    \dfrac{N}{N_{0}}=e^{-kt}, and therefore

    \ln\left(\dfrac{N}{N_{0}}\right)=-kt=\ln(N)-\ln(N_{0}).

    So, if you define a new variable, z=\ln(N), then you've got yourself the equation z=-kt+\ln(N_{0}). You can fit a straight line to that from your data, which is quite straight-forward to do in Excel, for example, and from that you can get your k. This is probably the easiest way to go.
    Thank you for clarifying everything, so far I am following.

    However, the only equation we learned was: N_0=N_0 2^(t/d) and I've tried applying this equation any way I could but it wouldn't fit at all.

    So how would I derive this exponential equation after plotting my graph? And let's say they asked us to do another coin-toss with the same coins, but this time after counting the heads and placing them aside, we would add them to the existing values on the right-hand side?

    So it would be something like:
    0=20
    1=26
    2=32
    3=35
    etc.

    Thanks for all the help, by the way.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    N=N_{0}\,2^{-t/d} will work just as well. Just plot

    \log_{2}(N) on the vertical axis, and t on the horizontal. Theory:

    \dfrac{N}{N_{0}}=2^{-t/d}, so

    \log_{2}\left(\dfrac{N}{N_{0}}\right)=\log_{2}(N)-\log_{2}(N_{0})=-t/d. So you get

    \log_{2}(N)=\log_{2}(N_{0})-t/d.

    Since all exponentials are essentially the same, this will work out to much the same thing as my other idea.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Sep 2010
    Posts
    100
    Quote Originally Posted by Ackbeet View Post
    N=N_{0}\,2^{-t/d} will work just as well. Just plot

    \log_{2}(N) on the vertical axis, and t on the horizontal. Theory:

    \dfrac{N}{N_{0}}=2^{-t/d}, so

    \log_{2}\left(\dfrac{N}{N_{0}}\right)=\log_{2}(N)-\log_{2}(N_{0})=-t/d. So you get

    \log_{2}(N)=\log_{2}(N_{0})-t/d.

    Since all exponentials are essentially the same, this will work out to much the same thing as my other idea.
    So, for the second N_{0} equation where the unlike the first the y-values are increasing, we would have to introduce log here? Or is this for deriving the equation from the graph? I am currently using a graphing software and even though I have the exact function which is: 26.368233*0.62675604^x I don't have the slightest clue of putting this in exponential equation form.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Increasing:

    \dfrac{N}{N_{0}}=2^{t/d}.

    Decreasing:

    \dfrac{N}{N_{0}}=2^{-t/d}.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Sep 2010
    Posts
    100
    Quote Originally Posted by Ackbeet View Post
    Increasing:

    \dfrac{N}{N_{0}}=2^{t/d}.

    Decreasing:

    \dfrac{N}{N_{0}}=2^{-t/d}.
    Thank you for all the help so far, I just have one more problem, how would I go about deriving an exponential equation from the Graph? I do have the general knowledge of using a regular equation: y=mx+b. Unfortunately, I haven't been taught at all how to put logarithmic and exponential graphs in equation form.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Pupil View Post
    Thank you for all the help so far, I just have one more problem, how would I go about deriving an exponential equation from the Graph? I do have the general knowledge of using a regular equation: y=mx+b. Unfortunately, I haven't been taught at all how to put logarithmic and exponential graphs in equation form.
    If you're attempting to fit the data to an equation of the form N = N_0 e^{kt} then you should note that by taking the log of both sides you have \ln (N) = kt + \ln (N_0).

    Therefore you can fit a straight line to a plot of \ln(N) versus t. The gradient of this line gives you the best estimate of k and the vertical intercept gives you \ln (N_0) from which N_0 can be got.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Member
    Joined
    Sep 2010
    Posts
    100
    Quote Originally Posted by mr fantastic View Post
    If you're attempting to fit the data to an equation of the form N = N_0 e^{kt} then you should note that by taking the log of both sides you have \ln (N) = kt + \ln (N_0).

    Therefore you can fit a straight line to a plot of \ln(N) versus t. The gradient of this line gives you the best estimate of k and the vertical intercept gives you \ln (N_0) from which N_0 can be got.
    Thank you for that, but I was looking for a general exponential equation that would best fit the graph.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Thank you for that, but I was looking for a general exponential equation that would best fit the graph.
    Haven't you already been given that? If you think of N=N_{0}\,2^{t/d}, where d is any real number, then you've got the increasing and decreasing cases both covered. Is there something more that you need?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: December 12th 2011, 12:47 AM
  2. Replies: 0
    Last Post: May 13th 2010, 08:44 AM
  3. Replies: 3
    Last Post: February 26th 2010, 03:29 PM
  4. state diagram, state table, etc.
    Posted in the Advanced Math Topics Forum
    Replies: 0
    Last Post: January 28th 2010, 03:50 AM
  5. Need equation that fits data
    Posted in the Math Topics Forum
    Replies: 2
    Last Post: July 22nd 2008, 01:58 AM

Search Tags


/mathhelpforum @mathhelpforum