Add function to calculate set probability