<< distfun_expinv Exponential distfun_exprnd >>

Distfun >> Exponential > distfun_exppdf

distfun_exppdf

Exponential PDF

Calling Sequence

y = distfun_exppdf ( x , mu )

Parameters

x:

a matrix of doubles

mu :

a matrix of doubles, the average. Must be positive.

y:

a matrix of doubles, the density

Description

This function computes the Exponential PDF.

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.

The exponential distribution with average mu has density

for x >= 0.

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.

Examples

// http://en.wikipedia.org/wiki/Exponential_distribution
scf();
x = linspace(0,5,1000);
y = distfun_exppdf ( x , 2 );
plot(x,y, "r-" );
y = distfun_exppdf ( x , 1 );
plot(x,y, "m-" );
y = distfun_exppdf ( x , 2/3 );
plot(x,y, "c-" );
xtitle("Exponential PDF","x","f(x)");
legend(["mu=2","mu=1","mu=2/3"]);

Authors

Bibliography

Wikipedia, Exponential distribution function, http://en.wikipedia.org/wiki/Exponential_distribution

<< distfun_expinv Exponential distfun_exprnd >>