I am a statistical physicist, and I've come across a problem that I don't know how to solve. I believe my issue lies with how to formulate it mathematically. I'd be very grateful for any assistance, as I've really struggled with this.


Suppose we have a system with two states, say $+$ and $-$. The waiting time distribution for switching from either state to the other is an exponential, $\psi\_{\pm}(t) = \kappa\_{\pm} e^{-\kappa\_{\pm} t}$. So $\psi\_{\pm}(t)$ is the probability distribution for the time spent in the $\mp$ state.


Let $X$ be the random variable that we are interested in. If we enter state $+$ at $t = 0$, then its probability distribution at a later time $t$ is $p\_{+}(x, t)$, assuming it does not switch to $-$. Define $p\_{-}(x, t)$ likewise. These distributions depend on the time spent in the state.


I would like the full probability distribution $p(x, t)$, assuming the initial state is known, say $+$. I simply don't know how to write down a general equation for $p(x, t)$...


Again, any help would be wonderful. Thanks!



Probability distribution for two-state system that depends on residence time
first simple case: $p\_+=p\_-\equiv p\_0$ and $\kappa\_+=\kappa\_-\equiv \kappa$; then all you need to know is the time $\delta t$ since the last switching event, which has an exponential distribution, hence:


$$p(x,t)=(1-e^{-\kappa t})^{-1}\int\_0^t d\delta t\; \kappa e^{-\kappa \delta t}p\_0(x,\delta t)$$


now the general case; you'll need to distinguish even from odd number of switching events, and find the distribution $P\_{\rm even}(\delta t)$ of the time $\delta t$ since the last switching event, given that there have been an even number of switches in a time $t$, and similarly for an odd number; the a priori probability that there have been an even or odd number of switches is just given by the Poisson distribution (summing over $n$ even or $n$ odd). The integral over $P\_{\rm even}(\delta t)p\_{+}(x,\delta t)$ and $P\_{\rm odd}(\delta t)p\_{-}(x,\delta t)$ then gives the full answer.


a bit more explicit, still assuming $\kappa\_+=\kappa\_-\equiv \kappa$ for simplicity; it is convenient to set the first switching event at time $0$, so that the number of switching events $m=n+1$ in a time $t>0$ is $\geq 1$; the probability $P\_{m,t}(\delta t)$ that there have been $m=n+1\geq 1$ switching events in a time $t$, while the last switching event was a time $\delta t\in[0,t)$ ago is given by a slight modification of the Poisson distribution,


$$ P\_{m,t}(\delta t)=\frac{1}{(m-1)!}[\kappa(t-\delta t)]^{m-1}\kappa e^{-\kappa t}.$$


summing over all $m=1,2,3,\ldots$ we recover the exponential probability $\sum\_{m}P\_{m,t}(\delta t)=\kappa\exp(-\kappa\delta t)$ we had before, but now we have to distinguish between even $m$ (= odd $n$) and odd $m$ (= even $n$):


$$P\_{\rm even}(\delta t)=\sum\_{m=1,3,5}^{\infty}P\_{m,t}(\delta t)=\cosh[\kappa(t-\delta t)]\kappa e^{-\kappa t}$$


$$P\_{\rm odd}(\delta t)=\sum\_{m=2,4,6}^{\infty}P\_{m,t}(\delta t)=\sinh[\kappa(t-\delta t)]\kappa e^{-\kappa t}$$


and we're done:


$$p(x,t)=(1-e^{-\kappa t})^{-1}\int\_0^t d\delta t\; [P\_{\rm even}(\delta t)p\_+(x,\delta t)
+P\_{\rm odd}(\delta t)p\_-(x,\delta t)]$$


$$\quad\quad=(1-e^{-\kappa t})^{-1}\int\_0^t d\delta t\; \kappa e^{-\kappa t}\left[\cosh[\kappa(t-\delta t)]p\_+(x,\delta t)
+\sinh[\kappa(t-\delta t)]p\_-(x,\delta t)\right]$$


if we take $p\_+=p\_-\equiv p\_0$ we recover the earlier result.


