I've seen proofs of the fact that the probability of two random integers being coprime is $\frac{6}{\pi^2}$ (all of them leading to a use of the Riemann Zeta function and the Basel problem). In several cases it was mentioned that one can easily deduce from that the fact that the average order of $\phi(n)/n$ is also equal to $\frac{6}{\pi^2}$. To me this is not clear, maybe I am missing something obvious. Is this deduction possible and if it is, is there a easy way to see it?



Deduce average order of $\phi(n)/n$ from probability that two integers are coprime
So the rigorous statement that "two random integers have a $6/\pi^2$ probability of being coprime" is
$$
\lim\_{N\to\infty}\frac{1}{N^2}\sum\_{n=1}^N\sum\_{m=1}^N
\mathbf 1\_{m\text{ and }n\text{ are coprime}}\to \frac 6{\pi^2}.
$$


This is the same as
$$
\lim\_{N\to\infty}\frac 2{N^2}\sum\_{n=1}^N
\sum\_{m=1}^{n-1}\mathbf 1\_{m\text{ and }n\text{ are coprime}}\to \frac 6{\pi^2}.
$$


Or


$$
\lim\_{N\to\infty}\frac 2{N^2}\sum\_{n=1}^N \phi(n)\to \frac 6{\pi^2}.
$$
Using summation by parts, we have:
$$
\lim\_{N\to\infty}\frac{1}{N}\sum\_{n=1}^N\frac{\phi(n)}n=
\lim\_{N\to\infty} \frac 1N \left(
\frac {S\_N}N + \sum\_{n=1}^{N-1}\frac{S\_n}{n(n+1)}\right),
$$
where $S\_n=\phi(1)+\ldots+\phi(n)$. The previous equality shows $S\_N/N^2\to 3/\pi^2$, so that the limit on the right of the displayed equation converges to $6/\pi^2$ as required.


