If $f:\mathbb R\to\infty$ is a continuous function, show that $\dfrac{1}{n}\sum_{i=1}^n f(S_i/\sqrt{i})\stackrel{d}{\to} \int_0^1 f(W(s))ds$ 
Suppose $X_1,...,X_n$ are iid with $E(X_1)=0,Var(X_1)=1$.  Let, with $S_0\equiv 0$, $S_i=\sum_{j=1}^i X_j$ for $1\leq i\leq n$. If $f:\mathbb R\to\mathbb R$ is a continuous function, show that $\dfrac{1}{n}\sum_{i=1}^n f(S_i/\sqrt{i})\stackrel{d}{\to} \int_0^1 f(W(s))ds$ where $W(\cdot)$ is standard Brownian motion with $W(0)=0$.

I can show that $\dfrac{1}{n} \sum_{i=1}^n f(S_i/\sqrt{n})\stackrel{w}{\to}\int_0^1 f(W(s))ds$. This is an application along with some technical details using Donsker. Which also kind of makes me suspicious that the denominator should be $\sqrt{n}$ and not $\sqrt{i}$ in the question. Indeed $S_i/\sqrt{i}\sim N(0,1)$. But I have no idea how to prove the statement.
 A: Here is a low-tech solution (with the exception that the maximal inequality is used in the last step):
Step 1. We will write
$$ I_n^{\textsf{RW}}(f) := \sum_{i=1}^{n} f\left(\frac{S_i}{\sqrt{n}}\right) \frac{1}{n}
\qquad\text{and}\qquad
I^{\textsf{BM}}(f) := \int_{0}^{1} f(W(s)) \, \mathrm{d}s. $$
Also, for each partition $\Pi = \{ 0 = t_0 < t_1 < \dots < t_m = 1 \}$, we write
$$ R^{\textsf{RW}}_n(f,\Pi) := \sum_{k=1}^{n} f\left( \frac{S_{\lfloor n t_{k-1}\rfloor}}{\sqrt{n}} \right) \frac{\lfloor n t_k \rfloor - \lfloor n t_{k-1} \rfloor}{n}. $$
Then by the multivariate CLT,
$$\biggl\{ \frac{S_{\lfloor n t_k\rfloor} - S_{\lfloor n t_{k-1}\rfloor}}{\sqrt{n}} \biggr\}_{k=1}^{m}
\quad \xrightarrow[n\to\infty]{d} \quad
\{ W(t_k) - W(t_{k-1}) \}_{k=1}^{m}, $$
and so,
$$ R^{\textsf{RW}}_n(f,\Pi) \quad \xrightarrow[n\to\infty]{d} \quad \sum_{k=1}^{n} f (W(t_{k-1})) (t_k - t_{k-t}) =: R^{\textsf{BM}}(f,\Pi) $$
Step 2. Assume first that $f$ is Lipschitz. If $M$ denotes the Lipschitz constant for $f$, then
\begin{align*}
&\mathrm{E}\left[ \left| I_n^{\textsf{RW}}(f) - R^{\textsf{RW}}_n(f,\Pi) \right| \right] \\
&\leq \sum_{k=1}^{m} \sum_{i \, : \, \frac{i}{n} \in (t_{k-1}, t_k]} \frac{1}{n} \mathrm{E}\left[ \left| f\left(\frac{S_i}{\sqrt{n}}\right) - f\left( \frac{S_{\lfloor n t_{k-1}\rfloor}}{\sqrt{n}} \right) \right| \right] \\
&\leq \sum_{k=1}^{m} \sum_{i \, : \, \frac{i}{n} \in (t_{k-1}, t_k]} \frac{M}{n} \mathbf{E}\left[ \left| \frac{S_i - S_{\lfloor nt_{k-1} \rfloor}}{\sqrt{n}} \right| \right] \\
&\leq \sum_{k=1}^{m} \sum_{i \, : \, \frac{i}{n} \in (t_{k-1}, t_k]} \frac{M}{n\sqrt{n}} \sqrt{\mathbf{Var}(S_i - S_{\lfloor nt_{k-1} \rfloor})} \\
&\leq M \sum_{k=1}^{m} \left( \frac{\lfloor nt_k \rfloor - \lfloor nt_{k-1} \rfloor}{n} \right)^{3/2} \\
&\xrightarrow[n\to\infty]{} M \sum_{k=1}^{m} (t_k - t_{k-1})^{3/2}.
\end{align*}
A similar estimate shows that
\begin{align*}
\mathrm{E}\left[ \left| I^{\textsf{BM}}(f) - R^{\textsf{BM}}(f,\Pi) \right| \right] \leq  M \sum_{k=1}^{m} (t_k - t_{k-1})^{3/2}.
\end{align*}
Step 3. The above bounds, together with the estimate $\left| e^{ix} - e^{iy} \right| \leq \left|x - y\right|$, shows that, for any $\xi \in \mathbb{R}$,
\begin{align*}
&\left| \mathbf{E}\bigl[ e^{i\xi I_n^{\textsf{RW}}(f)} \bigr] - \mathbf{E}\bigl[ e^{i\xi I^{\textsf{BM}}(f)} \bigr] \right| \\
&\quad \leq \left| \mathbf{E}\bigl[ e^{i\xi R^{\textsf{RW}}_n(f,\Pi)} \bigr] - \mathbf{E}\bigl[ e^{i\xi R^{\textsf{BM}}(f,\Pi)} \bigr] \right| \\
&\qquad + M |\xi| \sum_{k=1}^{m} \left( \frac{\lfloor nt_k \rfloor - \lfloor nt_{k-1} \rfloor}{n} \right)^{3/2} + M |\xi| \sum_{k=1}^{m} (t_k - t_{k-1})^{3/2},
\end{align*}
and so,
$$
\limsup_{n\to\infty} \left| \mathbf{E}\bigl[ e^{i\xi I_n^{\textsf{RW}}(f)} \bigr] - \mathbf{E}\bigl[ e^{i\xi I^{\textsf{BM}}(f)} \bigr] \right|
\leq 2M |\xi| \sum_{k=1}^{m} (t_k - t_{k-1})^{3/2}.
$$
Since the left-hand side does not depend on $\Pi$ and the right-hand side vanishes as $\|\Pi\| \to 0$,
$$ \lim_{n\to\infty} \mathbf{E}\bigl[ e^{i\xi I_n^{\textsf{RW}}(f)} \bigr] = \mathbf{E}\bigl[ e^{i\xi I^{\textsf{BM}}(f)} \bigr], $$
and therefore
$$I_n^{\textsf{RW}}(f) \quad \xrightarrow[n\to\infty]{d} \quad I^{\textsf{BM}}(f) .$$
Step 4. Now we move on to the general case. If $f$ and $g$ are continuous and $\lambda > 0$, then by the Doob's maximal inequality,
\begin{align*}
&\left| \mathbf{E}\bigl[ e^{i\xi I_n^{\textsf{RW}}(f)} \bigr] - \mathbf{E}\bigl[ e^{i\xi I_n^{\textsf{RW}}(g)} \bigr] \right| \\
&\leq |\xi| \mathbf{E}\bigl[ \bigl| I_n^{\textsf{RW}}(f - g) \bigr| \wedge 2 \bigr] \\
&\leq |\xi| \mathbf{E}\Bigl[ \bigl| I_n^{\textsf{RW}}(f - g) \bigr| : \max_{1\leq i\leq n} |S_i| \leq \lambda\sqrt{n}  \Bigr] + 2|\xi| \mathbf{P}\Bigl( \max_{1\leq i\leq n} |S_i| > \lambda\sqrt{n} \Bigr) \\
&\leq |\xi| \biggl( \sup_{|x| \leq \lambda} |f(x) - g(x)| + \frac{2}{\lambda^2} \biggr),
\end{align*}
and likewise
\begin{align*}
\left| \mathbf{E}\bigl[ e^{i\xi I^{\textsf{BM}}(f)} \bigr] - \mathbf{E}\bigl[ e^{i\xi I^{\textsf{BM}}(g)} \bigr] \right|
\leq |\xi| \biggl( \sup_{|x| \leq \lambda} |f(x) - g(x)| + \frac{2}{\lambda^2} \biggr).
\end{align*}
So if we choose $g$ as a Lipschitz function, then
$$ \limsup_{n\to\infty} \left| \mathbf{E}\bigl[ e^{i\xi I_n^{\textsf{RW}}(f)} \bigr] - \mathbf{E}\bigl[ e^{i\xi I^{\textsf{BM}}(f)} \bigr] \right|
\leq 2|\xi| \biggl( \sup_{|x| \leq \lambda} |f(x) - g(x)| + \frac{2}{\lambda^2} \biggr). $$
Since $g$ and $\lambda$ is arbitrary, we may make the right-hand side zero by first letting $g \to f$ uniformly over $[-\lambda, \lambda]$ and then letting $\lambda \to \infty$. Then arguing as in the previous step, we obtain the desired convergence statement.
