daniko883y

## Answered question

2022-09-08

What is a distribution of X given $X-Y>0$
given two normally distributed variables $X\sim \mathcal{N}\left({\mu }_{X},{\sigma }_{X}\right)$ and $Y\sim \mathcal{N}\left({\mu }_{Y},{\sigma }_{Y}\right)$ that are independent ${\rho }_{XY}=0$, what is a distribution of X given $X>Y$.
I have run several simulations in Matlab and $X|X>Y$ looks suspiciously normally distributed, but what are its mean and standard deviation?

### Answer & Explanation

Alvin Preston

Beginner2022-09-09Added 9 answers

Step 1
Instead of thinking through the inequality $X>Y$, see it as $Z=X-Y>0$. Note that given that X and Y are both normal, Z is normal with mean ${\mu }_{x}-{\mu }_{Y}$ and variance ${\sigma }_{X}^{2}+{\sigma }_{Y}^{2}$ (assuming independence). Thus, you can calculate
$\begin{array}{rl}P\left\{X\le x|X>Y\right\}& =\frac{P\left\{X\le x,X>Y\right\}}{P\left\{X>Y\right\}}\\ & =\frac{P\left\{Y0\right\}}\end{array}$
I assume you can work out $P\left\{Z>0\right\}$ with ease, for it is the distribution function of a normal r.v.. The hard part is $P\left\{Y. You can draw the area in ${\mathbb{R}}^{2}$ to see how to integrate it. I believe it is as follows (I changed x for z so there is no confusion in the integrands and limits):
$\begin{array}{rl}P\left\{Y
Step 2
However, we could try to solve the simplest case, which is that where X and Y are standard normal r.v.. In such case, we have that
$\begin{array}{rl}P\left\{Y
where we used the variable change $u=\mathrm{\Phi }\left(x\right)$, and thus $du=\varphi \left(x\right)dx$, where $\mathrm{\Phi }$ is the distribution function of a standard normal and $\varphi$ its density. Moreover, now Z has mean 0 so $P\left(Z>0\right)=0.5$. Thus,
$P\left\{X\le x|X>Y\right\}=0.5\mathrm{\Phi }\left(x{\right)}^{2}/0.5=\mathrm{\Phi }\left(x{\right)}^{2}.$
Then, $f\left(x|X>Y\right)=2\mathrm{\Phi }\left(x\right)\varphi \left(x\right)$. The image below shows a plot of the standard normal density $\varphi \left(x\right)$ and $f\left(x|X>Y\right)$ as given before. You can see they look very similar, as you guessed through simulation. However, the r.v. $X|X>Y$ is not normal even under the simplest of assumptions.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?