Probability distribution in phase space and Liouville's theorem? We can define a probability distribution over phase space (say 1D) $\rho(x,p)$ such that, for example,
$$\langle x\rangle = \int x \rho(x,p) dxdp$$ etc.
It can be shown here that such a distribution satisfies (analogously to fluid dynamics) $$\frac{d\rho}{dt} = 0$$ and therefore $$\frac{\partial \rho}{\partial t} = - \{\rho, H\} $$ where the term on the right is a Poisson bracket and $H$ is the Hamiltonian.
Now,  shouldn't $\frac{d\rho}{dt} = 0$ imply that $\rho=$ constant?
But surely $\rho$ must have some sort of time/spatial dependence to satisfy the second equation?
 A: What is meant is that
$$\frac{d\rho(q(t), p(t), t)}{dt} = 0$$
when $q,p$ are solutions to Hamilton's equations. While it is notationally convenient and space-saving to not write everything out in this detail, it is as you noted confusing. This particular confusion actually has a name -- it's the first fundamental confusion of calculus. (There's a second fundamental confusion, too.)
You can formulate Hamiltonian mechanics coordinate-freely, and then there will be no ambiguity, but this requires some machinery (but the proof of Liouville's theorem is very neat in this formulation). Vladimir Arnold's book Mathematical Methods of Classical Mechanics will show you how.
A: I think you are mistaking with the meaning of the total time derivative $\frac{d}{dt}$.
Actually,
$$
\frac{d\rho}{dt}=\partial_t \rho + \{\rho,H\}=0
$$
is nothing but a conservation law, or a continuity equation for the phase space density $\rho$. Actually, $\frac{d\rho}{dt}=0$ does not imply that $\rho$ is constant simply because $\rho$ is a field depending on several variables:
$$\rho\equiv\rho(q(t),p(t),t)$$
Thus, one can read from the equation the $\partial_t \rho$ term must exactly compensate the $\{\rho,H\}$ term at any point $(q,p)$ of the phase space, for each instant $t$. So, $\rho$ must be a function of $q$, $p$ and $t$ at the same time to be conserved.
Therefore, $\rho$ can't be a constant.
If you are more familiar with fluid-dynamics, you have a direct analogy with the material derivative, which is nothing but a total derivative.
For more completeness, one can write :
$$
\frac{d\rho}{dt}=\partial_t \rho +\mathbf{X}_H\cdot\mathbf{\nabla}\rho
$$
where $\mathbf{X}_H=\left[\begin{array}\\\dot{q}\\\dot{p}\end{array}\right]=\left[\begin{array}\\\frac{\partial H}{\partial p}\\-\frac{\partial H}{\partial q}\end{array}\right]$ is the Hamiltonian flow.
A: Again, keep in mind this :
Let us considere a $f$ function depending on a single variable $x$. Then, you have the following implication :
$$\forall x,\;\frac{df}{dx}(x)=0 \Rightarrow f(x)=c^{st}\; (\text{regarding}\;x) $$
i.e. $f$ does not explictly depend on $x$
If now $f$ depends on a set of $n$ independant variables $(x_i)_{i\in[1..n]}$, you have :
$$\forall i,\forall(x_1...x_n)\; \frac{\partial f}{\partial x_i}(x_1...x_n)=0 \Rightarrow f(x_1...x_n)=c^{st}\; \text{regarding}\;x_i$$
i.e. $f$ is only explictly depending on $n-1$ variables : $(x_1...x_{i-1}\,x_{i+1}...x_n)$
Now, if $f$ depends on a set of $n$ variables which are depending on a parameter $t$ : $(x_1(t)...x_n(t))$, then what as been said before is no longer true.
In such case, you have to follow a chain rule to perform a derivative in respect to $t$. In particular :
$$\frac{df}{dt}(x_1(t)...x_n(t))=0\nRightarrow f\; \text{is a constant regarding any}\;x_i(t)$$
of course. But,
$$\frac{df}{dt}(x_1(t)...x_n(t))=\sum_{i=1}^n\frac{\partial f}{\partial x_i}\frac{\
dx_i}{dt}=0\Rightarrow f\; \text{is a constant regarding}\;t$$
i.e. $f$ is "conserved" in respect of $t$.
Finally, for completeness, if now $f$ explictly depends on the parameter $t$, i.e. $f(x_1(t)...x_n(t),t)$, then :
$$\frac{df}{dt}(x_1(t)...x_n(t),t)=\frac{\partial f}{\partial t}+\sum_{i=1}^n\frac{\partial f}{\partial x_i}\frac{\
dx_i}{dt}=0\\\Rightarrow f\; \text{is globally a constant regarding}\;t$$
i.e. $f$ is "conserved" in respect of $t$ again. But, a priori $f$ still does explictly depend on $t$ because in that case you must verify the indentity :
$$\frac{\partial f}{\partial t}=-\sum_{i=1}^n\frac{\partial f}{\partial x_i}\frac{\
dx_i}{dt}\neq 0$$
In conclusion, all of this shows that $\frac{df}{dt}=0$ for a multi-variable dependent function $f$ means only that the growth rate of $f$ in respect of $t$ is zero but does not mean that $f$ does not explictly depend on $t$. 
