  The dynamics of species' densities depend both on internal and external
variables. Internal variables include frequencies of individuals exhibiting
different phenotypes or living in different spatial locations. External
variables include abiotic factors or non-focal species. These internal or
external variables may fluctuate due to stochastic fluctuations in
environmental conditions. We prove theorems for stochastic persistence and
exclusion for stochastic ecological difference equations accounting for
internal and external variables. Specifically, we use a stochastic analog of
average Lyapunov functions to develop sufficient and necessary conditions for
(i) all population densities spending little time at low densities, and (ii)
population trajectories asymptotically approaching the extinction set with
positive probability. For (i) and (ii), respectively, we provide quantitative
estimates on the fraction of time that the system is near the extinction set,
and the probability of asymptotic extinction as a function of the initial state
of the system. Furthermore, we provide lower bounds for the expected time to
escape neighborhoods of the extinction set. To illustrate the applicability of
our results, we analyze stochastic models of evolutionary games, Lotka-Volterra
dynamics, trait evolution, and spatially structured disease dynamics. Our
analysis of these models demonstrates environmental stochasticity facilitates
coexistence of strategies in the hawk-dove game, but inhibits coexistence in
the rock-paper-scissors game and a Lotka-Volterra predator-prey model.
Furthermore, environmental fluctuations with positive auto-correlations can
promote persistence of evolving populations and persistence of diseases in
patchy landscapes. While our results help close the gap between the persistence
theories for deterministic and stochastic systems, we highlight challenges for
future research.
