# Residue expansions and saddlepoint approximations in stochastic models using the analytic continuation of generating functions

Asymptotic residue expansions are proposed for inverting probability generating functions (PGFs) and approximating their associated mass and survival functions. The expansions are useful in the wide range of stochastic model applications in which a PGF admits poles in its analytic continuation. The error of such an expansion is a contour integral in the analytic continuation and saddlepoint approximations are developed for such errors using the method of steepest descents. These saddlepoint error estimates attain sufficient accuracy that they can be used to set the order of the expansion so it achieves a specified error. Numerical applications include a success run tutorial example, the discrete ruin model, the Pollaczek-Khintchine formula, and passage times for semi-Markov processes. The residue expansions apply more generally for inverting generating functions which arise in renewal theory and combinatorics and lead to a simple proof of the classic renewal theorem. They extend even further for determining Taylor coefficients of general meromorphic functions.