exponentialInverseCdf

Evaluates the inverse of the exponential cumulative distribution function (CDF).

Synopsis

exponentialInverseCdf (p, b)

Required Arguments

float p (Input)
Probability for which the inverse of the exponential CDF is to be evaluated. p must lie in the closed interval [0, 1].
float b (Input)
Scale parameter of the exponential CDF. b must be positive.

Return Value

Function value, the value of the inverse of the exponential CDF. A value of NaN is returned if an input value is in error.

Description

The function exponentialInverseCdf(p, b) evaluates \(F^{-1}(p|b)\), the inverse CDF of an exponential random variable with probability argument p = p and scale parameter b = b:

\[F^{-1}(p∣b) = -b \log(1-p)\]

The probability that an exponential random variable takes a value less than or equal to the returned value is p.

Example

In this example, we evaluate the exponential inverse CDF at p = 0.8647, b = 1.0.:

from __future__ import print_function
from numpy import *
from pyimsl.stat.exponentialInverseCdf import exponentialInverseCdf

p = 0.8647
b = 1.0

x = exponentialInverseCdf(p, b)
print("The probability that exponential random variable X with")
print("scale parameter b = %3.1f is less than or equal to %6.4f" % (b, x))
print("is %6.4f" % p)

Output

The probability that exponential random variable X with
scale parameter b = 1.0 is less than or equal to 2.0003
is 0.8647