单物种连续时间生灭马尔可夫过程首达灭绝时间求解问询
Hey, let's walk through how to solve this problem step by step—your setup is a classic linear birth-death process (constant birth rate $\lambda$, death rate proportional to population size $\mu X$), and we need the first-passage time distribution to state 0, starting either from a fixed initial population, or the steady-state Poisson distribution (which we know has parameter $\theta = \lambda/\mu$, since steady state requires $\lambda = \mu \mathbb{E}[X]$). We can also use a truncated state space as an approximation if needed.
1. Fixed Initial Population Size $n$
Starting with a fixed $n$ is a good baseline, since we can build from there to handle the steady-state case. The standard tool here is Laplace transforms—they're perfect for continuous-time Markov process first-passage problems.
Step 1: Define the Laplace Transform
Let $T_n$ be the first time we hit state 0 from $n$, with probability density function $f_n(t)$. Its Laplace transform is:
$$
F_n(s) = \mathbb{E}[e^{-sT_n}] = \int_0^\infty e^{-st} f_n(t) dt
$$
Our goal is to find $F_n(s)$, then invert it to get $f_n(t)$.
Step 2: Recurrence Relation
For $n \geq 1$, in a tiny time $dt$, three things can happen:
- We have a birth (probability $\lambda dt$), moving to $n+1$
- We have a death (probability $\mu n dt$), moving to $n-1$
- Nothing happens (probability $1 - (\lambda + \mu n)dt$)
Using this, we can write the recurrence for $F_n(s)$ (ignoring higher-order terms in $dt$, since $e^{-sdt} \approx 1 - sdt$):
$$
(s + \lambda + \mu n) F_n(s) = \lambda F_{n+1}(s) + \mu n F_{n-1}(s)
$$
The boundary condition is $F_0(s) = 1$—if we're already at 0, the first-passage time is 0.
Step 3: Solve the Recurrence
This linear recurrence can be solved by rewriting it in terms of differences. Let $d_n = F_n(s) - F_{n-1}(s)$—then the recurrence becomes:
$$
\lambda d_{n+1} = (s + \mu n) d_n
$$
Expanding this product gives:
$$
d_n = d_1 \prod_{k=1}^{n-1} \frac{s + \mu k}{\lambda}
$$
Then $F_n(s) = 1 + \sum_{k=1}^n d_k$. To ensure convergence as $n \to \infty$ (since in steady state, $\lambda = \mu \theta$, so for $n > \theta$, death rate outpaces birth rate), we adjust $d_1$ to make the series converge.
For small $n$, you can get closed-form expressions. For example, when $n=1$:
$$
F_1(s) = \frac{\mu}{\mu + \lambda + s} + \frac{\lambda}{\mu + \lambda + s} F_2(s)
$$
Solving recursively for small $n$ gives manageable Laplace transforms, which you can invert using standard tables or numerical methods.
2. Steady-State Poisson Initial Condition
Since the steady state is $X \sim \text{Poisson}(\theta)$ where $\theta = \lambda/\mu$, we can compute the overall Laplace transform by averaging over the initial state distribution:
$$
F(s) = \mathbb{E}[F_X(s)] = e^{-\theta} \sum_{n=0}^\infty \frac{\theta^n}{n!} F_n(s)
$$
We already know $F_0(s) = 1$, so we can rewrite this as:
$$
F(s) = e^{-\theta} \left(1 + \sum_{n=1}^\infty \frac{\theta^n}{n!} F_n(s)\right)
$$
Substituting the recurrence relation for $F_n(s)$ into this sum and simplifying (using $\mu \theta = \lambda$) leads to an integral form for $F(s)$:
$$
F(s) = \exp\left( - \theta \int_0^\infty \frac{1 - e^{-st}}{t + 1/\mu} dt \right)
$$
The integral here can be expressed using the exponential integral function $\text{Ei}(x)$, but for practical purposes, numerical integration is usually easier to implement to get $F(s)$, then you can use numerical Laplace inversion to get the probability density function.
3. Truncated State Space Approximation
If you want a simpler numerical approach, truncate the state space to ${0, 1, ..., N}$ (so state $N$ can only transition to $N-1$, no birth to $N+1$). This turns the process into a finite-state Markov chain, which is straightforward to handle with linear algebra:
- Build the transition rate matrix $Q$: For state $i$ (1 ≤ i ≤ N-1), $Q[i][i] = -(\lambda + \mu i)$; for state $N$, $Q[N][N] = -\mu N$; $Q[i][i+1] = \lambda$ (0 ≤ i ≤ N-1); $Q[i][i-1] = \mu i$ (1 ≤ i ≤ N); state 0 is absorbing, so $Q[0][j] = 0$ for $j \neq 0$.
- Remove the absorbing state to get a truncated matrix $Q'$ (size $N \times N$).
- The Laplace transform vector $\mathbf{F}(s) = (F_1(s), ..., F_N(s))^T$ satisfies:
$$
(sI - Q') \mathbf{F}(s) = \mathbf{1}
$$
where $I$ is the identity matrix and $\mathbf{1}$ is a vector of ones.
Solve this linear system for any $s$, then invert the Laplace transform numerically to get the density. This is great for quick validations or when you don't need an exact analytical solution.
Wrap-Up
- Fixed initial $n$: Use recurrence relations and Laplace transforms; closed-form for small $n$, numerical methods for larger $n$.
- Steady-state initial: Average over the Poisson distribution, leading to an integral form for the Laplace transform—numerical integration/inversion is the way to go.
- Truncated state space: Easy numerical implementation with linear algebra, perfect for approximations.
内容的提问来源于stack exchange,提问作者NJE

