# A problem in probability theory

I was trying to solve a problem and I got stuck at the penultimate step (I think).

I could show that Var(X) = Var(Y) = Cov(X,Y), where X and Y are random variables with finite means and variances.

Based on above statement, can I say that X and Y are the same? or P(X=Y) = 1?

• Hint: Cauchy-Schwarz. – cardinal Aug 12 '12 at 20:50
• Additional hint (following @cardinal): the Cauchy-Schwarz inequality is easily proven by observing that $0 \le \text{Var}(X-Y)$ and expanding the right hand side. What can you conclude about a random variable whose variance is zero? – whuber Aug 12 '12 at 21:21
• This additional hint helped me solve this problem. Thank you both for your help. – steadyfish Aug 12 '12 at 21:28
• @Michael, you seem to be showing the converse. A minor detail, but important in light of the question, is that even when arguing in the direction you have, the conclusion $X=Y$ is "only" true almost surely. – cardinal Aug 13 '12 at 0:11
• In your comment, you've assumed a priori that $Y = c X$, for some $c$, whereas this is (effectively) what the OP wants to show (with $c = 1$). :-) – cardinal Aug 13 '12 at 1:17

You will need the following simple result.

Lemma. If $\mathrm{Var}[Z]=0$, then $Z=\mathrm{E}[Z]$, almost surely.

Proof (check cardinal's comment for a contrapositive argument). It is easy to check that $$\left\{ Z = \mathrm{E}[Z] \right\} = \bigcap_{n\geq 1} \left\{ |Z - \mathrm{E}[Z]| < \frac{1}{n} \right\} \, .$$ By Tchebyshev's inequality, we have $$P \left\{ |Z - \mathrm{E}[Z]| \geq \frac{1}{n} \right\} \leq n^2 \mathrm{Var}[Z] = 0 \, ,$$ for every $n\geq 1$. Hence, using De Morgan's identity and the subadditivity of $P$, we have $$P\left\{ Z = \mathrm{E}[Z] \right\} = 1 - P\left(\bigcup_{n\geq 1} \left\{ |Z - \mathrm{E}[Z]| \geq \frac{1}{n} \right\}\right) \geq 1 - \sum_{n\geq 1} P\left\{ |Z - \mathrm{E}[Z]| \geq \frac{1}{n} \right\} = 1 \, ,$$ as desired.

Using the hints given by cardinal and whuber, you have what you need.

Proposition. If $X$ and $Y$ are integrable random variables such that $$\mathrm{Var}[X] = \mathrm{Var}[Y]=\mathrm{Cov}[X,Y] \, ,$$ then $X=Y+c$, almost surely, where the constant $c=\mathrm{E}[X]-\mathrm{E}[Y]$.

Proof. Defining $Z=X-Y$, the formula for the variance of the difference of two random variables gives $$\mathrm{Var}[Z]=\mathrm{Var}[X]+\mathrm{Var}[Y]-2\,\mathrm{Cov}[X,Y] = 2\,\mathrm{Cov}[X,Y] -2\,\mathrm{Cov}[X,Y] = 0 \, .$$ The Lemma yields the desired result, since $\mathrm{E}[Z]=\mathrm{E}[X-Y]=\mathrm{E}[X]-\mathrm{E}[Y]$.

• (+1) You are really cleaning up the backlog on these problems! :-) Good work. An alternative argument for the first part: For $W \geq 0$, $\mathbb E W = 0$ implies $W = 0$ a.s. To see this, note that if $W \neq 0$ almost surely then there is a $\delta > 0$ and a set $A$ of positive measure such that $W > \delta$ on $A$. Hence $\mathbb E W > \delta \mathbb P(A) > 0$. Now, take $W = (Z - \mathbb E Z)^2$ to get the result for the variance. – cardinal Sep 13 '12 at 23:14
• Nice contrapositive proof! – Zen Sep 13 '12 at 23:19