Worked examples — Stochastic processes — Markov chains, steady-state, random walks
4.10.27 · D3· Maths › Advanced Topics (Elite Level) › Stochastic processes — Markov chains, steady-state, random w
Shuru karne se pehle, do objects ka quick reminder jo hum baar baar use karte hain, simple shabdon mein:
Hume ek random number ko summarise karne ke do tarike bhi chahiye honge, toh inhe ek baar, abhi, define karte hain kisi bhi calculation se pehle:
The scenario matrix
Is chapter ka har problem exactly inhi cells mein se ek mein aata hai. Aage ke worked examples mein tag lagaye gaye hain ki woh kaun si cell cover karte hain, taaki milke poora grid fill ho jaaye.
| # | Case class | Tricky kya hai | Covered by |
|---|---|---|---|
| A | Standard steady-state (2–3 states, simple numbers) | Solve + normalise | Ex 1 |
| B | Sign / direction of drift random walk mein () | Mean ab nahi — kis taraf jhukta hai? | Ex 2 |
| C | Zero / degenerate input: ek absorbing state () | Ek row jo tumhe "trap" karti hai — steady-state non-unique ho sakta hai | Ex 3 |
| D | Limiting behaviour: kya approach karta hai, aur kitni tezi se? | The second eigenvalue speed control karta hai | Ex 4 |
| E | Periodic / non-convergent chain | Distribution forever oscillate karta hai, exist karta hai lekin kabhi reach nahi hota | Ex 5 |
| F | Real-world word problem (customer/machine model) | English → matrix translate karo, phir answer interpret karo | Ex 6 |
| G | Gambler's ruin, biased () + expected duration | Linear formula kaam nahi karta; ek ratio formula aata hai | Ex 7 |
| H | Exam twist: expected number of visits / first-passage | First-step analysis ek alag quantity par | Ex 8 |
Example 1 — Cell A: standard 3-state steady-state
Forecast: pehle guess karo — middle pad sabse reachable hai aur sab ko feed karta hai. Kya tumhe lagta hai usmein ends se compare mein zyada ya kam probability hogi? Apna guess likho.
Recall Setup: hum kaun si equation solve kar rahe hain?
with . Ye balance equation hai "inflow = there" har column ke liye.
Step 1. Teen balance equations likho, ek ke har column ke liye (ek column sab ki probability collect karta hai jo us state mein flow in karti hai). Ye step kyun? Har equation kehti hai "state mein baithi probability barabar hai total probability jo sabhi se flow in karti hai", jo exactly hai.
Step 2. Equation 1 simplify karo: . Symmetry se, equation 3 deta hai . Ye step kyun? term ko left side le jao; algebra collapse ho jaata hai kyunki chain left-to-right symmetric hai.
Step 3. Normalise karo: , toh . Ye step kyun? Teeno fractions certainty () mein add hone chahiye; woh scale pin karta hai.
Middle pad zyada hold karta hai — agar tumne yahi guess kiya tha toh good hai.
Example 2 — Cell B: biased random walk, drift kis taraf hai?
Forecast: , toh ye right lean karta hai. Lekin random wobble se compare mein kitna zyada 100 steps baad? Guess karo ki drift ya spread 100 steps baad jeet ta hai.
Figure kaise padhein. Horizontal axis steps ki number hai; vertical axis particle ki position hai. Teen patalee coloured lines individual random journeys hain. Thick navy line drift hai — average position, steadily label kiye hue point tak chadh rahi hai. Do dashed navy lines spread band hain; unke beech shaded orange region woh jagah hai jahan ek typical path rehta hai. Visual lesson: drift line ek straight line mein tezi se upar jaati hai jabki shaded band sirf slowly phailta hai (jaise ), toh step tak drift () ne wobble () ko clearly peeche chhod diya hai.

Step 1. Ek step ka mean . Ye step kyun? Upar di gayi expectation ki definition se, ek move ka mean = har outcome uski probability ke saath. Ye nonzero mean drift hai — constant lean jo parent note ke symmetric case mein nahi tha.
Step 2. . Ye step kyun? Expectation additive hai; identical steps ise times ek step bana dete hain. Drift linearly grow karta hai mein — ye figure mein steep straight navy line hai.
Step 3. Ek step ka variance, use karte hue: pehle , toh . Ye step kyun? Ye exactly woh variance definition hai jo humne upar set ki thi. Kyunki steps independent hain, variances add hote hain: .
Step 4. Spread . Ye step kyun? Typical wobble standard deviation hai (variance ka square root) — figure mein shaded band ki half-width. Compare karo: drift vs wobble — drift jeet ta hai, toh particle reliably origin ke right mein hai.
Example 3 — Cell C: ek absorbing state (degenerate row)
Forecast: state bilkul symmetric hai aur ke beech ( dono ke liye). Padhe bina absorption probability guess karo.
Step 1. Maano . First-step analysis: Ye step kyun? State se, pehle move par condition karo (memorylessness). Seedha jaana prob se succeed karta hai; jaana fail karta hai; mein rehna hume wahi unknown ke saath chhodta hai.
Step 2. Solve karo: . Ye step kyun? terms collect karo; self-loop left side jaata hai. Symmetry confirm hua: .
Step 3. Stationary distributions. Yahan solve karne se infinitely many milte hain: koi bhi with kaam karta hai. Ye step kyun? Dono absorbing states apne aap mein stationary hain; unka koi bhi mixture bhi hoga. Ye non-uniqueness hai jiske baare mein parent note ne warn kiya tha — chain reducible hai (tum se nahi pahunch sakte).
Example 4 — Cell D: kitni tezi se converge karta hai?
Forecast: har stochastic matrix mein eigenvalue hota hai. Doosra wala speed decide karta hai. Guess karo: ke paas hona matlab faster ya slower convergence?
Step 1. Eigenvalues solve karo se: . Ye step kyun? Determinant exactly tab zero hota hai jab kisi vector ko zero pe squash kare — yaani woh vector ek eigenvector hai.
Step 2. Expand karo: . Roots: aur . Ye step kyun? Quadratic factor karo. Jaisa promise kiya tha, ; mover hai .
Step 3. Decay ko maanke, hum chahte hain : Ye step kyun? ko exponent se nikalne ke liye logs lo. Toh steps mein already total-variation distance se neeche aa jaati hai.
Example 5 — Cell E: ek periodic chain jo kabhi converge nahi karta
Forecast: ye chain deterministically flip karta hai . Stationary exist karta hai — lekin kya ek lopsided start kabhi settle karega? Guess karo haan/nahi.
Step 1. Solve karo : , toh . ke saath: . Ye step kyun? Balance equation ka ek solution hona — stationary distribution ka exist karna — convergence guarantee nahi karta.
Step 2. Ab se iterate karo: Ye step kyun? se multiply karna sirf dono entries swap karta hai. Ye forever period ke saath oscillate karta hai, kabhi tak nahi pahuncha.
Example 6 — Cell F: real-world word problem
Forecast: stickiness high hai, lekin win-back modest hai. Long-run subscribed fraction guess karo — se upar ya neeche?
Step 1. English ko matrix mein translate karo. States: (subscribed), (cancelled). Ye step kyun? Row padhti hai "raho , jaao "; row padhti hai "wapas aao , gone raho ". Har row mein sum hoti hai ✔ — woh sum sanity check hai ki English sahi se ek valid transition matrix mein translate hui.
Step 2. column ke liye balance equation likho: . Ye step kyun? mein inflow = wo jo subscribed rahe plus cancelled ke jo wapas aaye; steady state mein ye mein baithe mass ke barabar hona chahiye.
Step 3. Rearrange karo: . Ye step kyun? terms left par collect karo; leftover do unknowns ko ek clean ratio se relate karta hai.
Step 4. Normalise karo: . Ye step kyun? Dono fractions mein add hone chahiye (har customer exactly ek state mein hai); woh scale fix karta hai.
Step 5. Plain English mein interpret karo: long run mein har teen mein se do customers () kisi bhi given month mein subscribed hain, chahe company ne kaisi bhi shuruat ki ho. Ye step kyun? Problem ne ek real-world fraction maanga tha, toh hum vector ko words mein wapas translate karte hain — word problem ka point yahi hai.
Example 7 — Cell G: biased gambler's ruin + expected duration
Forecast: favourable game ke saath (), se tak pahunchna fair-game answer se zyada hona chahiye. Ek number guess karo.
Step 1. First-step equation setup karo. Maano . Pehle bet par condition karo: Ye step kyun? Memorylessness: ek bet ke baad game restart karta hai par (win) ya par (loss). Boundaries certain hain — par tum already haar chuke, par already jeet chuke.
Step 2. Gap relation mein rearrange karo. likho aur use karo: Ye step kyun? right mein move karo aur group karo. Successive gaps constant factor se shrink karte hain — ek geometric sequence, woh constant gaps nahi jo fair-game linear rule deta tha.
Step 3. se tak geometric gaps sum karo. Kyunki aur se fix hota hai, standard result nikalti hai: Ye step kyun? Finite geometric sum ; wahi upar aur neeche appear karta hai aur cancel ho jaata hai, clean ratio chhodhta hai.
Step 4. , , plug karo: Ye step kyun? Direct substitution. Answer — favourable edge help karta hai, jaisa forecast kiya tha.
Step 5 — part (b). kyun fail karta hai: fair-game derivation ne equal gaps assume ki thi , jo ek straight line force karti hai . Woh equality sirf tab holds karti hai jab ho (toh ). Bias ke saath , gaps ek geometric sequence banate hain, ko favourable end ki taraf curve karte hue — walk far goal tak "linear" se zyada aasaani se pahunchta hai. Ye step kyun? Ye exactly woh assumption point karta hai jo break hoti hai, taaki tum jaano kab kaun sa formula legal hai.
Example 8 — Cell H: exam twist — expected number of steps (first-passage)
Forecast: ye duration ke baare mein poochh raha hai, kaun si end ke baare mein nahi. Guess karo: kuch steps, ya bahut?
Step 1. Maano = state se absorption tak expected steps. Count par first-step analysis: Ye step kyun? Har move ek step cost karta hai (""), phir naye state se hum abhi bhi aur steps expect karte hain. Absorbing states cost karte hain (already done). Ye first-step analysis hai duration par apply hua — probability ki jagah — ye exam twist hai.
Step 2. Dono interior equations likho (): Ye step kyun? Boundary values substitute karo; do equations, do unknowns.
Step 3. Solve karo. Pehle se, . Doosre mein substitute karo: Ye step kyun? Linear substitution. Symmetry se sense banata hai — states aur mirror images hain.
Active Recall
Recall Kaun si cell
second eigenvalue maangti hai, aur kyun? Cell D (convergence speed). Sabse bada eigenvalue deta hai; govern karta hai ki total-variation distance tak kitni tezi se decay karti hai.
Recall Biased random walk mein kaun sa
ki tarah grow karta hai aur kaun sa ki tarah? Drift (mean) ki tarah grow karta hai; spread (std dev) ki tarah grow karta hai. Large ke liye drift dominate karta hai.
Recall
biased gambler ke liye wrong kyun hai? Ye equal gaps assume karta hai, jo sirf par sach hota hai. Bias ke saath gaps geometric hain ratio ke saath, jo deta hai.
Recall Absorbing states ek chain ki stationary distribution ko…
Non-unique bana dete hain (chain reducible hai): absorbing states ka koi bhi mixture stationary hota hai.
Recall Symmetric walk se
se par expected absorption time? .
Connections
- Parent topic (woh machinery jis par ye examples apply hote hain)
- Linear Algebra — Eigenvalues and Eigenvectors (Ex 4: aur convergence rate)
- Perron–Frobenius Theorem (Ex 3 & 5: uniqueness fail hoti hai reducible / periodic chains ke liye)
- Law of Total Probability (first-step analysis Ex 3, 7, 8 mein)
- Central Limit Theorem (Ex 2: biased walk → Gaussian around drift )
- Diffusion and Brownian Motion (Ex 2 & 8: spread aur passage times)
- Google PageRank (Ex 6: ek real steady-state = long-run fractions)