In: Statistics and Probability
Suppose you flip a biased coin (that lands heads with probability p) until 2 heads appear. Let X be the number of flips needed for this two happen. Let Y be the number of flips needed for the first head to appear. Find a general expression for the condition probability mass function pY |X(i|n) when n ≥ 2. Interpret your answer, i.e., if the number of flips required for 2 heads to appear is n, what can you say about the arrival of the first head?
WE have 
 has
negative binomial distribution and 
 has
geometric distribution with parameter 
.
The PMF of 
 is

The PMF of 
 is

The joint PMF of 
 is
found as follows: Observe that
 has
geometric distribution with parameter 
.
  has
geometric distribution with parameter 
.
Thus,

Using the conditional probability rule,

In the notation given in the question,

If the second head appears in the n-the 
 toss, then the first head appears in one of the tosses 
.
That is the second toss has equal probability of occurring in
one of n-1 tosses independent of p. Hence the conditional
probability