Let $(\Omega,\Sigma,\mathbb{P})=([0,1),\mathscr{B}([0,1)),\lambda)$, where $\lambda$ is the lebesgue measure. For $k\in\mathbb{N}$, define $$\mathcal{D}_k= \Bigg\{\Bigg[\frac{i}{2^k},\frac{i+1}{2^k}\Bigg):i=0,1,2...2^k-1 \Bigg\}\qquad\mathscr{F}_k:=\sigma(\mathcal{D_k})$$
For $f\in L^2([0,1])$,define $M_k(f):=E(f|\mathscr{F}_k)$ for $k\in\mathbb{N}$
For any $k\in\mathbb{N}$, $M_k(f)$ can be expressed as $$\large{M_k(f)=\sum^{2^k-1}_{i=0}\mathbf{1}_{[\frac{i}{2^k},\frac{i+1}{2^k})}2^k\int^{\frac{i+1}{2^k}}_{\frac{i}{2^k}}f(s)ds}\tag{1}$$
Question 1 I can see this equation is similar to the definition of conditional expectation condition on sigma algebra, which is $$E(X|\sigma(A))=\sum^{n}_{i=0}\frac{E(X\mathbf{1}_{A_i})}{\mathbb{P}(A_i)}\mathbf{1}_{A_i}\qquad\text{where $\{A_i\}$ partition $\sigma(A)$}$$ I am consued where is that $2^k$ comes from? and why is that $2^k$ will analogues to $\frac{1}{\mathbb{P}(A_i)}$? Why it is $ds$ rather than $d\lambda$?
Question 2 My professor gives proof about this, and there is a step I do not understand, I am looking for concrete operation and how it goes with it.
$$\large{\int_{I^k_j}\Bigg(\sum^{2^k-1}_{i=0}\mathbf{1}_{[\frac{i}{2^k},\frac{i+1}{2^k})}2^k\int^{\frac{i+1}{2^k}}_{\frac{i}{2^k}}f(s)ds\Bigg)dx=\color{red}{\int_{I^k_j}2^k\int_{I^k_j}f(s)dsdx=\int_{I^k_j}f(s)ds}}$$
I would like to know how does equality happen in the red part.
Question 3 $$\large{M_k(f)(t)=\frac{1}{|I_t|}\int_{I_t}f(s)ds}\tag{2}$$ This is equivalent to (1), from the definition $E(X|A)$ I can sort of get it, but I have no idea about how exactstep from equation (1) to this one.
genuinely thank you for your help.