I was reading my professor's slides (a sort of Introduction to Statistical Mechanics) and unfortunately, they do not seem to be as clear as I'd want them to be, therefore I've come here for help.
After some introductory statements, a probability density function $\rho(\mathbf{q,p},t), \mathbf{q,p} = q_1,....,q_n,p_1,...,p_n$ is defined as follows (I'll drop the vector signs when obvious):
An ensemble is represented by a distribution of several points in the phase space $\Gamma$, usually a continuous distribution. The ensemble can be described by a probability function $\rho(\mathbf{q,p})$, defined in such a way that the quantity: $$\rho d\mathcal{\mathbf{V}}, d\mathbf{V} = d\mathbf{q}d\mathbf{p}$$ tell us "how much" the points representative of the system, which at a given time $t$ are contained in the infinitesimal volume, contribute.
Then, after some derivations, the continuity equation is presented as a consequence of the necessary existence of a conservation law that regulates $\rho$: $$\frac{\partial \rho(q,p,t)}{\partial t} = -\nabla \cdot (\rho \mathbf{v}) \tag{1}$$ where $\mathbf{v}$ " compactly denotes the time-derivatives of the variables associates with $\rho$"
It is then said that, from $(1)$, one easily obtains the following equation: $$ -\frac{\partial \rho(q,p,t)}{\partial t} = \sum_i \left[ \frac{\partial ( \rho \dot{q_i})}{\partial q_i}+ \frac{\partial (\rho \dot{p_i} )}{\partial p_i} \right]$$
I was unsuccessful in computing this final result, mainly because I do not know how to interpret the divergence operator when applied to quantities depending on generalized coordinates and conjugated momenta, and I'm not sure if $\mathbf{v}$ can be seen as a sort of $\{\dot{\mathbf{q}}, \dot{\mathbf{p}}\}$. I'd gladly accept any help in deriving it.