Is the distribution of a random variable determined by its partial integrals? Let $(\Omega_i, \mathcal{F}_i, \mathbb{P}_i)$ be a probability space for $i \in \{1,2\}$, and let $X_i:\Omega_i\rightarrow[-\infty, \infty]$ be a $\mathbb{P}_i$-integrable random variable, respectively. If $\int_{\{X_1 \in A\}} X_1\ d\mathbb{P}_1 = \int_{\{X_2 \in A\}} X_2\ d\mathbb{P}_2$ for every Borel set $A$, does it follow that $X_1 \overset{d}{=} X_2$?
 A: Yes. Let $\mu_1$  and $\mu_2$ be the measures induced by $X_1$ and $X_2$. Then $\int_A xd\mu_1(x)=\int_A xd\mu_2(x)$ for every Borel set $A$. This implies that $xd\mu_1(x)=xd\mu_2(x)$ which implies $\mu_1$ and $\mu_2$ coincide on $\mathbb R \setminus \{0\}$. But $\mu_1$  and $\mu_2$ are probability measures so we necessarily have $\mu_1(\{0\})=\mu_2(\{0\})$ also.
Here is  a proof without using signed measures:
Lemma
Let $\mu$ and $\nu$ be two measures on the Borel sets of $\mathbb R$ such that $\int_A fd\mu=\int_Afd\nu$ for all Borel sets $E$ where $f$ is a non-negative meaurable function. Then $\mu (A)=\nu (A)$ for any Borel set contained in $\{x: f(x) >0\}$.
Proof: Taking linear combinations we get $\int fgd\mu=\int fg\nu$ for any simple function $g$. By Monotne Convergenec Theorem it follows that the equation holds for all non-negative measuarble functions $g$ (since we can express such a fucntion as an increasing limit of a sequence of simple functions). Let $E$ be any Borel set. Taking $g(x)=\chi_E\frac 1 {f(x)}$ of $f(x) >0$ and $0$ if $f(x)=0$ we see that $\mu(E\cap F)=\nu (E \cap F)$ where $F=\{x: f(x) >0\}$. Thsi proves te lemma.
Using this lemma we can complete the proof easily. Apply the lemma to restrictions of  $\mu_1$ and $\mu_2$ to $(0,\infty)$ to see that $\mu_1(E)=\mu_2(E)$ for any Borel set $E$ contained in $(0,\infty)$. Similarly, the same holds for any Borel set $E$ contained in $(-\infty,0)$. Finally, we get $\mu_1(\{0\})=\mu_2(\{0\})$ by the argument above.
