next up previous
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}


// Unit clause
1 Heads(f)

we have a binomial distribution with $ n$ being the number of flips (in our case 20) and $ p = \frac{1}{1 + e^{-w}}$ , where $ w$ 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 $ \frac{1}{1 + e^{-1}} = 0.73$ .

Marc Sumner 2010-01-22