Calculating probability in a Bayesian Network $$\require{enclose}\newcommand{\circletext}[1]{\enclose{circle}{\bbox[0.75ex]{\rm #1}}} \begin{array}{c} &amp;&amp; \circletext{Influenza} &amp;&amp;&amp;&amp; \circletext{Smokes} \\ &amp; \swarrow &amp; \downarrow &amp; \searrow &amp;  &amp;\swarrow \\ \circletext{Sore\, throat} &amp;&amp; \circletext{Fever} &amp; &amp; \circletext{Brochitis}\\ &amp;&amp;&amp; \swarrow &amp; &amp; \searrow \\ &amp;&amp; \circletext{Coughing}&amp;&amp;&amp;&amp;\circletext{Wheezing}\end{array}$$

Suppose I have a network defined as above.
What would be the formula for calculating 
$\mathsf P(\text{Wheezing})$?
Do you mean calculate it from the root probabilities and branch conditionals?

Letting $W$ stand for "Wheezing", $B$ for "Bronchitis", $I$ for "Influenza", $S$ for "Smoker", et cetera.

$$\def\P{\operatorname{\mathsf P}} \P(W) ~{=~ \sum\limits_{b\in\{B,B^\complement\}} \P(W\mid b)\P(b) \\ =~\sum\limits_{b\in\{B,B^\complement\}} \P(W\mid b)\Big(\sum\limits_{i\in\{I,I^\complement\}}\underline{\phantom{ \P(i)}}\big(\sum\limits_{s\in\{S,S^\complement\}}\underline{\phantom{\P(s)\P(b\mid s, i)}}\big)\Big) }$$
You have that:

$$P(I, SH, F, B, S, C, W) = P(I)P(SH|I)P(F|I)P(B|I,S)P(S)P(C|B)P(W|B)$$

Which will give you:

$$P(W) = \sum_{I,SH,F,B,S,C} P(I)P(SH|I)P(F|I)P(B|I,S)P(S)P(C|B)P(W|B)$$
$$P(W) = \sum_{I} P(I) \sum_{SH}P(SH|I) \sum_{F}P(F|I)\sum_{B} P(B|I,S) \sum_{S} P(S) \sum_{C} P(C|B)P(W|B)$$
$$P(W) = P(W|B) \sum_{C} P(C|B)$$
$$P(W) = P(W|B)$$