Suppose $Y, X, Z$ are all discrete random variables. Then the conditional mean of $Y$ on levels of $X=x$ and $Z=Z$ is represented by
now suppose that there are values of $x_1 \in X$ and $z_1 \in Z$ such that both cannot simultaneously exist. An example might be if $Y, X, Z$ were vectors of observations corresponding to people, and so such person had $x_1, z_1$ simultaneously. In such a case,
is undefined. Is there a way define the conditional expectation in a notationally correct way? One thought is using the indicator function
but $E(Y\mid X=x_1,Z=z_1)$ is still undefined and multiplying by zero seems to be a hacky fix.
For an example, consider $Y$ to be mortality, where $Y=1$ is death, $Y=0$ is living. Then, suppose $X$ is gender, such that $X=1$ is female, $X=0$ male and that $Z$ is whether one had ovarian cancer before ($Z=1$).
$$ E(Y\mid X=0, Z=1) $$
can't be computed because to have ovarian cancer implies one is female, therefore we cannot compute it since $X=0$ is male (making the assumption only females can get ovarian cancer).
I am also motivated by how the law of total probability might work under such cases. For example, suppose we wanted to find $E(Y\mid X) but only had information at the level of $X$ and $Z$. We can therefore use the law of total probability to have:
$$ E(Y\mid X) = \sum_z E(Y\mid X,Z=z)P(Z=z\mid X) $$
However, in such cases, sometimes, like the example above, $E(Y\mid X,Z=z)$ is undefined at certain values. How might the law of total probability work in this case?
I would appreciate any insights. Thanks!