Let $(\Omega,\mathscr{F}, P)$ be a probability space, let $\nu$ be a finite measure on $\mathscr{F}$, and let $\mathscr{F}_{1}$, $\mathscr{F}_{2}$,... be a non-decreasing sequence of $\sigma$-fields in $\mathscr{F}$. Suppose that $P$ dominates $\nu$ when both are restricted to $\mathscr{F}_{n}$. There is then a density or Radon-Nikodym derivative $X_{n}$ of $\nu$ with respect to $P$ (the $X_{n}$ are a martingale with respect to the $\mathscr{F}_{n}$).

Now, let $P$ be Lebesgue measure on the $\sigma$-field $\mathscr{F}$ of Borel subsets of $\Omega = (0, 1]$, and let $\mathscr{F}_{n}$ be the finite $\sigma$-field generated by the partition of $\Omega$ into dyadic intervals $(k2^{-n},(k+1)2^{-n}],0\leq k \leq 2^{n}$. we know that for every finite measure $\nu$ the Radon-Nikodym derivative is $$X_{n}(\omega)=\dfrac{\nu(k2^{-n},(k+1)2^{-n}]}{2^{-n}}$$ where $\omega\in(k2^{-n},(k+1)2^{-n}]$. But I don't know how to derive it.

Thanks and Regards!

1. Show (or recall) that any $\mathcal{F}_n$-measurable function $X$ is of the form $$X(\omega) = \sum_{j=0}^{2^n-1} c_j 1_{(j 2^{-n},(j+1)2^{-n}]}(\omega)$$ for suitable constants $c_j \in \mathbb{R}$.
2. Since $X_n$ is $\mathcal{F}_n$-measurable, Step 1 shows that there exist constants such that $$X_n(\omega) = \sum_{j=0}^{2^n-1} c_{j,n} 1_{(j 2^{-n},(j+1)2^{-n}]}(\omega).$$
3. If $X_n$ is the Radon-Nikodym derivative of $\nu$ with respect to $P$ restricted to $\mathcal{F}_n$, it holds that $$\int_F X_n \, d\mathbb{P} = \nu(F)$$ for all $F \in \mathcal{F}_n$. Choosing $F := (j2^{-n},(j+1)2^{-n}] \in \mathcal{F}_n$, we find $$c_{j,n} 2^{-n} = \int_F X_n \, d\mathbb{P}= \nu(F) = \nu((j 2^{-n},(j+1)2^{-n}]),$$ i.e. $$c_{j,n} = \frac{\nu((j 2^{-n},(j+1)2^{-n}])}{2^{-n}}.$$ Hence, $$X_n(\omega) = \sum_{j=0}^{2^n-1} \frac{\nu((j 2^{-n},(j+1)2^{-n}])}{2^{-n}}1_{(j 2^{-n},(j+1)2^{-n}]}(\omega).$$