Q:

Why is my idea of the expected value of the number of coin tosses wrong?

Let's say we want to calculate the expected number of coin tosses until you get heads (including the last throw when you get heads). 
The expected number of coin tosses $E$ can be derived for example by recursion:
$E=(1-p)(E+1)+p$ and rearranging yields: $E= \frac{1}{p}$ where $p$ denotes the probability of heads. 
What I don't understand is why is it wrong to describe the recursion by:
$E=(1-p)(E+1)+pE$?
I thought that you have probability $(1-p)$ that the number of throws increases by $1$ and probability $p$ that the number of throws remains the same and hence you need the factor $E$.
Why is this reasoning wrong?
I know that there are already millions of questions/answers which deal with this problem. I am not interested in different solutions but rather in the mistake I made.

A:

Judging by your comment, you're confused about what this equation represents.  $E$ is the expected number of tosses until heads comes up.  We toss the coin.  With probability $p$ it shows heads and we stop.  With probability $1-p$, it shows tails.  How many tosses do we need in this case?  Th one we've already made plus the average number of tosses to get heads.  But that's just $E$, so $$E = p+(1-p)(1+E)$$
Another way of looking at is that you always need at least one toss, and with probability $1-p$ you get tails and you're back where you started.
$$E=1+(1-p)E$$
The expectation does not "change over time."  The fact that it doesn't is crucial to the calculation.  The expected number of further tosses we need in the case that tails comes up is exactly the same as the expected number of tosses we needed before we started. That's why we can use $E$ in both places in the equation.

