pexp() Function
The pexp() function returns the corresponding values of the exponential cumulative distribution function for an input vector of quantiles.
Syntax: pexp(x_pexp, rate )
R
# R program to illustrate # exponential distribution # Specify x-values x_pexp <- seq (1, 10, by = 0.2) # Apply pexp() function y_pexp <- pexp (x_pexp, rate = 1) # Plot values plot (y_pexp) |
Output :
Exponential Distribution in R Programming – dexp(), pexp(), qexp(), and rexp() Functions
The exponential distribution in R Language is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average rate. It is a particular case of the gamma distribution. In R Programming Language, there are 4 built-in functions to generate exponential distribution:
Function | Description |
dexp | Probability Density Function |
pexp | Cumulative Distribution Function |
qexp | Quantile Function of Exponential Distribution |
rexp | Generating random numbers which are Exponentially Distributed |