# Saddlepoint approximation for sums of negative binomials in Stan

**URL:** <https://discourse.mc-stan.org/t/saddlepoint-approximation-for-sums-of-negative-binomials-in-stan/9331>\
**Category:** Publicity\
**Created:** [June 20, 2019, 12:41pm UTC](https://discourse.mc-stan.org/t/saddlepoint-approximation-for-sums-of-negative-binomials-in-stan/9331 "2019-06-20T12:41:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinmodrak](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/martinmodrak/32/133_2.png) [@martinmodrak](https://discourse.mc-stan.org/u/martinmodrak)\
**Post date:** [June 20, 2019, 12:41pm UTC](https://discourse.mc-stan.org/t/saddlepoint-approximation-for-sums-of-negative-binomials-in-stan/9331/1 "2019-06-20T12:41:55Z")

</div>

I wrote a blogpost on approximating the density of general sums of random variables with focus on negative binomials. Validated in Stan using SBC. Long story short: simple approximation by matching moments works very well. Still I hope there is something to be learned and the saddlepoint method is IMHO cool.

[https://www.martinmodrak.cz/2019/06/20/approximate-densities-for-sums-of-variables-negative-binomials-and-saddlepoint/](https://www.martinmodrak.cz/2019/06/20/approximate-densities-for-sums-of-variables-negative-binomials-and-saddlepoint/)

---

<div class="post-metadata">

**Author:** ![bnicenboim](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bnicenboim/32/21197_2.png) [@bnicenboim](https://discourse.mc-stan.org/u/bnicenboim)\
**Post date:** [July 3, 2020, 3:47pm UTC](https://discourse.mc-stan.org/t/saddlepoint-approximation-for-sums-of-negative-binomials-in-stan/9331/2 "2020-07-03T15:47:10Z")

</div>

Hi, I just wanted to say that this post is great!  
In my case ([Using integration to fit the difference of gamma distributed random variable](https://discourse.mc-stan.org/t/using-integration-to-fit-the-difference-of-gamma-distributed-random-variable/16039/14)) , I actually found the saddle point analytically (well wolfram alpha did), and then it obviously goes super fast :), and it was a much more stable than the real approximate solution by integration.
