Given a fair coin, what is the mean of the number of tails before we toss a head? 
Question: Given a fair coin, what is the mean of the number of tails before we toss a head?

Let $N$ be the number of tails before we toss a head. Then 
$$E(N) = \sum_{n=1}^\infty n P(N=n).$$
Since 
$$P(N=n) = \left(\frac{1}{2}\right)^{n-1}.$$
Then by using geometric series, we have 
\begin{align*}
E(N) & = \sum_{n=1}^\infty n P(N=n) \\
& = \sum_{n=1}^\infty n \left(\frac{1}{2}\right)^{n-1} \\
& = \frac{1}{(1-\frac{1}{2})^2} \\
& = 4.
\end{align*}
Are my calculations correct?
 A: Try to use your intuition to check if your answer is reasonable.  A value of $4$ suggests that on average, you'd get four tails before the first occurrence of heads.  Does that sound like a fair coin to you?
In fact, for a fair coin, if you reversed the roles of heads and tails--i.e., you asked the question, "What is the mean number of heads before we toss a tail," the answer would be the same.  But to have $4$ be the answer for both versions of the question is intuitively nonsensical.
Another way to reason about this question is to note that the first toss is either heads or tails with equal probability.  If heads, we observed $0$ tails.  But if the first toss is tails, then we have observed $1$ tail and the state of all future tosses is just the same as the state we were in before we made any coin tosses.  In other words, the mean number of additional tails (beyond the first) is the same as the original question, before we tossed the coin, because the coin doesn't remember what it did before.
So if $x$ is the mean number of tails before the first head, then $$x = (1/2)(0) + (1/2)(1+x).$$  The first term, $(1/2)(0)$, is the probability of getting heads on the first try, times the number of tails observed.  The second term is the probability of getting tails on the first try, times the total number of tails you expect to observe: the $1$ represents the tail you got, and the $x$ represents the fact that the mean number of additional tails in subsequent tosses is equal the mean number of tails for the whole experiment at the outset.  So $$2x = 1+x,$$ or $x = 1$.
A: $P(N=n)=\frac{1}{2}^{n+1}$ not $P(N=n)=\frac{1}{2}^{n-1}$. 
 $P(N=n)$ is the probability that we get n tails and then one head so $P(N=n)=\frac{1}{2}^{n}\frac{1}{2}=\frac{1}{2}^{n+1}$
A: Sorry but it's actually incorrect.
In fact, $P(N=n)=(\frac{1}{2})^{n+1}$.
Since if we got n tails before we toss a head,then the first $n+1$ results are confirmed.
