Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.


$g(u; x,s) = \dfrac{1}{s\sqrt{2\pi}} \exp\left(-\dfrac{1}{2} \left(\dfrac{x-u}{s}\right)^2\right)$

Where $x,s$ are parameters

I'm looking for a closed-form solution or approximation of:

$f_1(k) = \dfrac{\sum\limits^{r=+\infty}_{r=-\infty} rg(k+rD)}{\sum\limits^{r=+\infty}_{r=-\infty} g(k+rD)}$


$f_2(k) = \dfrac{\sum\limits^{r=+\infty}_{r=-\infty} r^2g(k+rD)}{\sum\limits^{r=+\infty}_{r=-\infty} g(k+rD)}$


$D > 0$

$0 < s < D$

$\dfrac{-D}{2} < k < \dfrac{D}{2}$

$\dfrac{-D}{2} < x < \dfrac{D}{2}$

In practice, the summation converges very quickly, so $r$ is summed from at most -10 to 10.

Background: this resulted from working with wrapped gaussians, where I need to solve this equation for $k$:

$\sum\limits^{N}_{n=0}p(n)\left(x_n - k - D \frac{\sum\limits^{\infty}_{r=-\infty} rg(k+rD;x_n,s_n)}{\sum\limits^{\infty}_{r=-\infty}g(k+rD;x_n, s_n)} \right) = 0$

If the nastiness with last fraction of sums wasn't there, it'd be super easy.

share|improve this question
Why are you using quantities that look like moments of Gaussians assuming that the values are integers, even though the Gaussian distribution is continuous instead of integer-valued? –  user2566092 Sep 13 '13 at 20:45
This resulted from working with: en.wikipedia.org/wiki/Wrapped_normal_distribution –  proteneer Sep 13 '13 at 20:54
add comment

1 Answer

Since you are dealing with series instead of integrals, and $e^{-z^2}$ approaches $0$ very very quickly as $|z|$ increases, and given your ranges on $D,k,x$ in terms of $s$, I'm pretty sure you will find no significantly faster approximation other than to simply evaluate the series for $r \in \{-R,-R+1,\ldots,-1,0,1,\ldots,R-1,R\}$ for some small choice of $R$. The only question is how many terms in the series of $e^{-z^2}$ you need to get a good approximation of something like $r^2 g(k+rD)$ for a given choice of $r$, but it should be very few (like $10$). Let me know if you would like estimates of the rates of convergence of your summation ratio quantities in terms of $R$ and the number of terms you use to estimate $e^{-z^2}$, so you know how large to choose to choose these based on how close you want your estimated quantities to be to the true values. But I can already foresee, if you estimate $e^{-z^2}$ using say $10$ terms, and choose $R$ to be no more than $10$, you will already get very, very close answers to the true quantities.

share|improve this answer
I actually do this already, but I was hoping for some approximate expression for $f_1(k)$ and $f_2(k)$ that would be linear in $k$. eg. $f_1(k) = h(x,r,s,D) + ak$, or least have some nice expression for $k$ –  proteneer Sep 13 '13 at 20:59
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.