flip = {1,...,20} Heads(flip) // Unit clause 1 Heads(f)
we have a binomial distribution with
being the number of flips (in our case
20) and
, where
is the weight of the unit clause
(in our case 1). We can verify this by running probabilistic inference:
infer -i binomial.mln -r binomial.result -e empty.db -q Heads
In the limit the marginal probabilities should approach
.