# IID sequence and stopping time

Let $X_0=0, X_1, X_2,\dots, X_N$ be i.i.d. random variables, with Gaussian distribution $\cal N (0,1)$. For $k=0,\dots, N, S_k=\sum_{i=1}^k X_i$ and $\tau=\min\{k:S_k^2\geq N-k\}$. So $\tau$ is a stopping time, while $\tau-1$ may not be one. My question is: $E[X_{\tau}]=0?\ E[X_{\tau}^2]=?$ Thanks for any hints, discussion and help.

Intuitively, in the joint pdf given any event where $X_\tau > 0$, there is a symmetric situation with $X_\tau < 0$ by flipping the sign of all the $X_i$ . By symmetry of the pdf, Integrating gets you zero.
Candidate martingales are $S_k$ and $S_k^2-k$ .