Skip to content

Bankrupt

Get access to track progress Get access to bookmark
Asset Pricingx / 34
Behavioral Questionsx / 7
Brain Teasersx / 79
Derivatives Theoryx / 107
Digital Assets - Cryptox / 82
Energy Tradingx / 55
Linear Algebrax / 24
Machine Learningx / 62
Math Questionsx / 50
Probability and Statisticsx / 369
Programmingx / 54
Totalx / 923
Two players, A and B, play a game in which the winner receives 1 dollar from the other player. Player A has 1 dollar and player B has 2 dollars. Player A is better in this game and wins 2/3 of the games. They play until one of them is bankrupt.

What is the probability that player A wins?
This is a pretty straightforward Markov chain problem. There are 4 states. The transition graph is given in Figure 1.

Figure 1 - Transition graph for this problem.


The problem starts at state 1. As has been explained in the lessons of this course, we use the following equation:
\begin{equation}
s_1 = \sum_{i=0}^{3}p_{1,i}s_i
\end{equation} \begin{equation}
s_2 = \sum_{i=0}^{3}p_{2,i}s_i
\end{equation} Furthermore, $s_0=0$ and $s_3=1$. Then we have
\begin{equation}
s_1 = \frac{1}{3}*0 + \frac{2}{3} * s_2
\end{equation} \begin{equation}
s_2 = \frac{1}{3}* s_1 + \frac{2}{3} * 1
\end{equation} Solving these equations gives us $s_1=4/7$ and $s_2=6/7$. So, starting with 1 dollar, player A has a 4/7 chance of winning.

Proof
If we substitute Equation 4 in Equation 3, we have

\begin{equation}
s_1 = \frac{1}{3}*0 + \frac{2}{3} * (\frac{1}{3}* s_1 + \frac{2}{3} * 1)
\end{equation} \begin{equation}
s_1 = \frac{2}{9} * s_1 + \frac{4}{9}
\end{equation}  \begin{equation}
\frac{7}{9} * s_1 =  \frac{4}{9}
\end{equation}  \begin{equation}
s_1 =  \frac{4}{9} / \frac{7}{9} = \frac{4}{7}
\end{equation}
Correct Answer: 0.57
Python scratchpad
# Run Python right here in your browser
def two_sum(nums, target):
    seen = {}
    for i, n in enumerate(nums):
        if target - n in seen:
            return [seen[target - n], i]
        seen[n] = i
    return []

print(two_sum([2, 7, 11, 15], 9))  # [0, 1]
Run Python in your browser

Write and execute code — numpy, pandas & scikit-learn included — right on the question page.

Log in to start coding
Title Category Subcategory Difficulty Status
Animal Migrations Probability and StatisticsMarkov Chain ProbabilityEasy
Unlock with a membership
Bold Betting Strategy Probability and StatisticsMarkov Chain ProbabilityMedium
Unlock with a membership
Coin Series #1 Probability and StatisticsMarkov Chain ProbabilityEasy
Unlock with a membership
Coin Series #2 Probability and StatisticsMarkov Chain ProbabilityMedium
Unlock with a membership
Coin Series #3 Probability and StatisticsMarkov Chain ProbabilityMedium
Unlock with a membership
Dominant Game Probability and StatisticsMarkov Chain ProbabilityHard
Unlock with a membership
Escape the Square Probability and StatisticsMarkov Chain ProbabilityHard
Unlock with a membership
Jumping Toad Probability and StatisticsMarkov Chain ProbabilityMedium
Unlock with a membership
Parking Meter Probability and StatisticsMarkov Chain ProbabilityEasy
Unlock with a membership
Picking Tiles Probability and StatisticsMarkov Chain ProbabilityEasy
Unlock with a membership
Random Ant Probability and StatisticsMarkov Chain ProbabilityMedium
Example
Region Spinner Probability and StatisticsMarkov Chain ProbabilityEasy
Unlock with a membership
Stop Sign Stroll Probability and StatisticsMarkov Chain ProbabilityMedium
Unlock with a membership
The Drunkard's Walk Probability and StatisticsMarkov Chain ProbabilityHard
Unlock with a membership
Top 2000 Songs Probability and StatisticsMarkov Chain ProbabilityMedium
Unlock with a membership

Please log in to see the discussion.