Markov Process and Markov Chain - Solved Examples
Markov Process and Markov Chain - Solved Examples
• Note: since there are two states coke and pepsi , so the TPM is
gonna be of 2*2 matrix
coke Pepsi
0.9 0.1
Coke
Pepsi 0.2 0.8
Supervisor: Ms.Shaista Rais (DCS) University Of Karachi
Question: Three players Kamran, Ali and Salman, are throwing a plastic ring to each
other. Kamran always throws the ring to Ali and Ali always throws the ring to Salman,
but Salman is as likely to throw the ball to Ali and Kamran. Find the transition matrix.
Since there are three states: so the transition matrix will be of 3*3 matrix
Kamran Always throws to Ali
From To Kamran Ali Salman
From To Kamran Ali Salman
Kamran
Kamran 0 1 0
Ali
Ali
Salman
Salman
Ali Always throws to Salman Salman is as likely to throw the ring to Kamran and Ali
From To Kamran Ali Salman From To Kamran Ali Salman
Kamran 0 1 0 Kamran 0 1 0
Ali 0 0 1 Ali 0 0 1
Salman Salman 0.5 0.5 0
Supervisor: Ms.Shaista Rais (DCS) University Of Karachi
Question: Brand Khadi has 40% market share in the local markets for its clothing product,
while the other two branded companies, Sapphire and J. have equal share each on January
1st, 2022. A study by the market research company has disclosed the following data for every
year.
• Brand khadi retains 70% of its customers and gains 5% from Saphhire
brand and 10% from J. brand.
• Sapphire retains 90% of its customers and gains 14% from Khadi and 5%
from J.
• J. retains 85% of its customers and gains 16% from Khadi and 5% from
Sapphire.
• Construct the TPM. From To Khadi Sapphire J.
Khadi 0.70 0.14 0.16
Sapphire 0.05 0.90 0.05
J. 0.10 0.05 0.85
0.14 0.90
Sapphire
0.70
0.05 0.05
Khadi 0.05
0.16
0.10 J.
0.85
Supervisor: Ms.Shaista Rais (DCS) University Of Karachi
MARKOV CHAIN
• How to calculate the probability of the states.
Example: 𝑃 𝑋3 = 4 ; 𝑃 𝑋2 = 5 𝑒𝑡𝑐
• How to calculate the probability after n-steps.
Example: 𝑝𝑖𝑗 (2) , 𝑝23 (3) , 𝑃 𝑋3 = 4 𝑋1 = 2) 𝑒𝑡𝑐
𝑃(𝑋3 = 2, 𝑋2 = 3, 𝑋1 = 1, 𝑋0 = 4)
Supervisor: Ms.Shaista Rais (DCS) University Of Karachi
• 1- step transition probability:
𝑝𝑖𝑗 = 𝑃 𝑋𝑛+1 = 𝑗 𝑋𝑛 = 𝑖)
𝑃 𝑋𝑛 = 𝑎 = 𝑞𝑛 (𝑎)
•P= P B M
P 0.1 0.5 0.4
B 0.6 0.2 0.2
M 0.3 0.4 0.3