Analytical approximation for logit-normal-binomial distribution As I understand, there is no closed form expression for
$$f(x, \mu, \sigma) = \int_0^1 p^{(x-1)}(1-p)^{n-x-1}\exp\left(-{(\text{logit}(p) -\mu)^2 \over 2\sigma^2}\right)dp.$$
Is it possible to obtain an analytical approximation for this?
 A: Here's what you need to do:


*

*Decide on an interpolator. I suggest a tricubic b-spline, but finding software for this is going to be painful. To understand this interpolant, start in Rainer Kress's Numerical Analysis which introduces it in 1D, learn about the bicubic b-splines in 2D, and then you'll be able to understand the tricubic. If you don't like tricubic b-splines, as an alternative, you might also be able to use multivariate Chebyshev series.

*Interpolators require data at a particular geometry of points; figure out what those points are for your given interpolator and then evaluate the integral by quadrature at each point. (For tricubic b-splines it's easy: A uniform grid.) It looks like tanh-sinh quadrature is probably the best for this integral but Gaussian or Gauss-Kronrod will also work fine.
Another alternative is just to use quadrature to evaluate $f$ at any point $(x, \mu, \sigma)$, and ditch the interpolator. This will reduce the speed by a factor of 10 to 100, but since a quadrature takes about 500ns-1$\mu$s, you might not really care.
If you've never done anything like this get ready for some effort shock.
