# If $X, Y$ are random vectors, is it true that $E[g(X,Y)] = E[E[g(X,Y)| \{Y: AY \geq b\}]]$?

Suppose $$Y \in \mathbb{R}^n$$ and $$X \in \mathbb{R}^n$$ are random vectors. By the law of iterated expectation, does the following hold?

$$E[g(X,Y)] = E[E[g(X,Y)| \{Y: AY \geq b\}]],$$

where $$g(\cdot, \cdot)$$ is a function, and $$A \in \mathbb{R}^{n \times n}$$ and $$b \in \mathbb{R}^n$$ are a matrix and vector of constants, respectively.

No, it is not correct in general because the event $$AY\geq b$$ is not a partition of the whole space. Let's say the $$Y$$ vectors satisfying this relationship constitute the set $$\mathcal Y$$. Then, the correct relation is $$E[g(X,Y)]=E[g(X,Y)|Y\in \mathcal Y]P(Y\in \mathcal Y)+E[g(X,Y)|Y\notin \mathcal Y]P(Y\notin \mathcal Y)$$

A simple counter-example: let $$g(X,Y)=Y$$, and let $$Y$$ be a Bernoulli RV (with parameter $$p$$), so $$n=1$$. Furthermore, let $$A=b=1$$. Then, we have $$E[E[g(X,Y)|\{Y:Y\geq 1\}]]=E[E[g(X,Y)]|Y=1]=E[1]=1$$

However, the correct answer is $$p$$, i.e. $$E[g(X,Y)]=E[Y]=p$$

P.S. I'm assuming $$\geq$$ operation is defined properly between $$n\times1$$ vectors.

• Just to clarify, you're defining $\mathcal{Y} = \{Y: AY \geq b\}$, correct? Jan 24, 2021 at 20:25
• Correct, the set of $Y$ satisfying $AY\geq b$. Jan 24, 2021 at 20:26
• Well, it's a condition on $Y$, and will most probably decrease the amount of possibilities for it. Jan 24, 2021 at 20:30
• Yes, my example was discrete just because of convenience. Jan 24, 2021 at 20:57
• No, it's scalar because condition is like $Y\geq 1$ Jan 25, 2021 at 15:49