There has recently been a resurgence of interest in stochastic processes in biology, driven in part by advances in imaging methods such as single particle tracking and by the observation that the number of molecules (genes, mRNA, proteins) involved in gene expression, biochemical signaling networks, and transport processes can be relatively small. One of the major consequences of molecular noise is the occurrence of *noise-induced biological switching* at both the genotypic and phenotypic levels. For example, individual gene regulatory networks can switch between graded and binary responses, exhibit translational/transcriptional bursting, and support metastability (noise-induced switching between states that are stable in the deterministic limit). If random switching persists at the phenotypic level then this can confer certain advantages to cell populations growing in a changing environment, as exemplified by bacterial persistence in response to antibiotics. Other common examples of noise-induced switching include the opening and closing of ion channels that mediate cellular communication, and bidirectional motor-driven transport.

In this talk I review some of my recent work on the mathematics of stochastically switching systems. I begin by considering the theory of *stochastic hybrid systems*, also known as *piecewise deterministic Markov processes* (PDMPs). These involve the coupling between a piecewise deterministic dynamical system (continuous process) and a discrete Markov process. The continuous process could represent the membrane voltage of a neuron, the position of a molecular motor on a filament track, or the concentration of proteins synthesized by a gene. The corresponding discrete process could represent the state of an ion channel, the velocity state of the motor, or the activation state of the gene. I describe how a combination of large deviation theory, path-integrals and asymptotic methods can be used to study noise-induced switching, and illustrate the theory with examples in genetics and neurophysiology. In particular, I show how optimal paths of escape minimize a "classical'' action whose Hamiltonian is given by the Perron eigenvalue of a hybrid linear operator. I then turn to the general problem of analyzing a population of molecules or cells subject to a common *randomly switching environment*. The environmental variable(s) could represent randomly switching (stochastically gated) boundaries or some global environmental stimulus. First, I present a general result concerning statistical correlations between gene networks induced by a common switching environment. In particular, I show how the correlations depend on higher-order statistics of the environment. Second, I consider how to analyze diffusion processes in a bounded domain with either randomly switching exterior boundary conditions or stochastically-gated internal barriers such as gap junctions. The fact that the diffusing particles are all subject to the same fluctuating environment means that statistical correlations arise at the population level. That is, solving the diffusion equation for a particular realization of the stochastically switching boundary conditions yields a population density that depends on the particular realization. Hence, the density is a random field whose moments evolve according to a hierarchy of deterministic PDEs.