P function

Probability function