# Showing that $S_n$ is a martingale with $P=\frac12$

$X_1,X_2,...$ is a sequence of Bernoulli random variables with

$X_i$=$1$ with probability p or $-1$ with probability $q=1-p$

and

$S_n=\sum_{i=1}^{n} X_i=X_1+X_2+...+X_n$

If $P=\frac{1}{2}$, how would I show that ${S_n}$ is a martingale?

$$P(S_n=x|S_{n-1}=x_{n-1},\cdots,S_1=x_1)=P(S_n=x|S_{n-1}=x_{n-1})=\left\{\begin{array}{cc} p & \text{if}~x=x_{n-1}+1\\ 1-p & \text{if}~x=x_{n-1}-1\end{array}\right.$$