Let $(X,\mu)$ be a probability space and $f\colon (X,\mu)\to (X,\mu)$ be an ergodic automorphism. Let $\phi\in L^\infty(X,\mu)$ be such that $\int\phi d\mu=0$.


Suppose that for $\mu$-a.e. $x\in X$, it holds 


$$
\sup\_{n\geq 1} \left|\Sigma\_{j=0}^{n-1}\phi(f^j(x))\right|=\infty. 
$$


Then, is it possible that 
$$\inf\_{n\geq 1} \Sigma\_{j=0}^{n-1}\phi(f^j(x)) > -\infty, $$ 
for $\mu$-a.e. $x\in X$?



Two-side deviations for ergodic sums
Sure. Here is a recipe to construct such systems. Start from a dynamical systems which preserves a non-atomic probability measure and which is ergodic $(Y, \nu, T)$. Given an integrable random variable $r : Y \to \mathbb{N}^\*$, you can construct a tower over $Y$ of height $r$. Define a space:


$$X := \{(y,n) : \ y \in Y, \ 0 \leq n < r(y)\},$$


a probability measure:


$$\mu (B \times \{n\}) = \frac{\nu (B)}{\mathbb{E}\_\nu (r)} \ \ \forall B \subset \{r > n\} \text{ measurable},$$


and a transformation:


$$f(y,n) = \cases{(y,n+1) \text{ if } n+1 < r(y)\\ (T(y),0) \text{ if } n+1 = r(y)}.$$


Then $(X, \mu, f)$ is also a dynamical system which preserves the probability measure and which is ergodic. What we do is that we go up the tower, one level at a time, until we hit the roof. Then we apply $T$ and go back to the basis.


Now, assume that $r$ is even and essentially unbounded (which we can do, as $\nu$ is non-atomic), and define an observable:


$$\psi (y,n) = \cases{1 \text{ if } 2n < r(y)\\ -1 \text{ if } 2n \geq r(y)}.$$


This function is obviously bounded. Any point in $Y \times \{0\}$ sees $r(y)/2$ times $1$, then $r(y)/2$ times $-1$. Hence, when we go up the tower, $(S\_k \psi)\_{k \geq 0}$ increases by $r(y)/2$, then decreases by $r(y)/2$. We go back to the basis of the tower, having added nothing.


For any $(y,n)$, the sequence $(S\_k \psi (y,n))\_{k \geq 0}$ is bounded from below by $n-r(y)$ (that's the most "negative sum" we can gain until we hit the roof. Once we hit the roof, $(S\_k \psi)$ always increases before it decreases, so can't get more negative).


In addition, since $r$ is essentially unbounded and $(Y, \nu, T)$ is ergodic, the system will almost surely land at some $(y,0)$ with arbitrarily large $r(y)$, in which case $(S\_k \psi)\_{k \geq 0}$ increases by $r(y)/2$, which is also arbitrarily large. Hence, $\limsup\_k S\_k \psi = + \infty$ almost surely.


