powered by
Computes the classical Sanov upper bound:
sanovprob(Q, P, n)
A numeric upper bound.
Observed empirical distribution.
True distribution.
Sample size.
$$P(Q_n \approx Q) \le \exp\{-n \, KL(Q \| P)\}$$
where Q is the empirical distribution and P is the true distribution.