Example of measures being ergodic but not invariant Let $\mu$ be a measure, $f:X\rightarrow X$ being a map and $\Sigma$ is a $\sigma$-algebra.

$\mu$ is $f$-invariant if $\mu(E) = \mu(f^{-1}(E)), \forall E\in \Sigma$.
$\mu$ is ergodic with respect to $f$ if   for every $E\in \Sigma $ with $f^{-1}(E) = E$, either $\mu(E)=1$ or $0$.

It looks like since $f^{-1}(E) = E$ so $\mu(E) = \mu(f^{-1}(E))$, $\mu$ being ergodic implies $\mu$ being $f$-invariant.
Is it true? or is there any counter-example to this claim?
 A: Take a biased coin with probabilities $\{p_, 1-p_i\}$ in the $i$-th flip, where $0 < \delta < p_i < 1 - \delta < 1$ and represent heads buy $0$ and tails by $1$.
You can identify the space given by fliping that coin infinitely many times with $([0,1], \mu)$ just as you do in the case of a non-biased coin, i.e: associate $\{0\}\times \{0,1\}^\mathbb{N}$ with $[0,0.5)$ and $\{1\}\times \{0,1\}^\mathbb{N}$ with $[0,5,1)$ and continue that process further sub-diving $[0,1]$ into dyadic intervals. Both $\mu$ and the Lebesgue measure $m$ have the same null sets. The action on $[0,1]$ induced by "shifting" the sequence of flips is ergodic, but not measure preserving.
This transformations are called "Bernoulli shifts". It is still reasonable to ask whether there are ergodic transformations that do not admit any invariant measure. 
A: Your argument is totally wrong: ergodicity is a condition on all sets $E$ such that $f^{-1}(E)=E$, rather than assertion that any such sets actually exist. 
 Indeed, this statement is false, and counterexamples are extremely easy to come by.  For instance, let $X$ be any finite set, with $\Sigma=\mathcal{P}(X)$ and $\mu$ any probability measure.  Then if $f:X\to X$ is a cyclic permutation of $X$, then $f$ is ergodic (the only invariant sets are $X$ and $\emptyset$), but $\mu$ is not $f$-invariant unless every singleton has the same measure.
