Probability of a "run" of coin tosses. Given probability of tails is p, so heads is 1-p. Define X as a random variable for the length of a run (X=5 is either TTTTTH or HHHHHT). Find pmf.
So I think a run of just heads or just tails is pretty straightforward. A run of tails being, $P(X=x)=p(1-p)^x$ and a run of heads being $P(X=x)=(1-p)p^x$. I'm just not really sure how I would combine the two. At first I considered the pmf being
$p(1-p)^x+(1-p)p^x$, But $\sum_{x=0}^\infty p(1-p)^x+(1-p)p^x=2$, so it's not a valid pmf. Any help on this one?

$\textbf{Hint:}$ It is not possible to get a run of length 0.
