# 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!

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! Jan 22 '19 at 0:22
• OK! You can rewrite your code. Jan 22 '19 at 0:25