Let $S_n=S_0+X_1+...+X_n$ is a 1D random walk on $\mathbb{Z}$ with the $X_i$ iid with $P(X_i=1)=p$ and $P(X_i=-1)=1-p=q$. Suppose we start at $z$ where $z$ is between 0 and $a$. Let $D_z=$expected time until random walk hits 0 or a starting from $z$.
I am having trouble understanding a bound on $D_z$ given in the resource I am using. It says,
We know that there is one simple way to hit 0 or $a$: get $+1$ or $−1$ for $a$ times in a row. This happens with probability $p^a+q^a$,and takes $a$ steps. So even if this were the only way to hit 0 or $a$, the expected duration would be $\frac{a}{p^a+q^a}$. So we must have $D_z\le \frac{a}{p^a+q^a}$.
I don't understand where the $\frac{a}{p^a+q^a}$ comes from, in particular, why we are dividing by $p^a+q^a$ instead of multiplying. This must be a conditional probability? But I don't see what of. Of course I am wrong here because it we were multiplying, it would make no sense for this to be an upper bound.
It's because it's a probability. Split your time interval $[0, \infty)$ into intervals of length $a$: $[0, \infty) = [0, a) \cup [a, 2a) \cup \cdots$. If one interval consists entirely of only $+1$-s or of only $-1$-s, then the walk must have hit one of the end points. Call the probability that this happens $r$. The resource you cite points out that $r = p^a + q^a$.
Now, how many intervals do you have to consider until you find such an interval? Write $I_k := [ (k-1)a, ka )$ for the $k$-th interval. Define $Y_k := 1$ if the interval $I_k$ consists entirely of only $+1$-s or of only $-1$-s. Set $Y_k := 0$ otherwise. The first $K$ such that $I_K = 1$ then satisfies $K \sim \operatorname{Geom}(r)$, a Geometric random variable with mean $1/r$.
Each interval $I_k$ has length $a$. Thus the expected time for the walk to hit the boundary is at most $a \cdot \mathbb E(K) = a / r$. Plugging in $r = p^a + q^a$ gives the claimed result!