I need help to understand sum of independent identical distributed random variables.
Suppose we have a sequence of i.i.d discrete random variables, $\{X_i:i\geq 1\}$, with common probability mass function $f(k)=1/3$ where $k=1,2,3$. Now, let $S_n=\sum_{i=1}^nX_i$ for $n\geq 1$.
Find the probability that $S_n$ is even and find the probability that $S_n$ is even given that $S_{n-1}$ is even.
When we calculate the probability for $S_n$ is even, I think we are calculating $P(\sum_{i=1}^nX_i\;\text{ is even})$. At this point, I don't know how to use the property of i.i.d. to find the probability.
Considering that $S_n=S_{n-1}+X_n$,
$$ P(S_n \text{ even }|S_{n-1} \text{ even}) =P(X_n \text{ even}) =P(X_n =2)=1/3. $$ Also, $$ P(S_n \text{ even }|S_{n-1} \text{ odd}) =P(X_n \text{ odd}) =P(X_n \neq 2)=2/3. $$ Limiting conditions are $$ P(S_1 \text{ even }) =P(X_1 \text{ even}) =P(X_1= 2)=1/3 $$ These recursively define all the probabilities using the Law of total probability: $$ P(S_n \text{ even}) = P(S_{n-1} \text{ even})\times P(S_n \text{ even }|S_{n-1} \text{ even}) + P(S_{n-1} \text{ odd})\times P(S_n \text{ even }|S_{n-1} \text{ odd}) $$ With the more compact notation $p_n=P(S_n \text{ even })$ this translates as $$ p_n=(1/3)\times p_{n-1}+ (2/3)\times (1-p_{n-1})\qquad p_1=1/3. $$ You then get $$ p_1=1/3\quad p_2=(1/3)(1/3)+(2/3)(2/3)=5/9\quad p_3=(1/3)(5/9)+(2/3)(1-5/9)=13/27\quad p_4=(1/3)(13/27)+(2/3)(1-13/27)=41/81, \text{etc}. $$ With general form (given by Mathematica) $$ p_n=\frac12\left(1+\left(\frac{-1}{3}\right)^n\right) $$