Update BayesianNetwork

Now calculates joint probabilities