exponential_inverse_cdf
Evaluates the inverse of the exponential cumulative distribution function (CDF).
Synopsis
#include<imsls.h>
float imsls_f_exponential_inverse_cdf(floatp, floatb)
The type double function is imsls_d_exponential_inverse_cdf.
Required Arguments
floatp (Input)
Probability for which the inverse of the exponential CDF is to be evaluated. p must lie in the closed interval [0, 1].
floatb (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 imsls_f_exponential_inverse_cdf(p, b) evaluates F-1(pb), the inverse CDF of an exponential random variable with probability argument p = p and scale parameter b = b:
F-1(pb) = -blog(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.:
 
#include <imsls.h>
#include <stdio.h>
 
int main()
{
float p = 0.8647;
float b = 1.0;
float x;
 
x = imsls_f_exponential_inverse_cdf(p, b);
printf("The probability that exponential random ");
printf("variable X with\nscale parameter b = ");
printf("%3.1f is less than or equal to %6.4f", b, x);
printf("\nis %6.4f\n\n", 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