Risk Modelling and Survival Analysis · Markov chains
No Claims Discount Markov Chains and Gambler's Ruin
Updated 11 October 2026 · Fact-checked
An NCD scheme is a Markov chain whose states are discount levels and whose moves depend on whether you claim. To solve a question, define the states, write the transition matrix, then find multi-step probabilities or the stationary distribution. Gambler's ruin is a random walk with absorbing barriers. Estimate probabilities by counting transitions.
Understand Applications: No Claims Discount and Random Walks
A Markov chain is a process where the next state depends only on the present state, not on how you got there. This is the Markov property. Once you can write the one-step transition probabilities as a matrix P, most exam questions become matrix work.
A No Claims Discount (NCD) system is the standard actuarial example. Each discount level is a state, such as 0%, 25% and 50%. If you make no claim in a year, you move up a level (or stay at the top). If you claim, you move down a level or back to a set level. The chance of no claim is fixed, so each row of P is easy to write. The chain is Markov because next year's level depends only on this year's level and this year's claim outcome.
NCD questions usually ask for three things. First, a multi-step probability, such as being at 50% after two years, found from powers of P. Second, the long-run share of policyholders at each level, found from the stationary distribution π = πP. Third, the long-run average premium, found by weighting the premium at each level by π. A subtlety: the NCD chain is Markov only if the state captures everything needed. If the rules depend on claims in the last two years, you must enlarge the states to include that history.
A simple random walk adds a step of +1 with probability p or −1 with probability q = 1 − p at each time. It is Markov, with infinitely many states. Gambler's ruin stops the walk when it hits 0 or N. These two states are absorbing. You then ask for the probability of reaching N before 0 from a start point i. The same idea models a surplus process that is ruined when it hits zero.
In practice you do not know P, so you estimate it from observed data. The estimate of p(i,j) is the number of observed moves from i to j divided by the total number of moves out of i. You can then test whether the Markov assumption is reasonable by checking whether the previous state still helps predict the next one, using a chi-square or likelihood ratio test.
Key rules to remember
- Markov property
- P(X(n+1) = j | X(n) = i, X(n−1), ..., X(0)) = P(X(n+1) = j | X(n) = i)
- The future depends on the present only. Time-homogeneous means these probabilities do not change with n.
- Chapman-Kolmogorov
- P(n+m) = P(n) × P(m), so P(n) = Pⁿ
- Use matrix powers for n-step probabilities. In a time-homogeneous chain, the n-step matrix is the nth power of P.
- Stationary distribution
- π = πP and Σ π(i) = 1
- Solve the equations, drop one redundant equation, and use the sum to 1 condition. It is the long-run distribution for an irreducible, aperiodic chain with finitely many states.
- Long-run average premium
- Σ π(i) × premium(i)
- Premium at each level is full premium × (1 − discount).
- Simple random walk mean and variance
- E[X(n)] = X(0) + n(p − q); Var[X(n)] = 4npq
- Steps are +1 with probability p and −1 with probability q, independent.
- Gambler's ruin, p ≠ q
- P(reach N before 0 | start i) = (1 − (q/p)^i) ÷ (1 − (q/p)^N)
- Absorbing barriers at 0 and N, start 0 ≤ i ≤ N. The probability of ruin is 1 minus this.
- Gambler's ruin, p = q = ½
- P(reach N before 0 | start i) = i ÷ N
- Use this when the walk is fair. The general formula gives 0 ÷ 0 here.
- Estimating transition probabilities
- p̂(i,j) = n(i,j) ÷ n(i), where n(i) = Σ over j of n(i,j)
- This is the maximum likelihood estimate. n(i,j) counts observed moves from i to j. Count only transitions, so the final observation has no next move. Approximate variance is p̂(1 − p̂) ÷ n(i).
- Testing the Markov assumption
- χ² = Σ (Observed − Expected)² ÷ Expected over triples (i,j,k)
- Compare counts of consecutive triples with those expected under a first-order chain. With m states and all transitions possible, the degrees of freedom are m(m−1)².
How to solve Applications: No Claims Discount and Random Walks questions
Use this method for any NCD, random walk or estimation question.
- 1Define the states clearly. For NCD, list each discount level and what the next-year rules are. Check whether history beyond the current level matters.
- 2Write the transition matrix. Each row must sum to 1. For NCD, put the no-claim probability on the move up and the claim probability on the move down.
- 3Decide what is being asked: an n-step probability, a long-run distribution, an absorption probability, or an estimate.
- 4For n-step probabilities, trace the paths by hand if n is small (2 or 3). Otherwise compute Pⁿ.
- 5For long-run questions, write π = πP, solve in terms of one unknown, then use Σπ = 1. Check that all π values are between 0 and 1.
- 6For gambler's ruin, identify i, N, p and q. Choose the p ≠ q or p = q formula, and state which barrier is the target.
- 7For estimation, count transitions from each state, divide each count by the total moves out of that state, and check each row sums to 1.
- 8State the answer in context, such as the average premium in rupees, and give your assumptions.
Quickest way: Solve the stationary distribution by balancing flows
When to use it: Use it for NCD chains with a simple up and down structure, where you need the long-run proportions fast.
- Write π in terms of the lowest level, say π0 = k.
- Balance the flow at the bottom: probability of leaving × π0 = flow in from the next level up. This gives π1 in terms of k.
- Repeat level by level up the chain using each level's equation.
- Add all terms, set the total equal to 1, and solve for k.
- Multiply by the premium at each level to get the average premium. Check that the probabilities sum to 1.
Common mistakes in Applications: No Claims Discount and Random Walks
Writing rows that do not sum to 1, or filling the matrix by columns
Students rush the rules for the top and bottom levels, where the move up or down is blocked and the policyholder stays put.
Fix: After writing P, add each row. At the top level, a no-claim stays at the top, so it adds to the staying probability.
Using πP = π with columns instead of rows, or forgetting Σπ = 1
The equations alone have infinitely many solutions, and the multiplication order is easy to mix up.
Fix: Write π as a row vector, multiply on the left, and always use the sum condition to scale the solution.
Using the wrong gambler's ruin formula when p = q
Students apply the (q/p) formula when q/p = 1 and get 0 ÷ 0.
Fix: Check p versus q first. If the walk is fair, the answer is i ÷ N.
Getting the direction wrong: computing the ruin probability instead of the win probability
The formula gives the probability of reaching N, and questions often ask for ruin.
Fix: Write down what the formula gives, then take 1 minus it if ruin is required. For a walk that is stopped at 0 and N, ruin and success add to 1.
Dividing transition counts by the total number of observations
Students forget the estimate is conditional on the starting state.
Fix: Divide n(i,j) by the number of moves that started in state i, not by all moves.
Claiming the NCD process is Markov without checking the rules
Some NCD rules depend on claims in the last two years, so the discount level alone does not determine the future.
Fix: If the rule needs history, redefine the states to include it, or state that the chain is not Markov in the original states.
Worked examples
Example 1
A motor insurer has three NCD levels: 0%, 25% and 50%. After a claim-free year, a policyholder moves up one level (staying at 50% if already there). After a year with a claim, the policyholder moves down one level (staying at 0% if already there). The probability of a claim-free year is 0.8, in every year. The full premium is ₹10,000. (a) Write the transition matrix. (b) Find the probability that a policyholder at 0% is at 50% after two years. (c) Find the long-run distribution and the long-run average premium. (d) In a sample, 100 policyholders were at 0%, and 78 of them moved up. Estimate the probability of a claim-free year from this.
Show the solution
- (a) Order the states 0%, 25%, 50%. From 0%: stay with probability 0.2 (claim), move up with 0.8. From 25%: down with 0.2, up with 0.8. From 50%: down with 0.2, stay with 0.8. So P = [[0.2, 0.8, 0], [0.2, 0, 0.8], [0, 0.2, 0.8]].
- (b) The only two-step path from 0% to 50% is 0% → 25% → 50%, with probability 0.8 × 0.8 = 0.64.
- (c) Solve π = πP. First equation: π0 = 0.2π0 + 0.2π25, so 0.8π0 = 0.2π25, so π25 = 4π0. Third equation: π50 = 0.8π25 + 0.8π50, so 0.2π50 = 0.8π25, so π50 = 4π25 = 16π0.
- Sum to 1: π0 + 4π0 + 16π0 = 21π0 = 1, so π0 = 1/21, π25 = 4/21, π50 = 16/21.
- Average premium = 10,000 × (1/21 × 1 + 4/21 × 0.75 + 16/21 × 0.5) = 10,000 × (1 + 3 + 8) ÷ 21 = 10,000 × 12/21 = ₹5,714.29 (to the nearest paisa).
- (d) The estimate of moving up from 0% is 78 ÷ 100 = 0.78. This is the estimate of the claim-free probability.
Answer: (a) P = [[0.2, 0.8, 0], [0.2, 0, 0.8], [0, 0.2, 0.8]]. (b) 0.64. (c) π = (1/21, 4/21, 16/21); average premium ≈ ₹5,714. (d) 0.78.
Example 2
A gambler starts with ₹2 and bets ₹1 each round. She wins ₹1 with probability 0.4 and loses ₹1 with probability 0.6, independently. She stops when she reaches ₹5 or has ₹0. Find the probability she reaches ₹5. State the probability she is ruined.
Show the solution
- Identify i = 2, N = 5, p = 0.4, q = 0.6. Since p ≠ q, use the general formula.
- q ÷ p = 0.6 ÷ 0.4 = 1.5.
- Numerator: 1 − 1.5² = 1 − 2.25 = −1.25.
- Denominator: 1 − 1.5⁵ = 1 − 7.59375 = −6.59375.
- Probability of reaching ₹5 = 1.25 ÷ 6.59375 = 0.1896 (to 4 decimal places).
- The walk is absorbed at 0 or 5 with certainty, so ruin probability = 1 − 0.1896 = 0.8104.
Answer: Probability of reaching ₹5 ≈ 0.1896; probability of ruin ≈ 0.8104.
Exam tips
- In MCQs, write the matrix quickly and check row sums. A wrong row sum shows an error before you waste time.
- For written NCD questions, state your states and assumptions first. Marks are given for a clear definition of the state space.
- If asked whether the process is Markov, link your answer to the rules: say whether the next state depends only on the current level.
- For estimation, show the counts, the formula p̂(i,j) = n(i,j) ÷ n(i), and the final matrix. For the chi-square test, state the hypotheses, the statistic, the degrees of freedom and your conclusion in words.
- In computer-based Paper B, you may need to build P and compute powers or the stationary vector in R or Excel. Show the matrix, the method and the result, and check that rows sum to 1.
Practice questions from Markov chains
- A Markov chain on states {A, B, C} has transition probabilities A→A 0.5, A→B 0.5, B→A 0.3, B→C 0.7, C→B 1. Which statement about the chain i…
- A chain on states {1,2,3,4} has transition matrix rows: 1→(0.5,0.5,0,0); 2→(0.5,0.5,0,0); 3→(0.25,0,0.25,0.5); 4→(0,0,0.5,0.5). Which classi…
- A three-state chain (states 1, 2, 3) has one-step matrix rows: (0.5, 0.5, 0), (0.2, 0.3, 0.5), (0, 0.4, 0.6). Given the chain starts in stat…
- A chain on {A,B,C} has P(A→B)=1, P(B→A)=0.5, P(B→C)=0.5, P(C→A)=1. What is the stationary probability of state A?
- A discrete-time stochastic process X_n on a finite state space satisfies P(X_{n+1}=j | X_n=i, X_{n-1}=i_{n-1}, ..., X_0=i_0) = P(X_{n+1}=j |…
Applications: No Claims Discount and Random Walks: frequently asked questions
How do I set up an NCD Markov chain in an exam?
List the discount levels as states. Then write down where a policyholder moves after a claim-free year and after a claim. Put the claim probabilities in each row, and check each row sums to 1.
How do I find the long-run proportion at each NCD level?
Solve π = πP together with Σπ = 1. For a simple up and down NCD scheme, balance flows between neighbouring levels and express every π in terms of the lowest level. Then scale so the total is 1.
How do I estimate transition probabilities from data?
Count how many times the process moved from state i to state j, and divide by the total number of moves that started in state i. This is the maximum likelihood estimate. Each row of the estimated matrix should add up to 1.
What is the difference between a random walk and gambler's ruin?
A simple random walk moves up or down by 1 at each step, with no stopping. Gambler's ruin is the same walk with absorbing barriers at 0 and N, so you can ask the probability of hitting one barrier before the other.
How do I test whether a chain is Markov?
Compare the observed counts of consecutive triples of states with the counts expected under a first-order chain. A chi-square or likelihood ratio test shows whether the earlier state adds information. A large statistic suggests the Markov assumption is not suitable.