Given a locally integrable function $f: \mathbb R \to \mathbb R$, define $
K: \mathbb R \times \mathbb R+ \to \mathbb R$ by 


$$
K(x, r) :=
\begin{cases}
1, & \text{if }f(x) > \dfrac{1}{2r}\displaystyle\int\limits\_{B\_{r}(x)}f\,\mathrm{d}x\\
-1, & \text{if }f(x) < \dfrac{1}{2r}\displaystyle\int\limits\_{B\_{r}(x)}f\,\mathrm{d}x\\
0,& \text{if }f(x) = \dfrac{1}{2r}\displaystyle\int\limits\_{B\_{r}(x)}f\,\mathrm{d}x
\end{cases}
$$


Define $U: \mathbb R \to [-1, 1]$ and $L: \mathbb R \to [-1, 1]$ by 


$$
\begin{split}
U(x) &:= \limsup\_{r \to 0} \frac{1}{2r}\int\limits\_{B\_r(0)} K(x, t)\,\mathrm{d}t\\
L(x) &:= \liminf\_{r \to 0} \frac{1}{2r}\int\limits\_{B\_r(0)} K(x, t)\,\mathrm{d}t
\end{split}
$$


Intuitively, $U$ and $L$ represent the weighted proportion of time a function spends above or below its average value in an infinitesimal neighbourhood of a point.


i) Is it true that for any locally integrable function, $U = L$ a.e?


ii) Is it true that $U = 1, 0, or -1$ a.e.?



How much time does a function spend above or below its average value around a point?
For i) the Brownian motion gives a counter example.


We choose $f(t)=W\_t$ with $W\_t$ a Brownian on $\mathbb{R}$. Because one can calculte $U(0)$ and $L(0)$ from the Brownian motion restricted to any neighbourhood of $0$, we can apply Blumenthal’s 0-1 law: There exists $c\_1,c\_2\in \mathbb{R}$ such that $\mathbb{P}(U(0)=c\_1)=1$ and $\mathbb{P}(L(0)=c\_2)=1$. By symetry we have $c\_1 =-c\_2$. Moreover for any $0<a<1$ there exists $\epsilon$ such that for all $r>0$
$$\mathbb{P}\Big(\frac{1}{2r}\int\_{B\_r(0)}K(0,t)dt \geq a\Big)>\epsilon$$ Therefore $c\_1\geq a$ and we conclude that $c\_1=1$ and $c\_2=-1$. 


Finally by translation invariance of the Brownian motion we have for all $t\in \mathbb{R}$ $$\mathbb{P}(U(t)=1)=\mathbb{P}(L(t)=-1)=1$$


