I guess it is $\frac12$ as $P(0) = P(1) = 0.5$. While I was told it is $\frac13$. How to solve this type of problem?
Thank you.
Edit by advices:
$f(n) = \left\{\begin{aligned}{0, \text{n is odd natural number}\\1, \text{n is even natural number or 0}} \end{aligned}\right.$
What is the E[f(n)]?