This paper introduces several new classes of mathematical structures that have close connections with physics and with the theory of dynamical systems. The most general of these structures, called generalized stochastic systems, collectively encompass many important kinds of stochastic processes, including Markov chains and random dynamical systems. This paper then states and proves a new theorem that establishes a precise correspondence between any generalized stochastic system and a unitarily evolving quantum system. This theorem therefore leads to a new formulation of quantum theory, alongside the Hilbert-space, path-integral, and quasiprobability formulations. The theorem also provides a first-principles explanation for why quantum syst...