Probability that a photon has suffered its last scattering 
An important consideration in the post-recombination epoch is the issue of the
  optical depth $\tau$ of the Universe due to Compton scattering. This is a dimensionless quantity such that $exp(−\tau)$ (often called the visibility) describes the attenuation of the photon flux as it traverses a certain length. The probability $dP$ that a photon has suffered a scattering event from an electron while travelling a distance $cdt$ is given by
$$dP=-\frac{dN_\gamma}{N_\gamma}=-\frac{dI}{I}=\frac{dt}{\tau_{\gamma e}}=n_e\sigma_Tcdt=-\frac{x\rho_m}{m_p}\sigma_T c\frac{dt}{dz}dz=-d\tau\hspace{1cm} (9.4.2)$$
where $N_\gamma$ is the photon flux, so that 
$$I(t_0,z)=I(t)exp\left(-\int_0^z\frac{x\rho_m}{m_p}\sigma_T c\frac{dt}{dz}dz\right)=I(t)exp[-\tau(z)];\hspace{2cm} (9.4.3)$$
$I(t_0,z)$ is the intensity of the background radiation reaching the observer at time $t_0$ with a redshift $z$ if it is incident on a region at a redshift $z$ with intensity $I[t(z)]$; $\tau(z)$ is called the optical depth of such a region. The probability that a photon, which arrives at the observer at the present epoch, suffered its last scattering
  event between $z$ and $z-dz$ is
$$-\frac{d}{dz}\{1-exp[-\tau(z)]\}dz=exp[-\tau(z)]d\tau=g(z)dz\hspace{4cm}{(9.4.4)}$$
The quantity $g(z)$ is called the differential visibility or effective width of the surface of last scattering;

This text was taken from "Cosmology. The origin and evolution of cosmic structure" by P.Coles, F.Lucchin.
I have some doubt about $(9.4.2)$ and $(9.4.4)$. 
I would write for $(9.4.2)$:
$$dP=-\frac{dN_\gamma}{N_\gamma}=-\frac{dI}{I}=...=...=-\frac{x\rho_m}{m_p}\sigma_T c\left|\frac{dt}{dz}\right|dz=-d\tau$$
because $z$ decreases from the Big Bang up to us and $t$ increases, so $\frac{dt}{dz}<0$, $dz<0$ and $dt>0$. (The same correction obviously inside the integral in $(9.4.3)$).
About $(9.4.4)$, what is not clear is the way in which "The probability that a photon, which arrives at the observer at the present epoch, suffered its last scattering event between $z$ and $z-dz$", was derived. How do I get the first expression of $(9.4.4)$?
Someone has any suggestion?
Thank you very much.
 A: Here is my attempt, if someone wants to check.
Thinking about $(9.4.2)$ I made a try:

The probability $dP$ that a photon has suffered a scattering event from an electron while travelling a distance $cdt$ is given by

$$dP=-\frac{dI}{I}$$
so I tought that $\Delta P=-\frac{\Delta I}{I}$ it should be the probability that a photon has suffered a scattering event from an electron while travelling a distance $c\Delta t$; thus if $c\Delta t$ is the distance from us:
$$\Delta P=-\frac{\Delta I}{I}=-\frac{I_f-I_i}{I_i}=-\frac{I(t_0,z)-I(t)}{I(t)}\overbrace{=}^{(9.4.3)}-\frac{I(t)e^{-\tau(z)}-I(t)}{I(t)}=1-e^{-\tau (z)}$$
$\Delta P=1-e^{-\tau (z)}$ is the probability that a photon (at redshift $z$) will undergo at least one more scattering before it reaches us (at $z=0$).
If this is correct, I can say that $1-(1-e^{-\tau(z)})=e^{-\tau(z)}$ is the probability that a photon suffers a scattering event before the redshift drops to $z$.
Thus

The probability that a photon, which arrives at the observer at the present epoch, suffered its last scattering
  event between $z$ and $z-dz$

is:
$$1-e^{-\tau(z)}-(1-e^{-\tau(z-dz)})=(1-e^{-\tau(z)})-(1-e^{-\tau(z-dz)})=\frac{d}{dz}\{1-e^{-\tau(z)}\}dz$$
and we have done, apart from the minus sign in front of $(9.4.4)$. It could be a typo. 
What do you think?
