I couldn't understand the expression below for the problem,
consider a gambler who plays a sequence of fair games. Let $X_i$ be the amount the gambler wins on the $i^{th}$ game ($X_i$ is negative if the gambler loses), and let $Z_i$ be the gambler's total winnings at the end of the $i^{th}$ game. Because each game is fair,
$\mathbb{E}[X_i] = 0$
and $\mathbb{E}[Z_{i+1}|X_1, X_2, ..., X_i] = Z_i + \mathbb{E}[X_{i+1}] =Z_i$
Why is $\mathbb{E}[X_i] = 0$. Even with fair/unbiased coin tosses the expectation of heads is 1/2?
Since in gamble we win (+1) or lose(-1) the expectation = 1(1/2) + (-1)(1/2) = 0 wheras in coin toss we lose(0) and win(1), the expectation = 1(1/2) + 0(1/2) = (1/2).