# Bayes nets - calculating probabilities

Given a Bayesian network, say a -> b -> c, all binary random variables (I won't show the CPTs, assume they are given). You are told b and c are true. How do you calculate the P(a=True)?

Bayesian networks encode a factorization of the joint probability distribution of a set of variables. Specifically, each variable is conditionally independent of all its non-descendants given its parents.

The joint probability distribution can be written as:

$P(X) = \prod_i P(X_i|Pa(X_i))$

where Pa(X) are the parents of X in the network.

You should be able to find the answer to your question by computing this quantity for your specific network and CPTs.