I'm taking a course on bayesian statistics and I'm having trouble with one assigment, it goes like this:

Construct an example in which two variables have a common effect, and the presence of one of the variables makes the other more likely. More precisely, consider a v-structure X → Z ← Y over three binary-valued variables. Construct a CPD P(Z|X, Y ) such that:

• X and Y both in crease the probability of the effect, that is P(Z = T|X = T) > P(Z = T) and P(Z = T|Y = T) > P(Z = T).

• each of X and Y increases the probability of the other one, that is P(X = T|Z = T) < P(X = T|Y = T, Z = T) and P(Y = T|Z = T) < P(Y = T|X = T, Z = T).

For what I understand, if I draw this V-structure the like it says, X and Y are independent and therefore if I apply Bayes rule on the first condition:

P(Z = T|X = T) = P(X = T|Z = T)P(Z = T)/P(X=T) > P(Z = T)

and if I cancel terms:

P(X = T|Z = T) > P( X = T )

but the v-structure of the graph tells me that X is independent of Z...

And the other condition also bothers me, as it states that for example

P( X = T ) < P ( X = T | Y = T )

but again the graph states independence between X and Y ( or I'm wrong? ) And introducing this dependence with and edge between X and Y will induce a loop in the graph.

I tried to think with the variables being X = Burglary , Y = Have a broken window, and Z = Alarm. In the sense that having a broken window increase the change of a burglary, and having a burglary increase the chance of having a broken window ( second condition ) and any of those events increase the change of the alarm being triggered.

Well, any help in sorting this out ( finding the CPD given the conditions) is greatly appreciated.

Thanks in advance


1 Answer 1


In your answer, there are some fundamental mistakes regarding Bayesian networks.

but the v-structure of the graph tells me that X is independent of Z...

If $Z$ is dependent on $X$, $X$ cannot be independent of $Z$. The arrow direction doesn't matter. Independence is symmetric. The graph tells the parent nodes of each node, while writing the joint PDF. The rest is corollary, i.e. your joint PDF is $P(X,Y,Z)=P(Z|X,Y)P(X)P(Y)$.

Implications of this joint PDF (i.e. network) are:

  • $X$ and $Y$ are independent given nothing, but dependent given $Z$.
  • $X$ and $Z$ or $Y$ and $Z$ are dependent.

For the other condition, you state that

$P( X = T ) < P ( X = T | Y = T )$

but it seems you got rid of $Z$ assuming independence. Your actual condition was $P(X = T|Z = T) < P(X = T|Y = T, Z = T)$.

  • $\begingroup$ Thanks for your answer. Yes I made a mistake with the condition and independence. But I still don't understand how the conditions are satisfied and what is the CPD ( Maybe I have to assign some probabilities to the events X,Y,Z such that the conditions hold ) but not sure how to do it. Thanks again for your time. $\endgroup$ Jan 28, 2019 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.