Exponential CDF
p = distfun_expcdf ( x , mu ) p = distfun_expcdf ( x , mu , lowertail )
a matrix of doubles
a matrix of doubles, the average. Must be positive.
a 1x1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X<x) otherwise P(X>x).
a matrix of doubles, the probability
This function computes the Exponential CDF.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
Any optional input argument equal to the empty matrix will be set to its default value.
Notice that mu, the average, is the inverse of the rate. Other computing languages (including R), use 1/mu as the parameter of the exponential distribution.
x = 2 mu = 1/3 computed = distfun_expcdf ( x , mu ) expected = 9.975212478233337e-1 // http://en.wikipedia.org/wiki/Exponential_distribution scf(); x = linspace(0,5,1000); p = distfun_expcdf ( x , 2 ); plot(x,p, "r-" ); p = distfun_expcdf ( x , 1 ); plot(x,p, "m-" ); p = distfun_expcdf ( x , 2/3 ); plot(x,p, "c-" ); xtitle("Exponential CDF","x","P(X<x)"); legend(["mu=2","mu=1","mu=2/3"]); // See upper tail p = distfun_expcdf ( 2 , 1/3 ) q = distfun_expcdf ( 2 , 1/3 , %f ) p+q | ![]() | ![]() |
Wikipedia, Exponential distribution function, http://en.wikipedia.org/wiki/Exponential_distribution