[
https://issues.apache.org/jira/browse/STATISTICS-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17638678#comment-17638678
]
Alex Herbert commented on STATISTICS-61:
----------------------------------------
Note there are other distributions in the library that have more than one
parameterization:
||Distribution||Parameters||
|Gamma|shape and scale|
|Gamma|shape and rate (1/scale)|
* This list may not be complete
Note that the exponential distribution with rate=lambda is a Gamma distribution
with shape=1, scale=1/lambda.
Supporting two version of the exponential would set a precedent for any other
distributions. Thus it is simpler to avoid this precedent and require the user
to convert the rate to a mean = 1 / rate and accept there may be a few ULP
difference in the computation.
See:
[https://en.wikipedia.org/wiki/Gamma_distribution]
> Exponential distribution parameterized by the rate (1 / mean)
> -------------------------------------------------------------
>
> Key: STATISTICS-61
> URL: https://issues.apache.org/jira/browse/STATISTICS-61
> Project: Commons Statistics
> Issue Type: New Feature
> Components: distribution
> Affects Versions: 1.0
> Reporter: Alex Herbert
> Priority: Minor
>
> The exponential distribution is currently parameterized by the mean. This
> matches the parameterization used by SciPy and Matlab.
> The distribution can also be parameterized by the rate. This is the
> parameterization used by R and Mathematica.
> A distribution for the rate can be created as:
> {code:java}
> double rate = ...
> ExponentialDistribution dist = ExponentialDistribution.of(1 / rate);{code}
> The formulas for the two parameterization are simple rearrangements. In
> certain cases direct use of the rate formula can have a large difference to
> the mean formula.
> Investigate the option to provide a rate parameterization as:
> {noformat}
> ExponentialDistribution dist = ExponentialDistribution.ofRate(rate);{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)