TITLE: Random variables with the same distributions
QUESTION [5 upvotes]: Let $K$ and $L$ be locally compact Hausdorff spaces. Also, let $P$ be a Radon probability measure on $K$ so that $(K,P)$ is a probability space.
I want to know, whether two random variables $X,Y\colon K\to L$ (they might be assumed to be continuous) have the same distributions. 
Is it sufficient if I check that 
$$\int_K f(X(\omega))P(d\omega) = \int_K f(Y(\omega))P(d\omega)$$
for each $f\in V$, where $V$ is some dense subspace of the Banach space $C_0(L)$ of continuous functions on $L$ which vanish at infinity?

REPLY [4 votes]: Yes.
Recall that the distribution of $X$ is the Borel probability measure $\mu_X$ defined on $L$ via $\mu_X(A) = P(X^{-1}(A))$.  It is a standard exercise to show that for any measurable $f : L \to \mathbb{R}$, we have $\int_L f\,d\mu_X = \int_K f(X)\,dP$.  (This holds for $K,L$ any measurable spaces.)
So we want to know whether $\mu_X = \mu_Y$, and your hypothesis says that $\int f\,d\mu_X = \int f\,d\mu_Y$ for all $f \in V$.  If $\mu_X, \mu_Y$ are Radon measures on $L$, then it certainly follows from the Riesz representation theorem that $\mu_X=\mu_Y$; they are two continuous linear functionals on $C_0(L)$ which agree on a dense set.
Following Exercise 18 in these notes of Terry Tao, we can show:

If $X$ is continuous, then $\mu_X$ is Radon.

This gives you an affirmative answer to your question.
Proof.  We first show $\mu_X$ is inner regular.  Let $E \subset L$ be Borel and fix $\epsilon > 0$.  $X^{-1}(E)$ is Borel, and $P$ is Radon, so there exists a compact $F \subset X^{-1}(E)$ with $P(F) > P(X^{-1}(E)) - \epsilon$.  Now $X(F)$ is a compact  subset of $E$, and we have $X^{-1}(X(F)) \supset F$.  Thus $$\mu_X(X(F)) = P(X^{-1}(X(F))) \ge P(F) > P(X^{-1}(E)) - \epsilon = \mu_X(E) - \epsilon$$ and inner regularity is proved.
As in t.b.'s comment, outer regularity follows from inner regularity by taking complements.
Note we did not use the assumption of $\sigma$-compactness which is assumed in Tao's notes, so this will work on any LCH space.
Let me also mention that other topological assumptions could make it easier.  If $L$ is Polish or even Suslin, then every Borel probability measure on $L$ is automatically Radon, and no topological assumptions on $K,X,Y$ are needed.    (This is proved, for instance, in Bogachev's Measure Theory.)