<s>[INST] Expected value of a negative binomial that has finite $n: n \lt \infty$? 
Cards from an ordinary deck are turned face up one at a time. Compute
  the expected number of cards that need to be turned face up in order
  to obtain 
(a) 2 aces; 
(c) all 13 hearts.

This is a homework problem straight from a chapter on Expectation from a probability textbook. The textbook has a section on finding the expected value of a negative binomial random variable, and says  $E[X] = E[X_1]+ E[X_2[ \dots + E[X_r] = \frac{r}{p}$.  
(The textbook defines the negative binomial distribution as the probability that $n$ trials are required until $r$ successes occur. It is assumed that $r$ is constant and $n$, the value of the negative binomial random variable, is unbounded i.e. may go to $\infty$. 
$$P(X = n) = \binom{n-1}{r-1}p^r (1-p)^{n-r}\ \ \ \ \text{for}\ r \le n \lt \infty$$ 
The problem (a) here seems to want the expectation of a negative binomial random variable, however, the above equation for $E[X]$ assumes that $r \le n \lt \infty$, but in the case of this problem, only up to $50$ cards may actually be selected such that $2$ are aces (there are $48$ non-aces, so the next $49$th, $50$th cards must be aces). In other words, for this problem $2 \le n \le 50$.
So instead of following the textbook's equation for $E[X]$, I tried to find $E[X]$ for (a), given $r = 2, p = \frac{4}{52}$ as
$$E[X] =  \sum_{n=2}^{50} n \binom{n-1}{2-1} \left(\frac{4}{52}\right)^2\left(\frac{48}{52}\right)^{n-2} \approx 19.8134 $$
If I follow the textbook, I get $E[X] = \frac{r}{p} = 2 \left(\frac{48}{52}\right)^{-1} = 26$. 
Are either of these answers correct? And is problem (c) essentially the same as solving (a)?
 [/INST] Using the identity
$$
\sum_{k=a}^{n-b}\binom{k}{a}\binom{n-k}{b}=\binom{n+1}{a+b+1}\tag{1}
$$
here is how I would approach (c):
The number of arrangements which get all $13$ hearts in exactly $k$ draws is $\binom{k-1}{12}\binom{52-k}{0}$; that is, the number of arrangements, with the $k^\text{th}$ draw being a heart, to arrange the other $12$ hearts in the previous $k-1$ draws and none in the remaining $52-k$ draws. The total number of arrangements is therefore
$$
\sum_{k=13}^{52}\binom{k-1}{12}\binom{52-k}{0}=\binom{52}{13}\tag{2}
$$
and the expected number of draws would be
$$
\begin{align}
\frac1{\binom{52}{13}}\sum_{k=13}^{52}k\binom{k-1}{12}\binom{52-k}{0}
&=\frac1{\binom{52}{13}}\sum_{k=13}^{52}13\binom{k}{13}\binom{52-k}{0}\\
&=\frac{13\binom{53}{14}}{\binom{52}{13}}\\
&=\frac{13\cdot53}{14}\\[12pt]
&\doteq49.214\tag{3}
\end{align}
$$
Since André Nicolas has given a complete answer to both parts of this, I will show how to use $(1)$ to handle (a):
The number of arrangements which attains $2$ aces in exactly $k$ draws is $\binom{k-1}{1}\binom{52-k}{2}$; that is, the number of arrangements, with the $k^\text{th}$ draw an ace, to have one ace in the first $k-1$ draws and the other two aces in the remaining $52-k$ draws. The total number of arrangements is therefore
$$
\sum_{k=2}^{52}\binom{k-1}{1}\binom{52-k}{2}=\binom{52}{4}\tag{4}
$$
and the expected number of draws would be
$$
\begin{align}
\frac1{\binom{52}{4}}\sum_{k=2}^{50}k\binom{k-1}{1}\binom{52-k}{2}
&=\frac1{\binom{52}{13}}\sum_{k=2}^{52}2\binom{k}{2}\binom{52-k}{2}\\
&=\frac{2\binom{53}{5}}{\binom{52}{4}}\\
&=\frac{2\cdot53}{5}\\[12pt]
&=21.2\tag{5}
\end{align}
$$

Identity $(1)$ is proven using negative binomial coefficients in this answer. Let's give a generating function approach here.
$$
\begin{align}
\frac{(1+x)^{n+1}-(1+y)^{n+1}}{x-y}
&=\frac{(1+x)^{n+1}-(1+y)^{n+1}}{(1+x)-(1+y)}\\
&=\sum_{k=0}^n(1+x)^k(1+y)^{n-k}\\
&=\sum_{k=0}^n\sum_{i=0}^k\binom{k}{i}x^i\sum_{j=0}^{n-k}\binom{n-k}{j}y^j\\
&=\sum_{i=0}^k\sum_{j=0}^{n-k}x^iy^j\sum_{k=0}^n\binom{k}{i}\binom{n-k}{j}\tag{6}
\end{align}
$$
Thus, the sum in $(1)$ is the coefficient of $x^ay^b$ in the right hand side of $(4)$. Let's compute the left hand side of $(4)$ in a different manner.
$$
\begin{align}
\frac{(1+x)^{n+1}-(1+y)^{n+1}}{x-y}
&=\sum_{k=0}^{n+1}\binom{n+1}{k}\frac{x^k-y^k}{x-y}\\
&=\sum_{k=0}^{n+1}\binom{n+1}{k}\sum_{j=1}^kx^{j-1}y^{k-j}\tag{7}
\end{align}
$$
The sole occurrence of $x^ay^b$ in $(5)$ is when $j=a+1$ and $k-j=b$; that is, $k=a+b+1$. Therefore, the coefficient of $x^ay^b$ is $\binom{n+1}{a+b+1}$. Thus, combining $(6)$ and $(7)$ yields $(1)$.
</s>