Computing the values of inverse probabilities associated with a random variable
The inverse probability of a random variable is the inverse of the CDF associated with the distribution.
The percent point function (PPF) gives us the value of the continuous random variable that is associated with the percent value (quantile value).
How to do it...
In order to understand this better, let us consider the following:
- Import the relevant packages:
from scipy.stats import norm
- Extract the value associated with the 95% percentile (quantile) value:
norm.ppf(0.95)
The output of the preceding line of code is 1.6448536269514722
.
- The inverse of the preceding output can be calculated as follows:
norm.cdf(1.6448)
The output of this is 0.94999446890607997
.