An inverse of Sanov's theorem

Let Xk be a sequence of i.i.d. random variables taking values in a finite set, and consider the problem of estimating the law of X1 in a Bayesian framework. We prove that the sequence of posterior distributions satisfies a large deviation principle, and give an explicit expression for the rate function. As an application, we obtain an asymptotic formula for the predictive probability of ruin in the classical gambler's ruin problem.