Solution (source code)

= Solution

The <Skorokhod embedding of a centered random walk> states that a <random walk> with independent identically distributed centered steps of finite <variance> $\sigma^2$ can be realized on an appropriate probability space as
$$
S_n=B_{T_n},\qquad 0=T_0\leq T_1\leq T_2\leq\cdots,
$$
where $B$ is a standard <Brownian motion> and the $T_n$ are finite <stopping times>. More precisely, the stopped positions have the same joint law as the given <random walk>, and the pairs
$$
(T_n-T_{n-1},\,B_{T_n}-B_{T_{n-1}}),\qquad n\geq1,
$$
may be chosen independent and identically distributed. Their spatial component has the step law, and $\mathbb E(T_n-T_{n-1})=\sigma^2$. Repeating the one-step <Skorokhod embedding theorem> with the <Strong Markov property> gives this formulation. In the present normalization, the mean time increment is one, and the <strong law of large numbers> gives $T_n/n\to1$ <almost surely>.

The <Donsker invariance principle> states that the linearly interpolated diffusively rescaled <random walk>
$$
W_n(t)=\frac{S_{\lfloor nt\rfloor}
+(nt-\lfloor nt\rfloor)X_{\lfloor nt\rfloor+1}}{\sqrt n},
\qquad 0\leq t\leq1,\qquad S_0=0,
$$
converges weakly as a random element of $C[0,1]$, equipped with the <uniform norm>, to standard <Brownian motion> restricted to $[0,1]$. At $t=1$ the fractional term is zero. The only step assumptions needed here are zero mean, unit <variance>, and independent identical distributions; a higher moment or bounded support is not required. This is a <functional central limit theorem>, concerning the entire interpolated path rather than only its endpoint.