Computing probability of an event