The development of statistical signals for anticipating changes of state (‘regime shifts’) is an active area of research in ecology [1,2], earth and atmospheric science [3], and biology [4,5]. Causes of regime shifts include noise-induced transitions [6], discontinuities in the underlying dynamics [7], stochastic fluctuations dominated by low frequencies [8], stochastic switching between basins of attraction [9] and dynamic bifurcations (also known as ‘critical transitions’ [1,10]). Of these, only the last two have been studied in detail. While it is widely accepted that (under the right conditions) dynamic bifurcations may be anticipated through the measurement of critical slowing down [1,9], it is generally believed that stochastic switching cannot be anticipated because there is no change in the shape of the potential function [3,9]. Here, I suggest to the contrary that stochastic switching can be anticipated if data are collected at a sufficiently high frequency. The proposed cause for this phenomenon is again slowing down. In this case, however, slowing down is due to the local shape of the potential function, not the proximity of a critical point. Finally, I argue that for these or any other statistics to be used as an early warning signal, one also requires a decision theory to balance the strength of evidence against the costs and benefits of early warnings and false alarms.

Certainly, there is no disagreement that the causes of regime shift are different in the two cases of dynamic bifurcation and stochastic switching. Particularly, in stochastic switching there is no critical point, no change in the shape of the potential function and no change in the eigenvalue of the mean field model (the fast system in Kuehn's sense [10]), all of which are different ways of expressing the same phenomenon. Rather, when stochastic switching occurs, it is because the stationary system undergoes a low probability excursion from one basin of attraction, which we may think of as constituting one quasi-stationary distribution of states, to another.

My argument depends on the premise that this excursion requires climbing and crossing the potential barrier between the different basins of attraction, which is true for stochastic processes that only move among adjacent states, including Gaussian processes (which have continuous sample paths) and birth–death processes (which have lattice sample paths). This is important because one heuristic for understanding the phenomenon of critical slowing down is that the potential function becomes flat as the (fast) system approaches criticality (figure 1). But if a system must climb the potential barrier (as it must in Gaussian processes and birth–death processes), then at some time it will be at the top of the potential barrier, and for a time preceding this it will be in the vicinity of this peak. What portion of the potential function is perceived by the system when it is in the vicinity of the peak depends on the time scale of observation. For some time scale, the potential function will indeed be perceived to be flat (figure 1). Of course, the system will not persist in this transient state for long. Most often, it will drop back into the basin of attraction from which it originated. Nonetheless, if there are stochastic fluctuations on a time scale faster than the characteristic time to return to the steady state (as assumed by the models of Boettiger & Hastings [11,12] and Kuehn [10]), and if these are observable, then it is, in principle, possible to detect local changes in the sample autocorrelation and variance that are very much like the increases in autocorrelation and variance owing to divergence of the variance at a critical point, even though there is no critical point in the sense of a deterministic bifurcation. Put differently, many stochastic systems situated at the top of a potential barrier behave (at some time scale) very much like systems undergoing a dynamic bifurcation in the mean field (figure 1). This argument presupposes the potential function to be continuous and relatively smooth. Thus, counter-examples such as those developed by Hastings & Wysham [13] are not expected to exhibit this phenomenon.

Boettiger & Hastings [11] have presented a set of simulations that demonstrates this phenomenon. The goal of their study was to understand the early warning problem in the context of an evidentiary decision theory. They asked: when is an early warning signal evidence of an approaching state shift? They pointed to the ‘prosecutor's fallacy’: mistakenly equating the probability of an event given some evidence with the probability of evidence given the event. They concluded, correctly, that determining the probability of a state shift from an early warning signal requires knowing the prior probability of the switch occurring, an issue elsewhere described as the base rate problem [14]. That is, the conditional probability that a critical transition is occurring given some early warning signal cannot be calculated without knowing the unconditional probability of transition. This may be illustrated by an example.

From Bayes’s theorem, we have 1

For our example, we assume the signal is perfectly sensitive , that critical transitions occur at rate *p*, and that the false alarm rate is *q* (signal specificity is 1–*q*). What is the probability that the cause of an observed signal is the approach of a critical transition? We rewrite *P*(signal) as *P*(signal|transition)*P*(transition) + *P*(signal|no transition)*P*(no transition) = *p* + *q*(1−*p*). Substituting into equation (1), we have *P*(transition|signal) = *p*/(*p* + *q*(1−*p*)). Clearly, the conditional probability of transition depends on both *p* and *q*. As an example, let *p* = 0.0001 and *q* = 0.02 (false alarms happen in 2% of non-transitions). Substituting, we have . In addition, now suppose that we are mistaken about the false alarm rate: although it really is *q* = 0.01, we think it is *q** = 0.0001. Now, we have . The point of Boettiger & Hastings [11] is that historical studies such as that of Dakos *et al.* [15] select time series for analysis in such a way that *q* is inflated (we think the false error rate is *q** when in fact it is *q*). As a result, we mistakenly conclude that the evidence for a critical transition is high when in fact it is low .

But, I argue, the results of Boettiger & Hastings show something more: they show that systems undergoing stochastic switching can exhibit slowing down. The evidence for this comes not from the argument about *q* and *q** (which is correct), but from the simulations that were performed to show that historical time series selected in this way do in fact have inflated false alarm rates, as may be seen in their figs 2 and 3 [11]. These figures show the result of simulations for two different scenarios in which stochastic switching occurs in bistable ecological models. The first case is an Allee effect, a nonlinear birth–death process in which the birth rate is density-dependent, such as might occur if there is mate limitation at small population sizes. The second case is logistic-like population growth of a prey species subject to predation by a predator exhibiting a saturating functional response, represented as a stochastic system evolving in discrete time. The predator-induced bistability in the second case has sometimes been considered to be a class of Allee effects called predator-induced Allee effects [16].

Boettiger & Hastings sought to ‘test whether selecting systems that have experienced spontaneous transitions could bias the analysis towards false-positive detection of early warning signals’ (p. 4737 of [11]). Accordingly, they selected simulated sample paths conditional on subsequent stochastic switching. They then selected a window ending just before the switch occurred, calculated variance and autocorrelation coefficients in a moving window of half the length of the time series, and computed Kendall's *τ* statistic for the correlation between variance or autocorrelation and time elapsed during the pre-switch interval [12]. Their figs 2 and 3 in [11] show that the distribution of Kendall's *τ* for intervals of the sample path obtained in this conditional way (i.e. biased to be close to the top of the potential barrier) were different from those computed in the same way but selected unconditionally. These results can be further analysed by performing a Wilcoxon rank sum test for a difference of means (a test of the hypothesis that Kendall's *τ* for time series conditionally selected to go over the potential barrier are greater than for unconditionally selected time series) and by computing the receiver–operator characteristic (ROC), a common device for evaluating the performance of a binary classifier. In our case, the ROC curve shows the trade-off between false alarms (false-positive rate) and sensitivity (true-positive rate) of the early warning statistic as the conservatism of the early warning signal is varied. The integrated area under curve (AUC) provides a measure of the ability of Kendall's *τ* to discriminate those trajectories that did switch from those that did not. An AUC of 1.0 corresponds to a signal exhibiting perfect sensitivity and perfect specificity, whereas an AUC of 0.5 is equivalent to random guessing with a fair coin. Neither of these tests concerns the estimation of the probability that the system will in fact undergo a stochastic switch, but both indicate, unequivocally, that in both models the stochastic switching is preceded by a period of slowing down (figure 2).

I suggest that these simulation results are also evidence that early warning signals may be exhibited before a stochastic switch. Indeed, these results show that the ability to anticipate stochastic switching applies to an even larger class of systems than I argued for initially. In the first case, the model for the Allee effect, the model does not exhibit any stochastic fluctuations on a time scale faster than the time scale of the dynamics. (The stochastic fluctuations in this case are caused by demographic stochasticity, which occur on the same time scale as the change of state. The state of the system is unchanging in the time between demographic events.) In the second case, the model for the predator-induced Allee effect, there is no smooth potential.

This interpretation of these results is consistent with the point of Boettiger & Hastings [11] that a statistical indication must avoid the prosecutor's fallacy if the indicator is to be interpreted as evidence that a regime shift is probable (say, more probably than not), but expands the implications of their study, particularly by showing that such stochastic switching can indeed be anticipated, contrary to Ditlevsen & Johnsen [9]. Importantly, Boettiger & Hastings (p. 4737 of [11]) anticipate this interpretation:
It seems tempting to argue that this bias towards positive detection in historical examples is not problematic—each of these systems did indeed collapse; so the increased probability of exhibiting warning signals could be taken as a successful detection. Unfortunately, this is not the case. At the moment the forecast is made, these systems are not likely to transition, because they experience a strong pull towards the original stable state.

But this confuses the phenomenon (slowing down near the potential barrier), the evidentiary problem (how much evidence is there of an approaching state shift?) and the decision-making problem (how should I act, given the evidence that I have?). In my view, to go from the existence of the phenomenon to a decision to act requires (i) that we know the positive predictive value (which requires knowing the base rate, which depends on the mean field and the noise, and, so far as I know, cannot be calculated in any generic or non-parametric way), and (ii) a decision theory saying what are the costs of false alarms and failure to issue alarms, and how these should be balanced. Particularly when these costs are not equal, such as in catastrophic shifts in ecosystems or the Earth's climate system, it may be desirable to issue an early warning even if the odds of the switch occurring are considerably less than one (cf. [17]).

## Footnotes

The accompanying reply can be viewed at http://dx.doi.org/10.1098/rspb.2013.1372.

- Received March 18, 2013.
- Accepted April 15, 2013.

- © 2013 The Author(s) Published by the Royal Society. All rights reserved.