Find a range of possible outcomes where the cdf evaluates to values
that encapsulate the range of probabilities contained in the vector p
.
Usage
encapsulate_p(distribution, p, direction)
Arguments
- distribution
A distribution having access to a cdf.
- p
Vector of values between 0 and 1 (inclusive).
- direction
One of "left"
for calculating left-inverse, or
"right"
for calculating right-inverse.
Note
If 0 or 1 are included in the vector p
, one of the endpoints might
be infinite.