Recursive formula for Negative Binomial(?) random variable
I am struggling with this homework problem any help would be greatly appreciated.
Let X denote the random variable counting the number of tosses of a fair coin until (and including) the event of two consecutive heads. Let pn = P(X = n). Find p2. For n ≥ 3, find a recursive formula for pn in terms of pn-1 and pn-2 using the Low of Total Probability based on the fact that in order to obtain two consecutive heads for the first time in n tosses, either heads followed by tails occurred in the first two tosses and consecutive heads occurred for the first time in the subsequent n - 2 tosses, or tails occurred in the first toss and consecutive heads occurred in the subsequent n-1 tosses. Use this recursive formula to find the expected value of X.