What is the probability $P(X < x | X < Y)$, given that $X \sim N(\mu_1,\sigma_1)$ and $Y \sim N(\mu_2, \sigma_2)$ and $X$ and $Y$ are independent?
I have been so far able to solve the conditional probability of $$ P(X = x | X < Y) = \frac {(1 - normcdf((x-\mu_2)/\sigma_2)\cdot normpdf((x-\mu_1)/\sigma_1))}{normcdf((\mu_2-\mu_1)/(\sigma_1^2 + \sigma_2^2)^{0.5}))} $$
which gives PDF of $X$.
I look at the problem as a bi-variate normal distribution, but no luck finding any closed formula to help me speed up my calculation, which now runs Monte Carlo.
Also, is there a closed formula for the case where $X$ and $Y$ are correlated?
Let $Z(x) = \mathbb P\left[X < x \Big | X < Y\right] = \mathbb E\left[\mathbf 1_{X < x} \Big | X < Y\right]$ this is a random variable projection of $1_{X < x}$ on $\sigma (\{X < Y\})$ in $L^2$ then $$Z (x) = a(x) + b(x)\mathbf 1_{X < Y}$$ such that $$(a(x), b(x)) = \underset{(a,b) \in \mathbb R^2}{\text{argmin }} \mathbb E \left[\left(\mathbf 1_{X<x} - a - b\mathbf 1_{X < Y}\right)^2\right]$$ $$\mathbb E \left[\left(\mathbf 1_{X<x} - a - b\mathbf 1_{X < Y}\right)^2\right] = \mathbb P[X < x] + a^2 + b^2\mathbb P[X < Y] + 2ab \mathbb P[X < Y] - 2a\mathbb P[X < x] - 2b\mathbb P[X < x,X < Y]$$ then at the minimum the derivative is zero so $$\left\{\begin{array}{ccr} a(x) + b(x)\mathbb P[X < Y] - \mathbb P[X < x] &=& 0 \\ b(x)\mathbb P[X < Y] +a(x)\mathbb P[X < Y] - \mathbb P[X < x, X < Y] &=& 0\end{array}\right.$$
$$\left\{\begin{array}{ccr} a(x) &=& \frac{\mathbb P[X < x] - \mathbb P[X < x, X < Y]}{1-\mathbb P[X < Y]} \\ b(x) &=& \frac {\mathbb P[X < x]\mathbb P[X < Y] - \mathbb P[X < x, X < Y]}{\mathbb P[X < Y] (1-\mathbb P[X < Y])}\end{array}\right.$$ Now you hqve to compute $P[X < x]$, $P[X < Y] = P[X-Y < 0]$ and $P[X < x, X-Y < 0]$ to finish the answer. In the case where $X$ and $Y$ are independent let $\Phi$ be the cdf of $\mathcal N (0, 1)$ $$P[X < x] = \Phi \left(\frac {x-\mu_1}{\sigma_1}\right)$$ $$P[X-Y < 0] = P\left[\mathcal N \left(\mu_1 - \mu_2, (\sigma_1^2 + \sigma_2^2)^\frac12\right) < 0\right] = \Phi \left(\frac {\mu_2 - \mu_1}{(\sigma_1^2 + \sigma_2^2)^\frac12}\right)$$ $$P[X<x, X<Y] = \int_{-\infty}^x \Phi \left(\frac {t-\mu_2}{\sigma_2}\right)\frac {1}{\sqrt{2\pi}\sigma_1}e^{-\frac {t-\mu_1}{2\sigma_1^2}} \mathrm d t$$ I do not think in the case that $\mu_1 \neq \mu_2$ you can have a closed form for the last one.