Calculate probability of an event (#743)