Closed WarrenWeckesser closed 2 years ago
The implementation of the inverse_cdf() method for the Laplace distribution is missing calls to ln(). The following https://github.com/statrs-dev/statrs/blob/435739b180913fa0e815403836eb74cd79041d60/src/distribution/laplace.rs#L127-L131
inverse_cdf()
ln()
should be
if p <= 0.5 { self.location + self.scale * (2. * p).ln() } else { self.location - self.scale * (2. - 2. * p).ln() }
(See, for example, the entry for Quantile in the table on the right in the Laplace distribution wikipedia page.)
I'll submit a pull request with a fix.
The implementation of the
inverse_cdf()
method for the Laplace distribution is missing calls toln()
. The following https://github.com/statrs-dev/statrs/blob/435739b180913fa0e815403836eb74cd79041d60/src/distribution/laplace.rs#L127-L131should be
(See, for example, the entry for Quantile in the table on the right in the Laplace distribution wikipedia page.)
I'll submit a pull request with a fix.