# Derivatives of conditional expectations

Let $X$, $Y$ and $Z$ be independent, real-valued random variables, probably with continuous density functions. Define $A = X + Y$ and $B = X + Z$. Consider the regular conditional expectation $E_Y(a,b) = \mathbb E[Y|A=a, B=b]$.

Is it the case that $$\frac{\partial}{\partial a} E_Y(a,b) > 0 \quad \mathrm{and} \quad \frac{\partial}{\partial b} E_Y(a,b) \le 0?$$ If there is a counterexample, then are there simple conditions which guarantee this statement to be true?

Edit: fedja provides a counterexample in the case of bimodality. Assume that all the density functions in question are unimodal, or perhaps even log-concave. Under these assumptions, is it the case that the above partial differential inequalities hold?

-
Imagine $X$ that is bimodal: it is about $0$ or $1$ with probability $1/2$ each (you can smear that to get continuous density). Imagine $Y=\pm 0.1$ with probability $1/2$ for each sign (again, smear a bit) and $Z$ smeared over a huge interval uniformly. Then the condition $B=b$ tells next to nothing about $X$ but when $A=0.1$, you know that $Y$ is $0.1$ (otherwise there is no chance to get there) and when $A=0.9$, you are pretty certain that $Y=-0.1$. Bad, isn't it? As to simple conditions, what terms are allowed? –  fedja Dec 13 '11 at 2:55
Thanks, fedja. Bimodality seems like a reasonably robust way to construct counterexamples. Perhaps a natural assumption would be to assume that all the density functions are log-concave (i.e., $x \mapsto -\log f(x)$ is a convex function). This would include Gaussian density functions (though not power-law). –  Tom LaGatta Dec 13 '11 at 17:35
First, a general remark. If $U$ and $V$ are two r.vs, the condition that $\mathbb{E}(U|V=v)$ is non-decreasing in $v$ is a kind of positive association'' between $U$ and $V$. This condition implies $\mathrm{Cov}(U, V) \ge 0$ (under suitable conditions of existence). The proof of this is quite simple.
Now, your hypothesis imply that $\mathbb{E}(Y|A=a)$ is non-decreasing in $a$. Indeed, $\mathbb{E}(Y|A=a)$ writes as an integral in $b$ involving $E_Y(a, b)$. This integral can be derivated w.r.t. $a$ under the $\int$ sign, leading to a non-negative derivative $\partial_a \mathbb{E}(Y|A=a) \ge 0$. Then $$\mathbb{E}(B|A=a) = \mathbb{E}(X+Z|A=a) = \mathbb{E}(A-Y+Z|A=a)= a - \mathbb{E}(Y|A=a) + \mathbb{E}(Z|A=a)$$ But $\mathbb{E}(Z|A=a)=E(Z)$ since $Z$ and $A$ are independent. It thus appears that $\mathbb{E}(B|A=a)$ is non-increasing in $a$ since $\mathbb{E}(Y|A=a)$ is non-decreasing. So we find a negative association between $A$ and $B$ (in the former sense), implying $\mathrm{Cov}(A, B) \le 0$ as claimed. But this is not possible since $\mathrm{Cov}(A, B) = \mathrm{Var}(X) \geq 0$.