Calculate probability with constraints