# If two random variables have CDFs that have the same value for all x, can we assume the random variables are equal?

My text has the following theorem:

Let $X$ have a CDF $F$ and let $Y$ have CDF $G$. If $F(x) = G(x)$ for all $x$, then $\mathbb{P}(X \in A) = \mathbb{P}(Y \in A)$ for all $A$.

I don't see a way that X and Y could assign a different probability to the same event but still have their CDFs be equal at every point. If they disagreed at point j, then F(j) will not equal G(j). Therefore they must be the same?

• "the random variables are equal" in distribution. Apr 20 '18 at 18:17
• The title and the body of the question are asking different problems.
– Did
Apr 23 '18 at 8:09

Elementary probability:

They don't teach this is in elementary probability, but random variables have an explicit representation known as the Skorokhod representation.

Basically, we never really know the formulas for a lot of the $X$'s. We know the $X$'s mainly from the $F_X(x)$'s. It's kinda like talking about $f(x)=x^2+c$'s through their common derivative $f'(x)=2x$: When is $f$ increasing? When $f' > 0$. We know that if $f$ is not unique given an $f'(x)$. We can do that through integration, or just construct an explicit example $f(x)=x^2+5$ and $f(x)=x^2+4$.

How we do similarly here in probability?

For example, consider $X \sim Be(p)$ where $P(X=0):=p$ and $P(X=1):=1-p$ (Usually, textbooks use $p$ for the $P(X=1)$).

If both of the following $X_i$'s satisfy $X \sim Be(p)$, then we've given explicit Bernoulli random variables that can never be the same, i.e. $X \sim Be(p)$ doesn't have a unique Skorokhod representation.

$$X_1(\omega) := 1_{(0,1-p)}(\omega) := 1_{A_1}(\omega)$$

$$X_2(\omega) := 1_{(p,1)}(\omega) := 1_{A_2}(\omega)$$

If $\omega=\frac{1-p}{2}$, then $X_1(\omega)=1$ while $X_2(\omega)=0$.

Let us try to compute the CDF of $X_i$:

$P(X_i(\omega) \le x)$ is 0 for $x<0$ and 1 for $x \ge 1$.

As for $0 \le x < 1$, define

$$P(X_i(\omega) \le x) = P(X_i(\omega) = 0) = P(1_{A_i}(\omega) = 0) = P(\omega \notin A_i) = 1 - P(\omega \in A_i)$$

We have our result if $P(\omega \in A_1) = P(\omega \in A_2) = 1-p$. Is it?

Okay so here, we need to need to make some kind of assumption to say that the interval $(p,1)$ is not only as probable as $(0,1-p)$ but also that probability of each interval is $1-p$. Clearly, the intervals have the same length, but does that mean they have the same probability? Furthermore, if they do, is it equal to That depends on how we define probabilities here. One such assumption is:

A uniformly distributed random variable $U$ on $(0,1)$ has Skorokhod representation $U(\omega) = \omega \sim Unif(0,1)$.

Hopefully this isn't circular, otherwise this half of the answer is nonsense.

Then $P(\omega \in A_i) = \frac{(1-p)-(0)}{1-0}$ or $= \frac{(1)-(p)}{1-0}$

$$P(\omega \in A_i) = \frac{1-p}{1-0} = 1-p$$

It can be shown that $$Y(\omega) = \omega \sim Unif(0,1)$$ for $\omega$ in $((0,1),\mathscr B(0,1),\mu)$ where $\mu$ is Lebesgue measure.

Hence,

$$P(\omega \in A_i) = \mu(A_i) = l(A_i) = 1-p$$

where $l$ is length.

• I'm not familiar with the notation: $1_(0,1-p)$ What does it mean? I can tell you're defining a function that takes an outcome but I don't know what the subscript is telling me. Apr 29 '18 at 15:51
• Let $\omega, p \in (0,1)$. $1_{(0,1-p)}(\omega) = 1$ if $\omega \in (0,1-p)$. Otherwise, $1_{(0,1-p)}(\omega) = 0$. Do you know indicator functions aka characteristic functions?
– BCLC
Apr 30 '18 at 6:10

For elementary probability:

I think it's just saying that if the cdf's are the same then the pdf's are the same. PDF's don't always exist in advanced probability.

Do you seriously prove that? Anyway, it likely comes down to how 'all' $A$ (subsets of $\mathbb R$?) that you can come up with is somehow 'related' to $(-\infty, x]$. For example,

$$A = (a,x] = (-\infty,x] \cap (-\infty,a]^c$$ $$A = (-\infty, x) = (-\infty, x] \cap \{x\}^c$$ $$A = \{x\} = (-\infty, x] \cap (-\infty, x)^c$$ $$A = \{x\} \cup [a,b] = [(-\infty, x] \cap (-\infty, x)^c] \cup [(-\infty,b] \cap (-\infty,a)^c]$$

Thus, if you can compute $P((-\infty, x])$ for all $x$, then you can compute $P(X \in A)$ for 'all' A. The thing is not all subsets of $\mathbb R$ are 'related' to $(-\infty, x]$. But that's okay because even in advanced probability, we don't mind those subsets. In advanced probability, there may be random variables where that doesn't hold if you try those subsets.

They just state the theorem, they don't ask you to prove it. I understand strictly speaking they have only claimed what you said: equal CDFs imply equal PDFs, but does my reasoning additionally prove equal CDFs imply the two random variables are equal (they must agree on the output for every input)? – Joseph Garvin Apr 20 at 19:22

@JosephGarvin oh right that. Um, no. Just imagine them as two excel cells where you have =RAND() --> the formula is the same but the number is different. what you're thinking of is A1=RAND() and then B1=A1. All that P(X in A) = P(Y in A) is saying is that X and Y have an equal chance of being in A. Example: Jack and Jill have the same chance of falling down, but it doesn't mean that Jack falls if and only if Jill falls. Another example: X is 1 if a fair coin flip is heads and 0 for tails. Y is 1 for tails instead. X and Y both have an equal chance of being equal to 1 but they're never equal. – BCLC Apr 20 at 20:46

If $\mu_1(A) = \mu_2(A)$ for $A \in \mathscr I$ where $\mathscr I$ is a $\pi$-system, then $\mu_1(A) = \mu_2(A)$ for $A \in \sigma(\mathscr I)$ where $\mu_1$ and $\mu_2$ are measures on $(S,\Sigma)$ with $\mu_1(S) < \infty$. In your case
$$\mathscr I = \{(-\infty,x)\}_{\{\text{'for all x'}\}} \to \sigma(\mathscr I) = \mathscr B(\mathbb R)$$
Note: The '$\sigma(\mathscr I) = \mathscr B(\mathbb R)$' is the non-baby version of the elementary probability stuff above. Technically, not all subsets of $\mathbb R$ work: See non-Borel sets.