Refactor the evaluation of target probability.