Integral of distribution followed by Bernoulli I am new to learning probability theory. Here I got confused but I had a sense of feeling it's correct. This is what I saw from the lecture notes.
Let $P\sim Bern(p), Q\sim Bern(q)$. Then is the integration making any sense?
$$\displaystyle\int \dfrac{(dP-dQ)^2}{2(dP+dQ)}= \dfrac{(p-q)^2}{2(p+q)}+\dfrac{(1+p-(1-q))^2}{2(1-p+1-q)}$$
and
$$\displaystyle\int dP = p+(1-p)=1$$
If they are correct, can anyone give me any explanation of some reference I can read? I tried to search it but didn't find anything related.
 A: The Bernoulli distribution is a finite support distribution with support $\{0,1\}$. The notation $\text{d}P$ and the concept of an integral are thus delicate in such a finite setting.
If $\mu$ denotes the counting measure on $\{0,1\}$, with
$$\int_A \text{d}\mu = \mathbb I_A(0) + \mathbb I_A(1)$$
the density of $P$ with respect to $\mu$ is
$$\frac{\text{d} P}{\text{d} \mu}(x)= p^x(1-p)^{1-x}\mathbb I_{\{0,1\}}(x)$$
and in particular
$$\int \text{d} P = \int \frac{\text{d} P}{\text{d} \mu}(x) {\text{d} \mu} = p+(1-p)=1$$
Hence
$$\dfrac{(\text{d} P-\text{d} Q)^2}{(\text{d} P+\text{d} Q)}=
\dfrac{(\frac{\text{d} P}{\text{d} \mu}-\frac{\text{d} Q}{\text{d} \mu})^2}{(\frac{\text{d} P}{\text{d} \mu}+\frac{\text{d} Q}{\text{d} \mu})}\text{d} \mu$$
and
\begin{align}\dfrac{(\frac{\text{d} P}{\text{d} \mu}-\frac{\text{d} Q}{\text{d} \mu})^2}{(\frac{\text{d} P}{\text{d} \mu}+\frac{\text{d} Q}{\text{d} \mu})}(x)&=
\dfrac{(p^x(1-p)^{1-x}-q^x(1-q)^{1-x})^2}{p^x(1-p)^{1-x}+q^x(1-q)^{1-x}}\mathbb I_{\{0,1\}}(x)\\
&=\dfrac{(p-q)^2}{p+q}\mathbb I_{1}(x)+\dfrac{((1-p)-(1-q))^2}{(1-p)+(1-q)}\mathbb I_{0}(x)\end{align}
This implies
\begin{align}\int\dfrac{(\text{d} P-\text{d} Q)^2}{(\text{d} P+\text{d} Q)}
&=\int \dfrac{(p-q)^2}{p+q}\mathbb I_{1}(x)\text{d}\mu+\int\dfrac{((1-p)-(1-q))^2}{(1-p)+(1-q)}\mathbb I_{0}(x)\text{d}\mu\\
&=\dfrac{(p-q)^2}{p+q}+\dfrac{(p-q)^2}{2-p-q}\end{align}
