TITLE: Probability of $n$ heads if coin is flipped until 8 tails.
QUESTION [5 upvotes]: Suppose a fair coin is flipped until 8 tails occur. Let X be the number of heads that appear. What is the probability mass function of X? I answered ${n- 1 \choose 7}*(0.5)^n$, since it is a negative binomial random variable but this got marked wrong. I don't see how to get to any other answer. Any help is appreciated!

REPLY [4 votes]: Suppose that $T$ is the number of flips until (and including) the $8$th tail. Then $T$ is a negative binomial random variable, with
$$ \mathbb{P}(T=n)={n-1\choose 7}2^{-n} $$
for $n=8,9,10,\dots.$
Since $X=T-8$, it follows that
$$ \mathbb{P}(X=n)=\mathbb{P}(T=n+8)={n+7\choose 7}2^{-n-8}$$
for $n=0,1,2,\dots$.