  We investigate the effects of dichotomous noise added to a classical harmonic
oscillator in the form of stochastic time-dependent gain and loss states, whose
durations are sampled from two distinct exponential waiting time distributions.
Despite the stochasticity, stability criteria can be formulated when averaging
over many realizations in the asymptotic time limit and serve to determine the
boundary line in parameter space that separates regions of growing amplitudes
from those of decaying ones. Furthermore, the concept of $\mathcal{PT}$
symmetry remains applicable for such a stochastic oscillator and we use it to
distinguish between an underdamped symmetric phase and an overdamped asymmetric
phase. In the former case, the limit of stability is marked by the same average
duration for the gain and loss states, whilst in the the latter case, a higher
duration of the loss state is necessary to keep the system stable. The
overdamped phase has an ordered structure imposing a position-velocity ratio
locking and is viewed as a phase transition from the underdamped phase, which
instead displays a broad and more disordered, but nevertheless, $\mathcal{PT}$
symmetric structure. We also address the short time limit and the dynamics of
the moments of the position and the velocity with the aim of revealing the
extremely rich dynamics offered by this apparently quite simple mechanical
system. The notions established so far may be extended and applied in the
stabilization of light propagation in metamaterials and optical fibres with
randomly distributed regions of asymmetric active and passive media.

Statistical Mechanics