Let $\Lambda(n)$ be the von Mangoldt function. The prime number theorem is equivalent to the statement that $\sum\_{n \leq N} \Lambda(n) \approx N$. Defining $\lambda\_{\*}(n)= \Lambda(n)-1$ we may rewrite this as $S(N) = \sum\_{n \leq N} \Lambda\_{\*}(n) =o(N)$. Now it is known that $|S(N)| \gg |N|^{1/2}$ infinitely often. Moreover, on the RH we have that $|S(N)| \ll N^{1/2}ln^2(N)$. Not that these estimates differ by a factor of $ln^2(N)$. 


My question is the following: What do probabilistic considerations suggest the correct error term to be? 


Let me suggest a model: Let $X\_n$ be a sequence of independent random variables such that $X\_n = \ln(n)-1$ with probability 1/ln(n) and $-1$ with probability $1-1/ln(n)$, and form the sum $T(N)= \sum\_{n=1}^{N} X\_n$. Is there an elementary function $E(N)$ such that $ \lim sup\_N |T(N)|/E(n) = 1 $ holds almost surely? 


Notice that if the primes had positive density in the integers and we adjusted our model accordingly the law of the iterated logarithm would allow us to take $E(N)$ to be a multiple of $|N|^{1/2}\ln\ln(N)$. 


(More generally, I'm interested in understanding sums of the above form (that is independent random variables with slowly increases variance) if you know of an appropriate reference.)



What does the probabilistic model suggest the error term in the PNT should be?
Let $P\_n$ be independent variables which are 1 with probability $1/\log n$ and $0$ with probability $1-1/\log n$ and let
$$ \Pi(x) = \sum\_{n\leq x} P\_n.$$


Then Cram\'{e}r showed that, almost surely,


$$ \limsup\_{x\rightarrow \infty} \frac{|\Pi(x)-\ell i(x)|}{\sqrt{2x}\sqrt{\frac{\log\log x}{\log x}}} = 1 $$


where


$$\ell i (x) = \int\_2^x \frac{dt}{\log t}.$$ 


See page 20 here: <http://www.dms.umontreal.ca/~andrew/PDF/cramer.pdf>


Edit: H. L. Montgomery has given an unpublished probabilistic argument that suggests


$$ \limsup\_{x\rightarrow \infty} \frac{|\psi(x)-x|}{\sqrt{x} (\log\log\log x)^2} = \frac{1}{2\pi}.$$


This is announced in: H.L. Montgomery, "The zeta function and prime numbers," Proceedings of the Queen's Number Theory Conference, 1979, Queen's Univ., Kingston, Ont., 1980, 1-31.


