# Conditional expectation using derived distribution [closed]

While this question can be solved using some (hand) analysis and standard calculus, I would have thought that the following code would have worked:

Clear[x, y, c];
Expectation[x \[Conditioned] x + y > c,
x \[Distributed] NormalDistribution[] &&
y \[Distributed] NormalDistribution[]]


It doesn't. Is there a way to use Expectation and Conditioned for this problem?

@AlexTournev caught my silly syntactic error: One should use brackets, not &&. Thanks!

## closed as off-topic by Bob Hanlon, m_goldberg, Bill Watts, gwr, marchJan 23 at 3:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, m_goldberg, Bill Watts, gwr, march
If this question can be reworded to fit the rules in the help center, please edit the question.

Clear[x, y, c];
Expectation[
x \[Conditioned] x + y > c,
{x \[Distributed] NormalDistribution[],
y \[Distributed] NormalDistribution[]}]

(*

E^(-(c^2/4))/(Sqrt[\[Pi]] Erfc[c/2])

*)

• Well... a simple syntactic error. I hope you won't mind if I post this answer (citing you) on the source page. Thanks! – David G. Stork Jan 22 at 0:22
• OK! You can rewrite your code. – Alex Trounev Jan 22 at 0:25