how to calculate union probability