I roll an $n$ sided die, numbered $1 \to n$. If I roll a $1$, I walk away; otherwise, I roll the die again. This process could repeat indefinitely.
What is the probability, $P(n,r)$, that I will roll the die no more than $r$ times (walk away in $r$ rolls or fewer)?
The probability that I will walk away on (or before?!) the first roll is given by
$$ P(n,1) = \frac{1}{n} $$
On the second roll (assuming I did not roll a 1 on the first roll), there is still a $\frac{1}{n}$ chance of walking away; however, because there was a $\frac{1}{n}$ chance of walking away on the first roll, calculating P(n,2) is not so simple. Through the analysis of some probability trees, I have come up with the following equation.
$$ P(n,r) = \sum_{i=1}^r\frac{(n-1)^{i-1}}{n^i} $$
Is my equation correct? If so, can someone explain how to arrive at this equation logically (without rigorous analysis)?
Let us first find the probability that we do not walk away in $r$ or fewer rolls. This is the probability of $r$ failures (not $1$) in a row, which is $\left(\frac{n-1}{n}\right)^r$.
It follows that our required probability is $1-\left(\frac{n-1}{n}\right)^r$.
Remark: Your expression is correct. By summing your geometric series, one can get the same answer as the one above.