Calculate probability