# Gambler's ruin

It is the famous Gambler's ruin example. In this example, we will present a gambler. A reluctant gambler is dragged to a casino by his friends. He takes only 50\$ to gamble with. Since he does not know much about gambling, he decides to play roulette. At each spin, he places 25\$ on red. If red occurs, he wins 25\$. If black comes up, he loses his 25\$. Therefore, the odds of winning are 50%. He will quit playing when he either has 0 money left or is up to 25\$ (75\$ total). The transition probability is shown below.

Let's model this process as a Markov Chain and examine its long-run behavior.

Start the Rational Will or the Decision Tree software and choose the Markov Chance node to start with.

As you learned about creating a Markov model from this getting started page, create a Markov state transition as shown below.

Now, we can analyze, what state the gambler will highly likely end up in based on how much money he starts with. Let's select the 50\$ state as the initial state.

Now, open the Markov Analyzer panel. notice that the probability of getting broke is 33% and reaching 75\$ state is 67%.

Now, let's change the initial state. Select the 25\$ state and set it as the initial set from the right mouse click context menu same like you did for 50\$ state. Now notice that the chance of getting broke increased to 67% and reaching 75\$ probability came down to 33%.

Last updated on Feb 16, 2022