Conditional Probability for two independent Let $X_1$ and $X_2$ be independent geometric random variables having the same parameter
$p$. Guess the value of $P\{X_1 = i\mid X_1 + X_2 = n\}$


*

*How do go about making a smart guess for this value?

*I can compute the probability but I do not understand why the denominator $P[X_1 + X_2 = n]$ follows a hypergeometric distribution. Could someone explain why please?
$$P\{X_1 = i\mid X_1 + X_2 = n\} = \frac{P[X_1 = i\mid X_2 = n - i]}{P[X_1 + X_2 = n]}$$
$$P\{X_1 = i\mid X_1 + X_2 = n\} = \frac{P[X_1 = i]  P[X_2 = n - i]}{P[X_1 + X_2 = n]}$$
 A: You have an infinite sequence of $0$s and $1$s.  Each entry has the same probability of being a $1$, and they're independent.  So you're asking about the conditional distribution of the location of the first $1$, given the location of the second $1$.  Given that there's only one $1$ in the sequence $X_1,\ldots,X_{n-1}$, there is no reason why it is more likely to be in one of those positions than in another.  So the conditional distribution is uniform.
Now a less soft answer:
\begin{align}
& \frac{\Pr((i-1)\text{failures followed by $1$ success})\cdot\Pr((n-i-1)\text{failures followed by $1$ success})}{\Pr(\text{exactly $1$ success in $n-1$ trials and then success on the $n$th trial})} \\[6pt]
= {} & \frac{q^{i-1}p\cdot q^{n-i-1}p}{(n-1)pq^{n-2}\cdot p} = \frac 1 {n-1}.
\end{align}
A: You can use the definition of conditional probability: 
$$P(X_1=i\mid X_1 + X_2 = n) = \frac{P(X_1 = i, X_1 + X_2 = n)}{P(X_1 + X_2 = n)}\\
=\frac{P(X_1 + X_2 =n \mid X_1 = i) P(X_1 = i)}{\sum_{j=1}^{n-1} P(X_2 + X_1 = n \mid X_1 =j) P(X_1 = j)}\\
=\frac{P(X_2 =n -i) P(X_1 = i)}{\sum_{j=1}^{n-1} P(X_2 = n - j) P(X_1 = j)}\\
=\frac{p(1-p)^{n-i-1} \cdot p (1-p)^{i-1}}{\sum_{j=1}^{n-1} p(1-p)^{n-j-1} p(1-p)^{j-1}}\\
=\frac{p^2(1-p)^{n-2}}{p^2(1-p)^{n-2}(n-1)} = \frac{1}{n-1}$$
