  We investigate extinction of a long-lived self-regulating stochastic
population, caused by intrinsic (demographic) noise. Extinction typically
occurs via one of two scenarios depending on whether the absorbing state n=0 is
a repelling (scenario A) or attracting (scenario B) point of the deterministic
rate equation. In scenario A the metastable stochastic population resides in
the vicinity of an attracting fixed point next to the repelling point n=0. In
scenario B there is an intermediate repelling point n=n_1 between the
attracting point n=0 and another attracting point n=n_2 in the vicinity of
which the metastable population resides. The crux of the theory is WKB method
which assumes that the typical population size in the metastable state is
large. Starting from the master equation, we calculate the quasi-stationary
probability distribution of the population sizes and the (exponentially long)
mean time to extinction for each of the two scenarios. When necessary, the WKB
approximation is complemented (i) by a recursive solution of the
quasi-stationary master equation at small n and (ii) by the van Kampen
system-size expansion, valid near the fixed points of the deterministic rate
equation. The theory yields both entropic barriers to extinction and
pre-exponential factors, and holds for a general set of multi-step processes
when detailed balance is broken. The results simplify considerably for
single-step processes and near the characteristic bifurcations of scenarios A
and B.
