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?

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. 
