Numéraire — couldn't understand the wiki explanation

I'm trying to understand Numéraire concept so am reading the wiki page:

I couldn't understand the last formula's 2nd equation:

$$E_{Q}\left[\left.\frac{M(0)}{M(T)}\frac{N(T)}{N(0)}\frac{S(T)}{N(T)}\right| \mathcal{F}(t)\right]/ E_Q\left[\left.\frac{M(0)}{M(T)}\frac{N(T)}{N(0)}\right| \mathcal{F}(t)\right] = \frac{M(t)}{N(t)}E_{Q}\left[\left.\frac{S(T)}{M(T)}\right| \mathcal{F}(t)\right]$$

Why so? Which part from the left hand side is mapped into $\frac{M(t)}{N(t)}$ and which part mapped to $E_{Q}\left[\left.\frac{S(T)}{M(T)}\right| \mathcal{F}(t)\right]$?

Just for reference, below is copied from the wiki page.

-- begin of wiki >>

In a financial market with traded securities, one may use a change of numéraire to price assets. For instance, if $M(t)=exp(∫_0^t r(s)ds)$ is the price at time $t$ of $\$1$that was invested in the money market at time$0$, then all assets (say$S(t)$), priced in terms of the money market, are martingales with respect to the risk-neutral measure, (say$Q$). That is $$\frac{S(t)}{M(t)}=E_Q\left[\left.\frac{S_T}{M_T} \right| F_t\right], ∀t≤T$$ Now, suppose that$N(t)>0$is another strictly positive traded asset (and hence a martingale when priced in terms of the money market). Then, we can define a new probability measure$Q^N$by the Radon–Nikodym derivative $$\frac{d Q^N}{dQ}=\frac{N_T/N_0}{M_T/M_0}$$ Then, by using the abstract Bayes' Rule it can be shown that$S(t)$is a martingale under$Q^N$when priced in terms of the new numéraire,$N(t)$: $$E_{Q^N}\left[\left.\frac{S(T)}{N(T)}\right| \mathcal{F}(t)\right]$$ $$= E_{Q}\left[\left.\frac{M(0)}{M(T)}\frac{N(T)}{N(0)}\frac{S(T)}{N(T)}\right| \mathcal{F}(t)\right]/ E_Q\left[\left.\frac{M(0)}{M(T)}\frac{N(T)}{N(0)}\right| \mathcal{F}(t)\right]$$ $$= \frac{M(t)}{N(t)}E_{Q}\left[\left.\frac{S(T)}{M(T)}\right| \mathcal{F}(t)\right] = \frac{M(t)}{N(t)}\frac{S(t)}{M(t)} = \frac{S(t)}{N(t)}$$ << end of wiki-- 1 Answer If you are interested in the proof of the Baye's Rule for conditional expectations you can find it here The sake of completeness: The Baye's rule for conditional expectations states $$E^Q[X|\mathcal{F}]E^P[f|\mathcal{F}]=E^P[Xf|\mathcal{F}]$$ With$f=dQ/dP$- thus being the Radon-Nikodyn derivative and$X$being some random variable and$\mathcal{F}$being some sigma-algebrad. Now we need to apply that rule to the change of numeraire context. From the Change of Numeraire Theorem we not that$dQ^N/dQ^M$is given by $$f=\frac{dQ^N}{dQ^M}=\frac{M(0)N(T)}{M(T)N(0)}$$ In the next step we insert this$f$into above theorem and also subtitute$X$for$S(T)/N(T)$$$E^{Q^N}\left[\frac{S(T)}{N(T)}|\mathcal{F}_t\right]E^{Q^M}\left[\frac{M(0)N(T)}{M(T)N(0)}|\mathcal{F}_t\right]=E^{Q^M}\left[\frac{S(T)}{N(T)}\frac{M(0)N(T)}{M(T)N(0)}|\mathcal{F}_t\right]$$$\frac{S(T)}{N(T)}\frac{M(0)N(T)}{M(T)N(0)}$simplifies to$\frac{S(T)}{M(T)}\frac{M(0)}{N(0)}$. Now perhaps the crucial step.$N(t)$is a numeraire and thus a tradeable asset.$M(t)$is also a numeraire and$Q^M$is its equivalent measure. Thus$N(t)/M(t)$is a martingale under$Q^M$. This leads to $$E^{Q^M}\left[\frac{M(0)N(T)}{M(T)N(0)}|\mathcal{F}_t\right]=\frac{M(0)N(t)}{M(t)N(0)}$$ Deviding by this fraction results in $$E^{Q^N}\left[\frac{S(T)}{N(T)}|\mathcal{F}_t\right]=\frac{N(0)M(t)}{N(t)M(0)}E^{Q^M}\left[\frac{S(T)}{M(T)}\frac{M(0)}{N(0)}|\mathcal{F}_t\right]= \frac{N(0)M(t)}{N(t)M(0)}\frac{M(0)}{N(0)}E^{Q^M}\left[\frac{S(T)}{M(T)}|\mathcal{F}_t\right]$$ This leads to $$E^{Q^N}\left[\frac{S(T)}{N(T)}|\mathcal{F}_t\right]=\frac{M(t)}{N(t)}E^{Q^M}\left[\frac{S(T)}{M(T)}|\mathcal{F}_t\right]$$ Now we know that$S(t)/M(t)$is a martingale under$Q^M\$. Thus the desired result follows.

$$E^{Q^N}\left[\frac{S(T)}{N(T)}|\mathcal{F}_t\right]=\frac{M(t)S(t)}{N(t)M(t)}$$