What is the difference between P(dx) and P(x)dx? I often come across the notation $P(dx)$ in statistics papers. Is there a strict mathematical definition for $dx$ inside $P$? 
Examples:
What is the exact meaning of 
$$\int f(x)P(dx)$$
and 
$$\int f(x)P(x)dx$$
Also sometimes I saw $\frac{P(dx)}{Q(dx)}$, is it equivalent to $\frac{P(x)}{Q(x)}dx$?
 A: If $P$ is a probability measure, then the notation $\int f(x) P(dx)$ is notation for the measure-theoretic integral of $f$ with respect to the probability measure $P$.
Another notation for $P(dx)$ that you might see is $dP(x)$.
Consider two concrete examples.


*

*If $P$ is the distribution of a continuous random variable $X$ with density function $p_X$ ("distribution" means a probability measure on the Borel subsets of $\mathbb{R}$), then
$$
\int f(x) \, P(dx) = \int_{-\infty}^\infty f(x) p_X(x) \, dx,
$$
where you can treat the right-hand side as an ordinary Riemann integral under many common scenarios.

*If $P$ is the distribution of a discrete random variable $X$ taking values in a countable set $\mathcal{X} \subseteq \mathbb{R}$ with probability mass function $p_X$, then
$$
\int f(x) \, P(dx) = \sum_{x \in \mathcal{X}} f(x) p_X(x).
$$
The benefit of the measure-theoretic approach is that you unify the theory of probability to get rid of the false dichotomy between continuous and discrete random variables: using measure theory, every expected value is an integral.
A: Typical notation will use 
$$ \int f(x) dP(x)  = \int f(x)P(x) dx $$
But the form you're using is also equivalent.
