For a continuous-time Markov chain with absorbing endpoints and rates , the jump chain is a simple symmetric random walk. On leaving , absorption before returning has probability , by gambler's ruin on each side. The geometric return count before absorption and independent rate- holding times give . The rates at other states affect elapsed excursion times but not their return probabilities.
Use the positive-integer convention for the geometric distribution:
Conditional on , independence gives . Taking expectations gives
This is the convention required below because a chain starting at makes at least one visit to . If instead counts failures on , its mean is , and the corresponding answer for that different random sum is .
For the chain of part (b), let count visits to , including the initial visit, before absorption. After a departure to , gambler's ruin on gives probability of reaching zero before returning to . After a departure to , the analogous probability of reaching before returning is . The departure is equally likely in either direction, so the probability of absorption before a return is
At every return to , the Strong Markov property resets these alternatives. Hence the geometric return count before absorption gives on positive integers. One may construct the chain from its embedded jump chain and a separate sequence of fresh independent exponential clocks. Then its successive holding times at are independent and identically distributed rate- exponential random variables, independently of , and
Using the first calculation gives the occupation time at an interior state of a variable-rate symmetric walk:
For , and the only visit is the initial one; the degenerate positive-integer geometric distribution at one handles this case. Other states' rates affect the time of each excursion, but not its probability of return, which explains why only appears in this expectation.