Skip to main content

Pepsi user buying Coke, third purchase

Short answer

A Markov chain is a random process where the next state depends only on the current state. With the given transition matrix, the probability that a Pepsi user buys Coke on the third purchase, found from P^3, is 0.588 (58.8%).

What is Markov chain? Find the transition probability of a Pepsi user who will buy Coke on third purchase. Transition probability is as below:

PepsiCoke
Pepsi0.70.3
Coke0.10.9

Markov chain

A Markov chain is a random process with a finite number of states in which the probability of moving to the next state depends only on the current state, not on earlier history. The probabilities are stored in a transition matrix whose rows sum to 1. Here the states are Pepsi and Coke (brand of the soft drink bought).

Numerical

Assumption: "third purchase" means three transitions, so we need p(Pepsi to Coke) in P^3.

P = [[0.7, 0.3], [0.1, 0.9]] (order: Pepsi, Coke)

Method 1: matrix power

P^2: Pepsi row = [0.7 x 0.7 + 0.3 x 0.1, 0.7 x 0.3 + 0.3 x 0.9] = [0.52, 0.48]; Coke row = [0.1 x 0.7 + 0.9 x 0.1, 0.1 x 0.3 + 0.9 x 0.9] = [0.16, 0.84]

P^3 = P^2 x P, Pepsi row:

  • To Pepsi: 0.52 x 0.7 + 0.48 x 0.1 = 0.364 + 0.048 = 0.412
  • To Coke: 0.52 x 0.3 + 0.48 x 0.9 = 0.156 + 0.432 = 0.588

Method 2: add all three-step paths from Pepsi to Coke

PathProbability
P - P - P - C0.7 x 0.7 x 0.3 = 0.147
P - P - C - C0.7 x 0.3 x 0.9 = 0.189
P - C - P - C0.3 x 0.1 x 0.3 = 0.009
P - C - C - C0.3 x 0.9 x 0.9 = 0.243
Total0.588

Both methods agree. Answer: a Pepsi user will buy Coke on the third purchase with probability 0.588 (58.8%).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Simulation and Modeling chapter 5 questions →