This section will be devoted to the statistics of the fraction of time spent by the walker at a given site or in a given subset. As in the previous one, the probability distribution of the quantity of interest stems from the features of the asymptotic decay of return and first-return PDFs. We shall describe (or simply mention) any other necessary tool from time to time, as always.

#### 3.3.1. Occupation Time of the Origin

In the discrete-time formalism, as we have already discussed in

Section 3.1.1, the particle can not stand still on a site and so considering the occupation time of a single site is equivalent to talk about the number of visits to the same. Thanks to the Darling-Kac theorem [

43], a remarkable mathematical result for Markov processes, we know [

29,

42] that the number of visits to the starting point (properly rescaled by the average taken over several realizations) has a Mittag-Leffler distribution of index

$\rho $ as limiting distribution. We would emphasize that spatial inhomogeneities cause non-Markovianity for the original process, but now we are focusing on returns to the origin that are renewal events. Thus you have a sequence of i.i.d. first-return times and loss of memory is ensured in each case.

Obviously, this result is still true for waiting-time distributions with finite mean: even if the physical clock is running when the particle rests on a site and the internal clock stops, the microscopic time scale gives us the constant of direct proportionality necessary to move from the number of steps to the correct time measure, which has the same distribution, as a consequence.

In the non-trivial continuous-time translation, instead, what we need to apply is Lamperti theorem [

44]. It is a statement involving two-state stochastic processes (being or not at the origin in our case). More precisely we deal with its continuous-time generalization, which has been discussed in many works, such as References [

45,

46,

47,

48,

49]. Here we provide the final formula, that is the starting point of our analysis: for a detailed proof refer to Reference [

47], for instance. Essentially, we will conclude that, even if the Mittag-Leffler statistics is mapped to a Lamperti distribution, the index

$\rho $ of the discrete-time formalism is always replaced by the product

$\alpha \rho $ characterizing the asymptotic expansion of the first-return PDF. In particular, in order to preserve the ergodic property of the discrete-time version (

$\rho =1$) we have to consider a waiting-time distribution with finite mean (

$\alpha =1$): in this way, the Lamperti distribution collapses to a Dirac delta function on the mean value of the occupation time.

Before formalizing the theorem, let us define some notation. We consider a stochastic process described by a set of transitions between two states (that we call

$in$ and

$out$) and we consider arrivals at the origin and departures as events. Time periods between events are i.i.d. random variables, with PDFs

${\psi}_{in}\left(t\right)\equiv \psi \left(t\right)$ and

${\psi}_{out}\left(t\right)\equiv f(1,0,t)$ respectively, that are the alternating distributions of the renewal process. In fact, the time spent on state

$in$ is precisely the waiting time on a site, whereas the time spent outside the origin coincides with the first-return time to the origin starting from

${j}_{0}=1$ because, thanks to the nearest-neighbour structure, when you leave the origin you land on ±1 and

$f({j}_{0},j,t)=f\left(\right|{j}_{0}|,j,t)$ by symmetry, as witnessed by Equation (

37). Moreover we can notice that

${\psi}_{in}$ and

${\psi}_{out}$ are connected by means of the first-return PDF, in fact:

We assume that at

$t=0$ the particle occupies the origin (namely it is in state

$in$) and we denote the total times spent by the walker in the two states up to time

t by

${T}_{in}$ and

${T}_{out}$, associated with the PDFs

${f}_{t}^{in}\left({T}_{in}\right)$ and

${f}_{t}^{out}\left({T}_{out}\right)$. Continuous-time Lamperti theorem tells us that the double Laplace transforms of these quantities are:

For the moment we focus on the non-ergodic regime

$\u03f5\le \frac{1}{2}$. First of all, let us choose a finite-mean waiting-time distribution, which constitutes a useful check. Clearly

${\widehat{\psi}}_{in}\left(s\right)=\widehat{\psi}\left(s\right)\sim 1-\tau s$ and we know that

$\widehat{f}\left(s\right)\sim 1-{\tau}^{\rho}{s}^{\rho}L\left(\frac{1}{\tau s}\right)$: having different asymptotic time decays,

${\widehat{\psi}}_{out}$ is ruled by the slower one, namely

${\widehat{\psi}}_{out}\left(s\right)\sim \widehat{f}\left(s\right)$ (and indeed

${C}_{\u03f5}\left(1\right)=1$ as you can see from Equation (

37)). By substituting in Equation (

46), we immediately get:

and by expanding in powers of

u, one can compute the moments of order

k of

${T}_{in}\left(t\right)$ in the time domain:

This suggests to us that if we consider the rescaled random variable:

then we asymptotically recover the moments of the Mittag-Leffler function of index

$\rho $, as we said previously. We would point out that

$\zeta $ is not directly the fraction of time spent at the origin and this observation is consistent with the fact that, in addition to the presence of an infinite recurrence time,

$f\left(t\right)$ decays more slowly with respect to

$\psi \left(t\right)$: without a properly scaling,

${T}_{in}\left(t\right)$ is negligible with respect to

${T}_{out}\left(t\right)$ and, from a mathematical point of view, it follows a Dirac delta with mass at the origin, namely all moments converge to 0.

If now, instead, we take waiting-time distributions with infinite mean, we can not find out any scaling function in such a way that the rescaled occupation time admits a limiting distribution. In fact, recalling that

$\widehat{\psi}\left(s\right)\sim 1-b{s}^{\alpha}$ and

$\widehat{f}\left(s\right)\sim 1-{b}^{\rho}{s}^{\alpha \rho}L\left(\frac{1}{b{s}^{\alpha}}\right)$, we similarly obtain:

Let us move on to the discrete-time ergodic regime:

$\u03f5>\frac{1}{2}$ and

$\rho =1$. This time

$\widehat{\psi}\left(s\right)$ and

$\widehat{f}\left(s\right)$ are of the same order, since they possess the same asymptotic exponent and the slowly-varying function decays to a constant

L. As a consequence, they both determine the behaviour of:

according to

${C}_{\u03f5}\left(1\right)=\frac{1}{2\u03f5}$.

By exploiting again Equation (

46), in the limit

$s\to 0$ we have:

which may be inverted (see Reference [

50] as in the original paper [

44]) and leads to the Lamperti probability density function for the fraction of time

$\frac{{T}_{in}\left(t\right)}{t}$ spent at the origin (ergodicity breaking):

where

$a=L-1$ is the asymmetry parameter and

$\eta :={lim}_{t\to \infty}\mathbb{E}\left(\frac{{T}_{in}\left(t\right)}{t}\right)=\frac{1}{L}$. In addition, we notice that:

and so the expected value of the fraction of continuous-time spent at the origin coincides with the inverse mean recurrence time of the discrete-time random walk. But, thanks to ergodicity, we have also a stationary distribution

${\pi}_{0}$ at the origin for

$\u03f5>\frac{1}{2}$ [

29] that, by means of Birkhoff ergodic theorem, satisfies:

and in conclusion:

where

${\pi}_{out},{\pi}_{in}$ are the stationary measures of the subsets associated with the two states, according to the known results in the literature [

46,

47,

48,

49].

As a last comment, we turn back again to the finite-mean case. As expected, when

$\alpha =1$ we get:

namely a Dirac delta centered at the expected value

$\eta $.

#### 3.3.2. Occupation Time of the Positive Semi-Axis

In the non-ergodic (for the discrete-time random walk) regime, since

$\frac{{T}_{out}\left(t\right)}{t}\to 1$ given that the fraction of time spent at the origin is negligible (as we discussed above, after Equation (

50)), we have a system with a state space split into two subsets,

${\mathbb{Z}}_{+}$ and

${\mathbb{Z}}_{-}$, that can communicate only passing through the recurrent event, the origin, that is also the initial condition. Thanks to symmetry,

${\psi}_{{\mathbb{Z}}_{+}}\left(t\right)={\psi}_{{\mathbb{Z}}_{-}}\left(t\right)\sim {\psi}_{out}\left(t\right)$ and the limiting distribution of the fraction of time spent in each subset is the symmetric Lamperti PDF of index

$\alpha \rho $,

${G}_{\frac{1}{2},\alpha \rho}^{\prime}$, which for finite-mean waiting times consistently boils down to

${G}_{\frac{1}{2},\rho}^{\prime}$ (by directly applying the original Lamperti statement [

44]).

In the ergodic regime, instead, when you split the state

$\mathbb{Z}\backslash \left\{0\right\}$ in two symmetric subsets, you must in any case look at a three-state process: although the mean recurrence time is still infinite, the fraction of time spent at the origin has its weight without any rescaling, see Equation (

55). But by symmetry you know also that

$\frac{{T}_{{\mathbb{Z}}_{+}}\left(t\right)}{t}=\frac{1}{2}\frac{{T}_{out}\left(t\right)}{t}$: as a consequence, you can easily conclude that the Lamperti distribution is

${G}_{{\eta}_{+},\alpha}^{\prime}$ with

${\eta}_{+}=\frac{{\eta}_{out}}{2}=\frac{L-1}{2L}$. In fact, you can retrace previous steps for the asymptotic expansion of

${\widehat{f}}_{s}^{out}\left(u\right)$ in Equation (

46) or equivalently observe that

$\mathbb{E}\left[\frac{{T}_{out}\left(t\right)}{t}\right]=1-\mathbb{E}\left[\frac{{T}_{in}\left(t\right)}{t}\right]=\frac{L-1}{L}=\frac{1}{2\u03f5}$ and the exponent

$\alpha $ remains unchanged when you move from

${\psi}_{in}\left(t\right)$ to

${\psi}_{out}\left(t\right)$. And here too, the asymmetry parameter could be written as:

By way of conclusion, as in the previous section, if you set

$\alpha =1$ then you obviously recover the ergodicity in the continuous-time model, since you get a Dirac delta with mass at

${\eta}_{+}$. Apparently this time there is a little difference with respect to the discrete-time random walk (see Reference [

29]): the degenerate distribution is no longer centered at

$\frac{1}{2}$ (obtained immediately from Lamperti theorem [

44]), as expected by symmetry. But this value was due to the convention [

44] of counting the visits at the origin

$\left(\frac{{T}_{in}\left(t\right)}{t}\nrightarrow 0\right)$ according to the direction of motion. So, if we consider, in addition to the occupation time of the positive axis, half the time spent at the origin (in the long-time limit), then we correctly get a mass at

${\eta}_{+}+\frac{\eta}{2}=\frac{1}{2}$. This comment allows us to highlight another aspect of the ergodicity breaking: when

$\alpha <1$, on the contrary, the choice of the convention to be adopted is completely irrelevant to the final result, since the mean return time to the origin is infinite, supporting the asymmetry of the distribution.