I am self-learning undergrad calculus-based probability. I would like someone to check if my approach and deductions are sensible or completely wrong for this exercise problem 4.28, Intro to Probability by Blitzstein and Hwang. I have posted my solution attempt.
[BH 4.28] William is on a treasure hunt. There are $t$ pieces of treasure, each of which is hidden in one of the $n$ locations. William searches these locations one by one, without replacement, until he has found all the treasure (Assume that no location will contain more than one piece of treasure, and that William will find the treasure piece when he searches a location that does have the treasure.) Let $X$ be the number of locations that William searches during his treasure hunt. Find the distribution of $X$ and $E(X)$.
Solution. (My Attempt)
Let us denote the locations with a treasure as a white ball. Thus, we have $t$ white balls and $(n-t)$ black balls in the population. William starts sampling without replacement and stops when he finds the $t$th white ball.
When sampling without replacement from an urn with $w$ white balls and $b$ black balls, the number of black balls drawn before the $r$th white ball is drawn is a negative hypergeometric random variable, $NHGeom(w,b,r)$.
Here, $w = t, b = n - t, r = t$.
If $\{B = k\}$ is the event: $k$ black balls are drawn preceding the $r$th white ball, then the mass function of $B$ is given as,
\begin{align*} P \{ B = k \} &= \frac{{w \choose r - 1}{b \choose k}}{w + b \choose r + k - 1}\cdot \frac{w - (r - 1)}{w + b - (r + k - 1)} \\ &= \frac{{t \choose t - 1}{n -t \choose k}}{n \choose t + k - 1}\cdot \frac{t - (t - 1)}{n - (t + k - 1)} \\ &= \frac{t {n - t \choose k}}{n \choose t + k - 1} \cdot \frac{1}{n-(t + k - 1)} \end{align*}
But, we are interested in the distribution of $X = B + t$, the total number of locations searched. So,
\begin{align*} P(X = x) &= P(B + t = x) = P(B = x - t) \\ &= \frac{t {b - t \choose x - t}}{n \choose t + x - t - 1} \cdot \frac{1}{n-(t + x - t - 1)}\\ &= \frac{t {n - t \choose x - t}}{n \choose x - 1} \cdot \frac{1}{n - (x - 1)} \end{align*}
The mathematical expectation of a negative hypergeometric random variable is $\frac{rw}{b+1}$. So, $E(B) = \frac{t^2}{n - t + 1}$. Thus, $E(X) = E(B) + t = \frac{t(n+1)}{n - t + 1}$.
We have $$P(X=t+s)={{t-1+s}\choose{t-1}}/{{n}\choose{t}}$$ for $0\leq s\leq n-t$ by the stars and bars formula.
Calculating the EV will yield $$E(X)=\frac{(n+1)t}{t+1}.$$