** Next:** 2.3 Multinomial Distribution
** Up:** 2 The Basics
** Previous:** 2.1 Uniform Distribution

##

2.2 Binomial Distribution

We can also model a binomial distribution as an MLN. If we move up a step from
the empty MLN and add the unit clause `Heads(flip)` with a weight `w` to
our MLN:

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
.

Marc Sumner
2010-01-22