Results 1 to 5 of 5

Math Help - large numbers in log space -- dividing summations

  1. #1
    Newbie
    Joined
    Aug 2011
    Posts
    4

    Talking large numbers in log space -- dividing summations

    Hi, I originally posted this is Calculus (it was my first post, probably a mistake, maybe still a mistake to post here, I am not sure). I tried to get help in Chat, but it wasn't coming up, and I tried to post in the Questions/Comments section, but I wasn't allowed. So, I realize I am somewhat double posting here, so I apologize.

    Let's say I have:

    N = Σ Σ p^a * q^b ...for p = 0 to 1 (non-inclusive), q = 0 to 1 (non-inclusive), and a = very large number, b = very large number
    D = Σ r^c ...for r = 0 to 1 (non-inclusive), and c = very large number

    and, I want to take N/D

    However, because a,b,c are all very large, I'd like to take these into logarithms in order to make it tractable on a computer.

    So, I can do:

    N = Σ Σ e^(a*log(p) + b*log(q))
    D = Σ e^(c*log(r))

    and, then I can take N/D

    This is equivalent, but still does not solve the computer limitation problem, since I have to take e^ before dividing N and D, and the computer just says those are 0

    So, I'd like to do something like the following, but it doesn't seem right. This is where I am getting hung up

    N/D = Σ Σ Σ e^(a*log(p) + b*log(q) - c*log(r))

    This doesn't seem to be equivalent. In fact, I know it's not equivalent, because you can't divide summations in that way. Is there a better way?

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: large numbers in log space -- dividing summations

    Quote Originally Posted by timfoea View Post
    Hi, I originally posted this is Calculus (it was my first post, probably a mistake, maybe still a mistake to post here, I am not sure). I tried to get help in Chat, but it wasn't coming up, and I tried to post in the Questions/Comments section, but I wasn't allowed. So, I realize I am somewhat double posting here, so I apologize.

    Let's say I have:

    N = Σ Σ p^a * q^b ...for p = 0 to 1 (non-inclusive), q = 0 to 1 (non-inclusive), and a = very large number, b = very large number
    D = Σ r^c ...for r = 0 to 1 (non-inclusive), and c = very large number
    would you like to reword this, as it is these seem to be empty summations.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Aug 2011
    Posts
    4

    Re: large numbers in log space -- dividing summations

    I would like to approximate/compute:

    \frac{\sum_{p=0.01}^{.99} \sum_{q=0.01}^{.99} p^a q^b}{\sum_{p=0.01}^{.99} r^c}

    where a,b,c are very large constants, (e.g., a = 10000, b = 20000, c = 30000), and I step the summations by, say, 0.01

    thus, i use log space so this is tractable on a computer:

    \frac{\sum_{p=0.01}^{.99} \sum_{q=0.01}^{.99} e^{a \log p + b \log q}}{\sum_{p=0.01}^{.99} e^{c \log r}}

    the problem is that in order to do the final division, i have to take e^{n} where n is a very small number for both the numerator and denominator, and thus the computer considers this to be 0. I would like to be able to do the all the math in log space before having to come out of it with e^{n}

    Does that make sense?
    Last edited by timfoea; August 11th 2011 at 12:03 PM. Reason: step info
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Mar 2010
    Posts
    280

    Re: large numbers in log space -- dividing summations

    May be you could change this sum to Riemann integral.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: large numbers in log space -- dividing summations

    Quote Originally Posted by timfoea View Post
    I would like to approximate/compute:

    \frac{\sum_{p=0.01}^{.99} \sum_{q=0.01}^{.99} p^a q^b}{\sum_{p=0.01}^{.99} r^c}

    where a,b,c are very large constants, (e.g., a = 10000, b = 20000, c = 30000), and I step the summations by, say, 0.01

    thus, i use log space so this is tractable on a computer:

    \frac{\sum_{p=0.01}^{.99} \sum_{q=0.01}^{.99} e^{a \log p + b \log q}}{\sum_{p=0.01}^{.99} e^{c \log r}}

    the problem is that in order to do the final division, i have to take e^{n} where n is a very small number for both the numerator and denominator, and thus the computer considers this to be 0. I would like to be able to do the all the math in log space before having to come out of it with e^{n}

    Does that make sense?
    For a "very large":

    \sum_{k=1}^{99} \left( k \times 0.01 \right)^a \approx 0.99^a

    That is all the terms in the summation are negligable compared to the largest.

    But I doubt that what you posted is the real question, which is what you should have posted.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. law of large numbers
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: February 12th 2011, 11:39 AM
  2. dividing large numbers
    Posted in the Algebra Forum
    Replies: 3
    Last Post: May 9th 2010, 02:30 AM
  3. Weak law of large numbers and CF
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: February 11th 2010, 11:10 AM
  4. Strong Law of Large Numbers
    Posted in the Advanced Statistics Forum
    Replies: 3
    Last Post: November 10th 2009, 11:04 PM
  5. Law of Large Numbers
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: August 2nd 2009, 11:53 PM

Search Tags


/mathhelpforum @mathhelpforum