Let M be the dyadic Hardy-Littlewood maximal operator. Prove the following: there is a constant $C$ such that for any $f$, $$ \inf_{x\in I}Mf(x)\le C 2^k\inf_{x\in J} Mf(x) $$ where $I$ and $J$ are dyadic intervals with $I\subset J$ and $2^k|I|=|J|$ for some positive integer $k$ (i.e. $I$ is the $k$-th generation of $J$).
I noticed that this theorem follows from $$\frac{1}{|J|}\int_JMf\le C\inf_{x\in J}Mf(x). $$ This is an interesting phenomenon, but I am unable to prove it.
You're unable to prove it because it's not true. Take $J=[0,1]$ and $f=\mathbb 1_{[0;2^{-k}]}$ with $k$ an integer. Then you have $\displaystyle\min_{x\in J} Mf(x)=Mf(1)=2^{-k}$. Now we also have
$Mf(x)=1$ if $x\in [0,2^{-k}[$
$Mf(x)=1/2$ if $x\in [2^{-k},2^{-k+1}[$
$Mf(x)=1/2^2$ if $x\in [2^{-k+1},2^{-k+2}[$
...
$Mf(x)=1/2^j$ if $x\in [2^{-k+j-1},2^{-k+j}[$
...
$Mf(x)=1/2^{-k}$ if $x\in [1/2,1[$
So $\displaystyle\int_{[0;1]} Mf(x)dx=2^{-k}+\frac{1}{2}2^{-k}+\frac{1}{2^2}2^{-k+1}+\frac{1}{2^3}2^{-k+2}+\ldots+\frac{1}{2^{-k}}2^{-1}=2^{-k}+k\cdot2^{-k-1}$
and so $\displaystyle\min_{x\in J} Mf(x)=o\left(\displaystyle\int_{[0;1]} Mf(x)dx\right)$ when $k$ goes to infinity, so your last inequality can't hold for every $f$.
Remember that even if $f$ is bounded with compact support $Mf$ is not integrable, so $\displaystyle\int_{-r}^r Mf(x)dx$ goes to infinity when $r$ goesto infinity while $\displaystyle\int_{-r}^r |f(x)|dx$ stays bounded so they're not "comparable" : the integral of $f$ is a little $o$ of the integral of $Mf$ when $r$ goest to infinity. "Rescale" everything with the change of variable $u=rx$ and you have another proof (without calculations) that your inequality can't hold. In fact the first proof is just a particular case of the second one.
This doesn't say anything about the first inequality (which is most likely true since it's in a book) but i'm not sure this was your question.