TITLE: Measurable function remaining constant
QUESTION [6 upvotes]: This is a problem which appeared in one of my tests, which i wasn't able to solve.
Let $\Omega$ be a uncountable set. Let $S$ be the collection of subsets of $\Omega$ given by: $A \in S$ if and only if $A$ is countable or $A^{c}$ is countable. Suppose $f: \Omega \to \mathbb{R}$ is a real measurable function. Prove that there exists a $y \in \mathbb{R}$ and a countable set $B$ such that the $f(x)=y$ is on $B^{c}$.

REPLY [8 votes]: Here's a fun way to write the solution.
Define on $(\Omega, \mathcal{S})$ the probability measure $P(A) = 0$ if $A$ is countable, $P(A)=1$ if $A^c$ is countable.  Then $f$ can be seen as a random variable $X$.  Since all events have probability $0$ or $1$, all events, and hence all random variables, are independent.  Now there must be some $N$ with $P(|X| \le N) > 0$ (since $\Omega = \bigcup_{N=1}^\infty \{|X| \le N\}$ and $P$ is countably additive), hence $P(|X| \le N) = 1$.  So $X$ is a.s. bounded and in particular is $L^2$.  But $Var(X) = Cov(X,X) = 0$ since $X$ is independent of itself!  So $X = EX$ a.s., i.e. except on a countable set.