I am trying to understand the "story proof" found in this lecture.
I am a bit confused as how the expected value of a random variable differs from the the random variable itself when considering indicator functions.
Say there is a geometric distribution. $X$ counts the number of the failures before the first success, and $E(X)$ is the expected number of failures.
Now I want to compute the expected value given $p$, the probability of success, and $q$ otherwise.
Now I do first-step analysis, $$c=0\cdot p+(1+c)q.$$
In this step, I don't understand the coefficient of $q$. In $(1+c)$, $1$ makes sense but why $c$?
When computing the expected value: it is the $kp^kq^k$. So the coefficient $k$ is the value of the random variable. But in my example it is the expected value $c$ at the next step which confuses me.