If average of an $L^1$ function is in S, then does $f \in S$?

60 Views Asked by At

Let $(X,\mathcal{M}, \mu)$ be a measure space with $f \in L^1(\mu)$. Given a set $S \subset \mathbb{R}$ which is not closed, if $ \frac{1}{\mu(E)} \int_E f \, d\mu \in S$ for all $E \in \mathcal{M}$, then does it imply that $f(x) \in S$ for $\mu$-almost every $x \in X$?

I intend to disprove the above statement, tried elementary functions but not getting any counter.