Markov ideals arising from Bayesian networks in statistics