I'm curious about what is known about the distribution of the function $\frac{1}{\pi}\operatorname{Arg} \zeta(1/2+2\pi i t) \in (-1,1]$, on a linear or logarithmic scale, where $\operatorname{Arg}$ is the principal value of the argument. In particular, does it have mean value $0$? In other words, is it true that $$\lim_{x \to \infty} \frac{1}{x}\int_0^x \frac{1}{\pi}\operatorname{Arg} \zeta(1/2+2\pi i t) \, dt = 0?$$ If not, then does the function have a mean value of some sort, or is it equidistributed in some sense? Maybe some of its higher order moments exist?

Here is a Mathematica plot of the function on $[0,500]$.

EDIT: The problem is motivated by my answer to my own question at Riemann-Von Mangoldt formula

The reason you want the principal value of arg is that you want the function to have discontinuities at the imaginary parts of the nontrivial zeros of $\zeta(s)$ normalized by $\frac{1}{2\pi}$. Here is a graph of the function $\frac{1}{\pi}\operatorname{Arg} \zeta(1/2+2\pi i t)$ on $[0,16]$ along with a plot of the said normalized imaginary parts of the zeros. (I don't know how to make the image larger.)

SECOND EDIT: @Lucia mentions a possible connection with the Riemann-Siegel or Hardy $Z$ function, but I don't quite follow how it's related. Here's another graph with the $Z$ function in the same image but on the interval $[0,12]$. How does one relate the mean value of the arg of zeta function with the $Z$ function?

11more comments