This is the original question:
Let $U$ be uniform on $[0, 1],$ and consider a sequence of random variables $X_1, X_2, \ldots$ which are i.i.d. with Bernoulli($U$) distribution given $U.$ Let $S_n = X_1+\cdots+X_n$. Show that $M_n = \frac{S_n}{n}$ is a martingale with respect to the filtration $\mathcal{F}_n = \sigma(X_1, \ldots , X_n)$.
I am experiencing calculating problem in my proof, which goes as follows:
First we have: $$E\left[\frac{S_{n+1}}{n+1} \mid \mathcal{F}_n \right] = E\left[\frac{S_n+X_{n+1}}{n+1} \mid \mathcal{F}_n\right] = \frac{S_n}{n+1}+\frac{1}{n+1}E[X_{n+1}\mid\mathcal{F}_n]$$
Then since $\mathcal{F}_n$ is the sigma field generated by a set of 0-1 random variable, then $$E[X_{n+1}\mid\mathcal{F}_n](\omega)=\sum_{(x_1,\ldots,x_n)\in\{0,1\}^n}c_{(x_1,\ldots,x_n)}1(X_1=x_1,\ldots,X_n=n)(\omega)$$ where $c_{(x_1,\ldots,x_n)}=E[X_{n+1}\mid X_n =x_n, \ldots, X_1=x_1]$.
Then \begin{equation} \begin{aligned} & E[X_{n+1}\mid X_n = x_n,\ldots,X_1=x_1] \\[8pt] = {} & P(X_{n+1}=1\mid X_n=x_n,\ldots,X_1=x_1)\\[8pt] = {} & \frac{P(X_{n+1}=1,X_n=x_n,\ldots,X_1=x_1)}{P(X_n=x_n,\ldots,X_1=x_1)}\\[8pt] = {} & \frac{\int_0^1 P(X_{n+1}=1,X_n=x_n,\ldots,X_1=x_1\mid u)\,du}{\int_0^1 P(X_n=x_n,\ldots,X_1=x_1\mid u)\,du}\\[8pt] = {} & \frac{\int_0^1 P(X_{n+1}=1\mid u)P(X_n=x_n\mid u) \cdots P(X_1=x_1\mid u)\,du}{\int_0^1 P(X_n=x_n\mid u) \cdots P(X_1=x_1\mid u) \, du}\\[8pt] = {} &\frac{1}{n+2}\cdot\frac{(x_1+\cdots+x_n+1)!(n-(x_1 + \cdots + x_n))!}{(x_1+\cdots+x_n)!(n-(x_1+\cdots+x_n))!}\\[8pt] = {} & \frac{x_1+\cdots+x_n+1}{n+2} \end{aligned} \end{equation} So $$E[X_{n+1}\mid\mathcal{F}_n](\omega) = \sum_{k=0}^n c_k1(S_n=k)(\omega) = \sum_{k=0}^n \frac{k+1}{n+2}1(S_n=k)(\omega) = \frac{S_n+1}{n+2}(\omega)$$ So $$E[M_{n+1}\mid\mathcal{F}_n] = S_n\left(\frac{n+3}{(n+1)(n+2)}\right) + \frac{1}{(n+1)(n+2)}$$ which is apparently not $S_n$ on the right hand side.
I just wonder what is wrong with my calculation.
If $\left( \frac{S_n} n \right)_{n=1}^\infty$ is a martingale then $\Pr\left( \frac{S_2} 2 =1 \mid \frac{S_1} 1 = 1 \right) = 1.$
But clearly $\Pr\left( \frac{S_2} 2 = \frac 1 2 \mid \frac{S_1} 1 = 1 \right) >0.$