  Conditional independence models in the Gaussian case are algebraic varieties
in the cone of positive definite covariance matrices. We study these varieties
in the case of Bayesian networks, with a view towards generalizing the
recursive factorization theorem to situations with hidden variables. In the
case when the underlying graph is a tree, we show that the vanishing ideal of
the model is generated by the conditional independence statements implied by
graph. We also show that the ideal of any Bayesian network is homogeneous with
respect to a multigrading induced by a collection of upstream random variables.
This has a number of important consequences for hidden variable models.
Finally, we relate the ideals of Bayesian networks to a number of classical
constructions in algebraic geometry including toric degenerations of the
Grassmannian, matrix Schubert varieties, and secant varieties.
