I constructed a Bayesian network which presents the conditional independence among N random variables. Each random variable $X_i$ represents a Bernoulli random variable with an associated success probability $\pi$ (the probabilities, $\pi$`s, are the parameters of the Bayesian graph).
I'm interested in computing the sum $S=X_1+X_2+...+X_N$. This means I'm interested in computing the sum over the nodes of the Bayesian graph. I know that Bayesian graph enables us to compute the joint probability distribution $p(X_1,X_2,X_3,...,X_N)$ but not their sum.
Are there some references or ideas that deal with the same sum on a Bayesian graph.
I found this page Decomposing dependent Bernoulli random variables into independent Bernoulli random variables
Can some one tell whether we can use this link to compute the sum $S$.