You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2020/04/12 11:18:00 UTC
[jira] [Created] (STATISTICS-23) Parameter names in
"GammaDistribution"
Gilles Sadowski created STATISTICS-23:
-----------------------------------------
Summary: Parameter names in "GammaDistribution"
Key: STATISTICS-23
URL: https://issues.apache.org/jira/browse/STATISTICS-23
Project: Apache Commons Statistics
Issue Type: Bug
Components: distribution
Reporter: Gilles Sadowski
Assignee: Gilles Sadowski
After upgrading to v1.3 of "Commons RNG", a unit test for {{GammaDistribution}} fails:
{noformat}
[ERROR] GammaDistributionTest>ContinuousDistributionAbstractTest.testSampler:342 Chisquare test failed p-value = 1.1102230246251565E-15 chisquare statistic = 72.63199999999999.
value expected observed
1 250 355
2 250 183
3 250 200
4 250 262
{noformat}
It is caused by the inversion of the parameters when instantiating the sampler (at line ):
{code:java}
public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) {
// Gamma distribution sampler.
return new AhrensDieterMarsagliaTsangGammaSampler(rng, scale, shape)::sample;
}
{code}
Things are back to normal when switching the {{scale}} and {{shape}} arguments.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)