Markov Chains interview question

Probability & MathMarkov Chainseasy

Each week a loyalty-app user is either Engaged or Idle. An Engaged user becomes Idle the next week with probability 0.10, and an Idle user becomes Engaged with probability 0.15; these probabilities do not change over time. In the long run, what share of weeks is a user Engaged?

  1. A40%: in balance the flows match, π_E × 0.15 = π_I × 0.10, so π_E = 0.10/(0.10 + 0.15), the Engaged-to-Idle share of switching.
  2. B90%: an Engaged user stays Engaged with probability 0.90 each week, and that weekly stay probability is the long-run share of weeks.
  3. C50%: any two-state chain in which each state can reach the other converges to an even split, whatever the two switching rates are.
  4. D60%: in balance the flows match, π_E × 0.10 = π_I × 0.15, so π_E = 0.15/(0.10 + 0.15), the Idle-to-Engaged share of switching.
Show the answer and explanation

Correct answer: D, 60%: in balance the flows match, π_E × 0.10 = π_I × 0.15, so π_E = 0.15/(0.10 + 0.15), the Idle-to-Engaged share of switching.

Explanation Markov Chains

The stationary distribution π satisfies π = πP: if users are distributed as π this week, they are still distributed as π next week. For two states the quickest way to solve it is flow balance: the probability flow out of Engaged must equal the flow into it.

π_E · 0.10 = π_I · 0.15, and π_E + π_I = 1

So π_E = 0.15 / (0.10 + 0.15) = 0.60 and π_I = 0.40.

General rule for two states with switching probabilities a (1 → 2) and b (2 → 1):

StateLong-run share
1b / (a + b)
2a / (a + b)

Each state's share is the probability of moving into it divided by the total switching probability. The flow out of a state is its share times its own leaving probability; pairing π_E with 0.15 instead (π_E × 0.15 = π_I × 0.10) swaps the states and gives the Idle share, 40%. The 0.90 stay probability only says how long an Engaged spell lasts (mean 1/0.10 = 10 weeks); the long-run share also depends on how fast Idle users return (mean Idle spell 1/0.15 ≈ 6.7 weeks, and 10 / (10 + 6.7) = 0.6). An even split happens only when a = b.

Interview tip: sanity-check the result with expected spell lengths, and mention why it is well defined: the chain is irreducible (so π is unique) and aperiodic (so it converges to π from any start).

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Probability & Math questions

  1. In RLHF you need the gradient of J(θ) = E[R(y)], where y is a token sequence sampled from the policy LLM π_θ and R is a reward model's score treated as a…
  2. What is the difference between independent events and mutually exclusive events?
  3. What is the dot product of the vectors [1, 2, 3] and [4, 5, 6]?
  4. In the gradient descent update θ ← θ − η∇L(θ), what is the role of the learning rate η?
  5. An image-augmentation step applies a 2 × 2 linear map M to pixel coordinates. The plot shows the unit square (dashed) and its image under M (solid), with the…