exppdf - Exponential probability density function - MATLAB
Exponential probability density function
Syntax
Description
Examples
collapse all
Compute the density of the observed value 5 in the standard exponential distribution.
Compute the density of the observed value 5 in the exponential distributions specified by means 1 through 5.
y2 = 1×5
0.0067 0.0410 0.0630 0.0716 0.0736
Compute the density of the observed values 1 through 5 in the exponential distributions specified by means 1 through 5, respectively.
y3 = 1×5
0.3679 0.1839 0.1226 0.0920 0.0736
Input Arguments
collapse all
Values at which to evaluate the pdf, specified as a nonnegative scalar value or an array of nonnegative scalar values.
To evaluate the pdf at multiple values, specify
xusing an array.To evaluate the pdfs of multiple distributions, specify
muusing an array.
If either or both of the input arguments x and
mu are arrays, then the array sizes must be the same. In this
case, exppdf expands each scalar input into a constant array
of the same size as the array inputs. Each
element in y is the pdf value of the distribution specified by
the corresponding element in mu, evaluated at the corresponding
element in x.
Example: [3 4 7 9]
Data Types: single | double
Mean of the exponential distribution, specified as a positive scalar value or an array of positive scalar values.
To evaluate the pdf at multiple values, specify
xusing an array.To evaluate the pdfs of multiple distributions, specify
muusing an array.
If either or both of the input arguments x and
mu are arrays, then the array sizes must be the same. In this
case, exppdf expands each scalar input into a constant array
of the same size as the array inputs. Each
element in y is the pdf value of the distribution specified by
the corresponding element in mu, evaluated at the corresponding
element in x.
Example: [1 2 3 5]
Data Types: single | double
Output Arguments
collapse all
pdf values evaluated at the values in x, returned as a scalar
value or an array of scalar values. y is the same size as
x and mu after any necessary scalar
expansion. Each element in
y is the pdf value of the distribution specified by the
corresponding element in mu, evaluated at the corresponding
element in x.
More About
collapse all
The exponential distribution is a one-parameter family of curves. The parameter μ is the mean.
The pdf of the exponential distribution is
A common alternative parameterization of the exponential distribution is to use λ defined as the mean number of events in an interval as opposed to μ, which is the mean wait time for an event to occur. λ and μ are reciprocals.
For more information, see Exponential Distribution.
Alternative Functionality
exppdfis a function specific to the exponential distribution. Statistics and Machine Learning Toolbox™ also offers the generic functionpdf, which supports various probability distributions. To usepdf, create anExponentialDistributionprobability distribution object and pass the object as an input argument or specify the probability distribution name and its parameters. Note that the distribution-specific functionexppdfis faster than the generic functionpdf.Use the Probability Distribution Function app to create an interactive plot of the cumulative distribution function (cdf) or probability density function (pdf) for a probability distribution.
Extended Capabilities
Version History
Introduced before R2006a