- #1

Eclair_de_XII

- 1,083

- 91

## Homework Statement

"A coin is tossed repeatedly, with ##\text{Pr} \{Heads\} = p## and ##\text{Pr} \{Tails\} = 1-p##. Let ##X## represent the number of coin flips until ##n## consecutive coin tosses all reveal a heads. Find ##E(X)##."

## Homework Equations

If ##P(A)>0##,

##E(X|A)=\sum_{x} x P([X=x]|A)##

My professor has informed me that this equation will not be of any real use to me in this problem.

## The Attempt at a Solution

First, I let ##H_k## denote the event of having achieved ##k## consecutive heads, and ##T_k## denote the event of getting a tails on the ##k##-th toss. So, I have to calculate ##E(X|H_n)## and ##E(X|H_n^c)##, in order to express the expected value as ##E(X)=E(X|H_n)p^n + E(X|H_n^c)(1-p^n)##. So I first calculate ##E(X|H_j)## for ##0\leq j <n##, but got lost as to how to proceed. I think I would need a second equation to go along with this one, to solve for ##E(X|H_j)##?

##E(X|H_j)=[1+E(X|H_{j+1})]p+E(X|H_0)(1-p)##

Feel free to decline to answer this, or redirect me to my previous topic about ##r## consecutive heads before ##s## consecutive tails. It's very similar, I should think.