Calculating probabilities for different events