Asymtotic convergence between a Sum and an Integral. Let $ X_1,\ldots,X_n $ be a series on independent random variables that follow the Poisson distribution with mean $1$. Then, define Y as follows:
$$ Y_0 =1 \text{ and } Y_i = Y_{i-1} + X_i -1$$
And condition $Y$ on the event that $Y_n=0$ and $Y_i > 0$ for all $0<i<n$.
Let $g(i/n)= \frac{1}{\sqrt{n}}Y_i $.
Interpolating linearly between the obtained values creates a curve $g(s)$ on $[0,1]$.
Now let $$A = \int^1_0 g(s)\,ds $$
And define the sum
$S_n = \sum^{n-1}_{i=1}(Y_i -1) $.
I wish to show that $n^{-3/2}S_n \thicksim A$ as $n$ approaches infinity.
I have used numerical methods to check if this is true, and to my knowledge it is. However, I cannot seem to figure out a nice way to show this. Any help would be much appreciated.
 A: You are interpolating linearly, so for $s \in \left[\frac{i}{n},\frac{i+1}{n}\right]$ we get $$g(s) = \frac{g\left(\frac{i+1}{n}\right) - g\left(\frac{i}{n}\right)}{\frac{i+1}{n} - \frac{i}{n}}\left(s - \frac{i}{n}\right) + g\left(\frac{i}{n}\right)$$
With the given definitions this simplifies to
$$g(s) = \sqrt{n}(Y_{i+1} - Y_i)\left(s - \frac{i}{n}\right) + \frac{1}{\sqrt{n}}Y_i$$
So we get: \begin{align*}
A &= \int^1_0 g(s)\,ds \\ &= \sum_{i=0}^{n-1} \int_\frac{i}{n}^\frac{i+1}{n} g(s)\, ds \\ &= \sum_{i=0}^{n-1} \left(\sqrt{n}(Y_{i+1} - Y_i)\int_\frac{i}{n}^\frac{i+1}{n}\left(s - \frac{i}{n}\right)\,ds + \frac{1}{n\sqrt{n}}Y_i\right)\\ &= \sum_{i=0}^{n-1} \left(\sqrt{n}(Y_{i+1} - Y_i)\frac{1}{2n^2}\,ds + \frac{1}{n\sqrt{n}}Y_i\right) \\&= \frac{1}{2}n^{-3/2} \sum_{i=0}^{n-1}(Y_{i+1} - Y_i + 2Y_i) = \frac{1}{2}n^{-3/2}\sum_{i=0}^{n-1}(Y_{i+1} + Y_i) \end{align*}
But we can rewrite: $$
\sum_{i=0}^{n-1}(Y_{i+1} + Y_i)  = 2S_n + Y_n + Y_0 + 2(n-1)$$
So in total we get by considering $$Y_n - 1 = \sum_{j=1}^n \left(X_n - 1\right) = \sum_{j=1}^n \left(X_n - E[X_n]\right)$$ that
\begin{align*}
A &= n^{-3/2}S_n +\frac{1}{2}n^{-3/2}(Y_n + 2n - 1) \\ &= n^{-3/2}S_n +\frac{1}{2}n^{-1/2}\left(\frac{1}{n}\sum_{j=1}^n \left(X_n - E[X_n]\right) + 2\right)\end{align*}
But by the law of large numbers we have $\frac{1}{n}\sum\limits_{j=1}^n \left(X_n - E[X_n]\right) \to 0$ hence the desired result.
