Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Discrete Gaussian Summation

  1. Apr 29, 2010 #1
    If we are given a gaussian function which is continuous in x we know that:


    What if the gaussian function is discrete in x?
    What is the result of

    [tex]\sum_{x=-\infty}^{+\infty}e^{-x^2} = \\???[/tex]

    where [itex]x\in \mathbb{Z}[/itex]
    Last edited: Apr 29, 2010
  2. jcsd
  3. Apr 29, 2010 #2
    In the first equation you are missing the "dx", though the equation's meaning is still obvious so this is not such a problem.

    In the second equation it is much worse. You'haven't specified your domain properly: x varies from -inf to +inf but what values does it take in between? If you were to integrate that you wouldn't know where to start. Something more meaningful might be sum(for x = all integers) of 1*e^(-x^2) , then you will get an approximation to the area by sampling the Gaussian every 1 unit along the x-axis.
  4. Apr 29, 2010 #3
    Sorry, you are right about the integral. I forgot the dx. I corrected the original post now.
    For the discrete case, I specified how x varies but it was wrong, I should have written

    x\in \mathbb{Z}

    However, the main point of my thread was basically that I wanted to know if the summation [tex]\sum_{x\in \mathbb{Z}}e^{-x^2}[/tex] converges to some value, and what value.
    Any hint?
  5. Apr 29, 2010 #4
    That summation doesn't converge, it is a number.

    If you keep reducing the interval size it will converge to sqrt(pi) because that is effectively taking the limit "interval size" ---> dx.
  6. Apr 29, 2010 #5
    I am not convinced. Can you prove that?
    The numbers in that serie become arbitrarily small when |z| increases.
    Intuitively the summation should converge to some value, instead you suggest that the summation results in a [itex]+\infty[/itex]. Imho it is quite a counter-intuitive statement which needs a proof.
  7. Apr 29, 2010 #6
    The sum is e^(-x^2) for all integer values of x. This is e^(-0^2) + 2*e^(-1^2) + ...

    It has a numerical value (and nowhere did I suggest it is +inf). Whether you can or can't reach that value is a different question which you did not ask.

    I am trying to interpret what your question is, because it is not being asked clearly, but it seems I am not being successful so far.
  8. Apr 29, 2010 #7
    Ok...sorry for misinterpreting your answer. You are indeed succeeding in helping me.
    In fact you said that that summation must have a numerical value: I am just interested in knowing what is that numerical value.

    EDIT: I found out that apparently a Normal-distribution (continuous) approximates a Poissonian-distribution (discrete). Since our function is indeed a discretized gaussian, one could deduce that that summation should be equal to the limit of the cumulative distribution of some Poissonian for x->+inf up to some scalar.
    I would bet it equals [itex]\sqrt{\pi}[/itex] but I am not sure.

    EDIT #2: I tried to compute that summation with Matlab with [itex]x\in[-a,a][/itex] with very large values for a and it always gives [itex]\approx \sqrt{\pi}[/itex]
    Last edited: Apr 29, 2010
  9. Dec 30, 2010 #8
    I think you are not asking the right question. There is no variance term in this expression. The standard deviation (the square root of the variance) being different would change the nature of the problem, because it is sampled discretely and the ratio of the sample frequency to the standard deviation would change what the function looks like. Consider this:

    LaTeX Code: \\sum_{n=-\\infty}^{+\\infty}e^{-n^2/p^2}

    (well darn, typing that worked for the first guy). I mean sum from -infinity to +infinity over all integers n of e^(-(n/p)^2)

    Note that I am not implying that p is the "variance". This isn't a probability density function after all, since it clearly adds to something greater than 1: the component at n=0 is 1 regardless of p, and the other terms account for something. I'm just saying it is rather like the variance parameter in a regular gaussian. But that leads to an observation: if p is very, very, very small, then the terms in this sum will all be almost 0 if n is anything other than 0. The sum will approach the value of 1. This is in direct contradiction to what happens with a continuously defined gaussian - the integral would approach 0. So whatever expression this sucker equals, you would expect it to either equal 1 if you plug in p=0 or at least equal it in limit. On the other hand, it will clearly diverge as p tends to infinity. I tried to solve it and I could not. I was about to take the fourier transform (since the fourier transform of a gaussian is a gaussian) and add together an infinite series of aliased copies of itself ever more frequency-shifted over (which is what happens to the fourier transform when you sample something e.g. multiply the original signal by a series of uniformly spaced samples, the transform gets convolved with a series of uniformly spaced samples) but then I just got an integral of such a series and that method just went around in circles.

    I suspect that there is no closed form solution to this, but I could just be hard-headed and arrogant to conclude that if I can't do it, it can't be done, even though I can't prove that it can't be done. Maybe P=NP too.
  10. Jan 2, 2011 #9
    The sum doesn't have a simple closed form but can be expressed as a theta function, e.g.

    [tex]\sum_{n=-\infty}^{\infty}e^{-n^2} = \vartheta_3(0,e^{-1})[/tex]

    The value is close to sqrt(pi) because it can be written as a trapezoidal approximation of the integral of exp(-1/x^2) with unit steps; in fact, using steps of size 1/m we have

    [tex]\frac{1}{m}\vartheta_3(0,e^{-1/m^2})\approx\sqrt{\pi}(1+2e^{-\pi^2 m^2})[/tex]

    which explains why the approximation is so accurate (3 decimal places for m=1, 100 dp for m=5).
  11. Feb 19, 2011 #10
    Thanks bpet.
    I missed your post as I didn't get any email notification!

    Yours is a great observation! it's probably what I was looking for.
    Unfortunately I am not very familiar at all with number theory (and theta functions).

    I'd like to ask you two questions:

    1) What definition did you use for [itex]\vartheta_3[/itex] ? I found some that look different.

    2) most important: How did you obtain the last approximation? I am still missing how you managed to compute the summation [tex]\frac{1}{m}\vartheta_3(0,e^{-1/m^2})[/tex] from -inf to +inf.

    Thanks a lot!
  12. Feb 21, 2011 #11
    Ok, it was a while ago but I think the theta function is defined by a one-sided infinite sum so the double-infinite sum can be expressed in terms of it by symmetry. The approximation would have been from an asymptotic expansion either from Mathematica or the functions.wolfram site - sorry can't remember which.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook