M4.2 7 min read Oct 2026

M4.2 The Phone Can Ring Anytime: Continuous-Time Markov Chains

Builds on2 notes

One operator, one phone line

Calls arrive at an average of three per hour; a call lasts ten minutes on average. Calls arriving while the line is busy are rejected rather than queued.

What fraction of time is the operator busy?

Multiplying three calls by ten minutes counts rejected calls as served. Model arrivals as a Poisson process with rate λ=3\lambda=3 per hour and independent exponential service times with rate μ=6\mu=6. These distributional assumptions do not follow from the means alone.

DiscussionQ1

What are the states? If three per hour is not a probability, how does it determine a short-time transition?

Show the reasoning

Let XtX_t be idle (0) or busy (1), with continuous time measured in hours.

A rate is a short-time probability slope. For Poisson arrivals, one event in Δt\Delta t has probability λΔt+O(Δt2)\lambda\Delta t+O(\Delta t^2) and multiple events have probability O(Δt2)O(\Delta t^2). A rate may exceed one. The service rate μ\mu is conditional on being busy, not the unconditional number completed each hour.

For small Δt\Delta t, transitions are approximately (1−λΔtλΔtμΔt1−μΔt)\begin{pmatrix}1-\lambda\Delta t&\lambda\Delta t\\\mu\Delta t&1-\mu\Delta t\end{pmatrix}. This approximation can fail at large intervals. The interval-independent object is its derivative at zero: the rate matrix.

Memoryless alarms

A token in the idle square waits for an exponential alarm of rate three, then moves to busy. There it waits for an alarm of rate six, then returns. Each alarm’s remaining law does not depend on time already waited.

Rates describe short-time slopes rather than a chosen round length. They determine holding times and destinations on departure.

Two states with memoryless exponential alarms.

Rates determine exponential holding times; long-run occupancy reflects the mean durations of the two parts of a cycle.

Write the generator

From short-time probabilities to rates

Express the short-time matrix as

P(Δt)≈I+R Δt,R=(−λλμ−μ)=(−336−6).P(\Delta t)\approx I+R\,\Delta t,\qquad R=\begin{pmatrix}-\lambda&\lambda\\ \mu&-\mu\end{pmatrix}=\begin{pmatrix}-3&3\\6&-6\end{pmatrix}.

The rate matrix, or generator, has R(x,y)≥0R(x,y)\ge0 off the diagonal and R(x,x)=−∑y≠xR(x,y)R(x,x)=-\sum_{y\ne x}R(x,y). Row sums are zero, reflecting probability conservation. Formally R=lim⁡Δt→0[P(Δt)−I]/ΔtR=\lim_{\Delta t\to0}[P(\Delta t)-I]/\Delta t.

Evolve for a finite interval

Time-homogeneous Markov transitions compose by P(t+s)=P(t)P(s)P(t+s)=P(t)P(s). Subdivide time and take the limit:

P(t)=lim⁡n→∞(I+tRn)n=etR≡∑k≥0(tR)kk!.P(t)=\lim_{n\to\infty}\Big(I+\frac{tR}{n}\Big)^{n}=e^{tR}\equiv\sum_{k\ge0}\frac{(tR)^k}{k!}.

This is the matrix analogue of the exponential limit. Differentiating also gives

ddtP(t)=lim⁡Δt→0P(t)P(Δt)−P(t)Δt=P(t) R,P(0)=I,\frac{d}{dt}P(t)=\lim_{\Delta t\to0}\frac{P(t)P(\Delta t)-P(t)}{\Delta t}=P(t)\,R,\qquad P(0)=I,

The resulting linear matrix ODE has solution etRe^{tR}.

The forward equation

For row-vector initial law p0p_0, pt=p0P(t)p_t=p_0P(t) satisfies

p˙t=ptR⟺p˙t(y)=∑x≠y[pt(x)R(x,y)−pt(y)R(y,x)].\dot p_t=p_tR\quad\Longleftrightarrow\quad \dot p_t(y)=\sum_{x\ne y}\Big[p_t(x)R(x,y)-p_t(y)R(y,x)\Big].

Expanding the diagonal term shows that each state’s change equals inflow minus outflow. This is the forward equation, also called the master equation.

It parallels M3.2 on a finite state space. Probability conservation follows from ddt∑ypt(y)=ptR1=0\frac d{dt}\sum_y p_t(y)=p_tR\mathbb1=0.

Solve the two-state example

Busy probability satisfies p˙t(1)=λ−(λ+μ)pt(1)\dot p_t(1)=\lambda-(\lambda+\mu)p_t(1), giving

pt(1)=λλ+μ+(p0(1)−λλ+μ)e−(λ+μ)t.p_t(1)=\frac{\lambda}{\lambda+\mu}+\Big(p_0(1)-\frac{\lambda}{\lambda+\mu}\Big)e^{-(\lambda+\mu)t}.

The stationary law solves πR=0\pi R=0, or π(0)λ=π(1)μ\pi(0)\lambda=\pi(1)\mu:

π(1)=λλ+μ=33+6=13.\pi(1)=\frac{\lambda}{\lambda+\mu}=\frac{3}{3+6}=\frac13 .

Busy occupancy is one third, not one half. Initial-state influence decays on time scale 1/(λ+μ)=1/91/(\lambda+\mu)=1/9 hour, about seven minutes. The nonzero generator eigenvalue supplies the exponential decay rate.

DetailsExact transitions, holding times, and oversized Euler steps

Let Π have every row equal to π. Then RΠ=ΠR=0R\Pi=\Pi R=0 and R2=−(λ+μ)RR^2=-(\lambda+\mu)R, so etR=Π+e−(λ+μ)t(I−Π)e^{tR}=\Pi+e^{-(\lambda+\mu)t}(I-\Pi). It equals I at zero, tends to Π, and has derivative R at zero.

The probability of staying in state xx beyond time tt is e−∣R(x,x)∣te^{-|R(x,x)|t}. Holding times are exponential with mean 1/∣R(x,x)∣1/|R(x,x)|, the continuous analogue of geometric memorylessness.

The Euler approximation I+RΔtI+R\Delta t is stochastic only if its diagonal entries stay nonnegative: here Δt≤1/6\Delta t\le1/6 hour. At half an hour it gives invalid probabilities. The exact matrix etRe^{tR} remains stochastic for every t≥0t\ge0.

Why the naive one-half answer fails

Only idle-line arrivals are accepted, at rate λπ(0)=3×2/3=2\lambda\pi(0)=3\times2/3=2 per hour. Two ten-minute calls occupy twenty minutes, giving one third. A queue would require different states; the offered load one half is not the occupancy of this loss system.

With Poisson arrivals and independent finite-mean nonexponential service, the renewal-cycle busy fraction remains E[S]/(1/λ+E[S])\mathbb E[S]/(1/\lambda+\mathbb E[S]). But idle/busy alone is generally no longer this CTMC, and transient probabilities and residual service times change. Time-varying arrival rates also require a time-dependent analysis.

Try it

import numpy as np
rng = np.random.default_rng(0)
lam, mu, T = 3., 6., 20000.
t, x, busy = 0., 0, 0.
while t<T:
    stay = rng.exponential(1/lam if x==0 else 1/mu)
    busy += min(stay,T-t)*x  # Truncate the final holding interval.
    t += stay
    x = 1-x
print('busy fraction:',busy/T)
# Fixed ten-minute service preserves long-run occupancy but loses memorylessness.

Check your understanding

Check your understanding

Independent exponential up and repair times average ten and two hours. Which model gives availability and transient state probabilities?

Check your understanding

What does R1=0R\mathbb1=0 establish for the forward equation?

Check your understanding

Replace exponential service by fixed ten-minute calls while keeping Poisson arrivals. What changes?

References

  1. Norris, J. R. Markov Chains. Cambridge University Press, 1997.
  2. Grimmett, G., Stirzaker, D. Probability and Random Processes, 3rd ed. Oxford University Press, 2001.
  3. Anderson, W. J. Continuous-Time Markov Chains: An Applications-Oriented Approach. Springer, 1991.