I am currently learning random walk and come across a problem concerning stopping time.
The question asks to give an example that $X_1,X_2,...$ independent r.v. with mean $0$ and variance $\sigma_i^2$, and $$E(S_T^2)\not=E (\sum_{i=1}^T \sigma_i^2) $$ when $E|T|<\infty$ and $T$ is a stopping time.
I am not sure how to construct such example as so far what I learned are all iid case and in iid case the above would be an equality. I know that in iid case and $E|T|=\infty$ there could be such inequality by letting $T=\min \{n: S_n=1\}$ of a symmetric simple random walk.