# Conditional probability distribution

Suppose I have three random variables $X_1$, $X_2$ and $Y$, where $Y = (X_1 + X_2)/2$. How can I use Mathematica to derive the random variable defined by the condition $Y| X_1 > Y$?

Although I am looking for the formula for the conditional probability distribution, I have made the following start using Mathematica's "condition" function. Unfortunately, I am not having much luck:

Subscript[X, 1] \[Distributed] NormalDistribution[Subscript[\[Mu], 1], \!\
(\*SubsuperscriptBox[$$\[Sigma]$$, $$1$$, $$2$$]\)]

Subscript[X, 2] \[Distributed] NormalDistribution[Subscript[\[Mu], 2], \!\
(\*SubsuperscriptBox[$$\[Sigma]$$, $$2$$, $$2$$]\)]

Expectation[Y \[Conditioned] Subscript[X, 1] > Y , Y \[Distributed]
NormalDistribution[1/2 (Subscript[\[Mu], 1] + Subscript[\[Mu], 2]) , 1/4(\!\
(\*SubsuperscriptBox[$$\[Sigma]$$, $$1$$, $$2$$] + \\*SubsuperscriptBox[$$\ [Sigma]$$, $$2$$, $$2$$]\))]]

• Take a look at the documentation on Conditioned. If you still need assistance, giving a specific example and what you've tried will get you quicker and more targeted help. – JimB Jun 21 '18 at 14:34
• JimB, thank you. I could use the help. – user120911 Jun 22 '18 at 6:41
• you get something if you are willing to work with numeric values for distribnution parameters: e.g. NExpectation[(X1 + X2)/2 \[Conditioned] X1 > X2, {X1 \[Distributed] NormalDistribution[0, 1], X2 \[Distributed] NormalDistribution[1, 2]}] gives -0.239709. (Note conditioning on X1>Y is the same as conditioning on X1>X2.) – kglr Jun 22 '18 at 6:53