# How to approach Basketball “Beat the Pro” drill with Markov Chain

Suppose, similarly to Gambler's ruin problem a Basketball player is doing "Beat the Pro" drill. That is, for every shot made, he scores one point, and for those missed, two points are to be deducted. If the player gets total of -5 points or 7 points, the drill ends.
I wanted to know the expected number of shots a player with shooting percentage $p$ has taken when the drill ends (in terms of $p$). (I actually got this question when I was playing 2k17, lol)
My intuition:

Define \begin{align*} Z_i = \begin{cases} 1, & \text{if } p\\ -2, & \text{if } 1-p \end{cases}~, \end{align*} where, $p\in [0,1]$, and for all $i\in\mathbb{N}$.
Let $X_n = a + \sum_{i=1}Z_i$ with $X_0=a$ for some $a \in\mathbb{Z}$.
Let $S=\mathbb{Z}$ be the state space and the transition probabilities of $\{X_n\}$ be defined by \begin{align*} (p_{ij}) = \begin{cases} P(Z_i =1)=p, &\text{if } j=i+1\\ P(Z_i =-2)=1-p, &\text{if } j=i-2 \end{cases} \end{align*} Note that $\sum_j p_{ij} = p_{ii+1} + p_{ii-2} = p + 1-p = 1$.
Then $\{X_n\}$ is a (time homogenous) Markov Chain on $S$ with transition probability $(p_{ij})$.
Define $T = \inf\{n\geq 1\mid X_n = \alpha \text{ or } X_n\leq\omega\}$, where without loss of generality, $\omega<a<\alpha$ and $\alpha,\omega\in\mathbb{Z}$.(in the Beat the drill case, $\alpha = 7$ and $\omega = -5$)
Then I just need to solve $E[T]$. The thing is that I'm only able to solve $E[T]$ when $p=2/3$ (since the chain is thus a martingale, $E[T] < \infty$ and we can also apply Wald's theorem) However, I am clueless when $p\neq 2/3$. Any hints or advice?

• This is my first time using cross validated. If I did anything wrong, please enlighten me – Sebastian Y. May 6 '18 at 7:44
• Consider the martingale $M_n = \left(\frac{1-p}p\right)^{X_n}$. – Math1000 May 17 '18 at 20:30