Find a range of possible outcomes where the cdf evaluates to values that encapsulate the range of probabilities contained in the vector p.

encapsulate_p(distribution, p, direction)

## Arguments

distribution

One of "left" for calculating left-inverse, or "right" for calculating right-inverse.
If 0 or 1 are included in the vector p, one of the endpoints might be infinite.