Show that the limit $\frac{1}{n}\sum_{i=1}^n \left(\frac{\ln(i)}{\ln(n)}\right)^2 \to 1$ I saw this in a lecture note, but having trouble proving it. 
Show $ \lim_{n\to \infty} \frac{1}{n}\sum_{i=1}^n \left(\frac{\ln(i)}{\ln(n)}\right)^2 \to 1$. For each $n\geq 1$, it is easy to show that $\frac{1}{n}\sum_{i=1}^n \left(\frac{\ln(i)}{\ln(n)}\right)^2 \leq 1$ so that the limit is bounded above by $1$. It follows from  the fact that for all $i\in \{1,...,n\}$, $\ln(i)\leq \ln(n)$. 
I tried to find a lower bound that converges to $1$ as $n\to \infty$, but I haven't been very successful. One idea I had was to use convexity of the quadratic function and show that 
$$
\left(\frac{\ln(i)}{\ln(n)}\right)^2\geq \left(\frac{\ln(n)}{\ln(n)}\right)^2 + 2\left(\frac{\ln(n)}{\ln(n)}\right)\left(\frac{\ln(i)-\ln(n)}{\ln(n)}\right).
$$
Then, 
$$ 
\frac{1}{n}\sum_{i=1}^n \left(\frac{\ln(i)}{\ln(n)}\right)^2 \geq \frac{1}{n}\sum_{i=1}^n \left\{1+2\frac{\ln(i)-\ln(n)}{\ln(n)}\right\}
$$
$$
=1+\underbrace{\frac{2}{n}\sum_{i=1}^n \left\{\frac{\ln(i)-\ln(n)}{\ln(n)}\right\}}_{\in(-2,0)}.
$$
I was hoping to show the second term converges to $0$ as $n\to \infty$, but it didn't quite pan out. Any ideas? Also, do you think it can be generalized to $ \lim_{n\to \infty} \frac{1}{n}\sum_{i=1}^n \left(\frac{\ln(i)}{\ln(n)}\right)^p \to 1$ for any $p\geq 1$?
..........Edit.............
Using @sharding4 suggestion
$\sum_{i=1}^n \ln(i) \approx n\ln(n)-n+1$, we get
$$
\frac{1}{n}\sum_{i=1}^n \left\{\frac{\ln(i)-\ln(n)}{\ln(n)}\right\}\approx \frac{n\ln(n)-n+1-\ln(n)n}{n\ln(n)}\to 0 
$$
as $ n\to \infty$. So second term does indeed converge to $0$. Thank you for the help!
 A: This works for
any exponent $m$,
not just $2$,
$\begin{array}\\
\frac{1}{n}\sum_{i=1}^n \left(\frac{\ln(i)}{\ln(n)}\right)^m
&=\frac{1}{n\ln^mn}\sum_{i=1}^n \ln^m(i)\\
&=\frac{1}{n\ln^mn}\sum_{i=1}^n (\ln(n)+\ln(i/n))^m\\
&=\frac{1}{n}\sum_{i=1}^n (1-\frac{\ln(n/i)}{\ln(n)})^m\\
&\ge\frac{1}{n}\sum_{i=1}^n (1-m\frac{\ln(n/i)}{\ln(n)})
\qquad\text{Bernoulli's inequality}\\
&=1-\frac{m}{n\ln(n)}\sum_{i=1}^n \ln(n/i)\\
&=1-\frac{m}{n\ln(n)}\sum_{i=1}^n (\ln(n)-\ln(i))\\
&=1-\frac{m}{n\ln(n)}(\ln(n^n)-\ln(n!))\\
&\gt 1-\frac{m}{n\ln(n)}(n\ln(n)-n(\ln(n)-1))
\qquad\text{since }n! > (n/e)^n\\
&= 1-\frac{m}{n\ln(n)}(n)\\
&= 1-\frac{m}{\ln(n)}\\
\end{array}
$
so the sum is between
$1-\frac{m}{\ln(n)}
$
and
$1$,
so its limit is $1$.
A: OP, it looks to me like you solved the problem virtually entirely yourself. Just observe that $$=1+\frac{2}{n}\sum_{i=1}^n \frac{\ln(i)-\ln(n)}{\ln(n)} = 1 + \frac{2}{n\ln(n)}\ln(\frac{n!}{n^n})$$
and conclude easily that the RHS tends to $1$.
A: I thought it might be instructive to present an approach that uses the Euler-Maclaurin Summation Formula (EMSF).  To that end, we proceed.

Usign the EMSF, we can write
$$\begin{align}
\sum_{i=1}^n \log^2(i)&=\int_1^n \log^2(x)\,dx+\frac12 \log^2(n)+O\left(\frac{\log(n)}{n}\right)\\\\
&=\left(n\log^2(n)-2n\log(n)+2n-2\right)+\frac12 \log^2(n)+O\left(\frac{\log(n)}{n}\right)\tag 1
\end{align}$$
Dividing $(1)$ by $n\log^2(n)$ and letting $n\to \infty$ yields the coveted limit
$$\lim_{n\to \infty}\frac1n \sum_{i=1}^n \left(\frac{\log(i)}{\log(n)}\right)^2=1$$
as was to be shown!

Alternatively, since $\log^2(i)$ is monotonically increasing we can bound the sum $\sum_{i=1}^n \log^2(i)$ as
$$\int_1^n \log^2(x)\,dx \le \sum_{i=1}^n \log^2(i)\le \int_1^{n+1} \log^2(x)\,dx \tag 2$$
Carrying out the integral in $(2)$ reveals
$$\begin{align}n\log^2(n)-2n\log(n)+2n-2 &\le \sum_{i=1}^n \log^2(i) \le (n+1)\log^2(n+1)-2(n+1)\log(n+1)+2n\end{align}$$
whence dividing by $n\log^2(n)$ and letting $n\to \infty$ yields 
$$\lim_{n\to \infty}\frac1n \sum_{i=1}^n \left(\frac{\log(i)}{\log(n)}\right)^2=1$$
as expected!
A: I just noticed a proof that seems to have escaped attention. Our expression equals
$$\tag 1 \frac{1}{\ln^2 n}\sum_{k=1}^n (\ln^2 k) \frac{1}{n}.$$
Now
$$(\ln k)^2 = (\ln (k/n) + \ln n)^2 = \ln^2 (k/n) + 2\ln (k/n)\cdot \ln n + \ln^2 n.$$
Thus $(1)$ equals
$$\tag 2 \frac{1}{\ln^2 n}\left (\sum_{k=1}^n \ln^2 (k/n) \frac{1}{n} + \ln n\sum_{k=1}^n 2\ln (k/n) \frac{1}{n} +\ln^2 n \right ).$$
As $n\to \infty,$ the first sum in $(2)$ goes to $\int_0^1 \ln^2 x\, dx.$ The second sum in $(2)$ goes to $2\int_0^1 \ln x \, dx.$ These integrals, although improper, are nice and finite. Dividing by $\ln^2 n$ then gives $0+0 +1 = 1$ for the desired limit.

Previous proof: Writing the expression as
$$\tag 1\frac{\sum_{k=1}^{n}\ln^2 k}{n\ln^2 n},$$
we are heartened to see Stolz-Cesaro waving at us. So we consider
$$\tag 2\frac{\ln^2 (n+1)}{(n+1)\ln^2 (n+1) -n\ln^2 n}.$$
Now the derivative of $x\ln^2 x$ equals $\ln^2 x +2\ln x.$ So by the mean value theorem, the denominator in $(2)$ equals $\ln^2 c_n +2\ln c_n$ for some $c_n \in (n,n+1).$ I think I'll stop here; deducing the limit in $(2)$ is $1$ is now pretty straightforward, and thus S-C shows the limit of $(1)$ is $1.$
A: For brevity let $S(n)=\frac {1}{n}\sum_{j=1}^n\left(\frac {\log j}{\log n}\right)^2$ for $n>1.$
For $r\in (0,1)$  we have $$S(n)\geq \frac {1}{n}\sum_{n^r\leq j\leq n}\left(\frac {\log j}{\log n}\right)^2\geq \frac {1}{n}\sum_{n^r\leq j\leq n}\left(\frac{ \log n^r}{\log n}\right)^2=\frac {1}{n}\sum_{n^r \leq j\leq n}r^2\geq$$ $$\geq \frac {1}{n}r^2(n-n^r-1)=r^2(1-n^{-r}-n^{-1}).$$
Therefore $\lim_{m\to \infty}\inf_{n\geq m}S(n)\geq \lim_{m\to \infty}\inf_{n\geq m}r^2(1-n^{-r}-n^{-1})=r^2.$ 
Since this holds for any $r\in (0,1)$ we have $\lim_{m\to \infty}\inf_{n\geq m}S(n)\geq \sup \{r^2:r\in (0,1)\}=1.$
