Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
After upgrading to v1.3 of "Commons RNG", a unit test for GammaDistribution fails:
[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
It is caused by the inversion of the parameters when instantiating the sampler (at line ):
public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) { // Gamma distribution sampler. return new AhrensDieterMarsagliaTsangGammaSampler(rng, scale, shape)::sample; }
Things are back to normal when switching the scale and shape arguments.
Attachments
Issue Links
- is caused by
-
RNG-96 AhrensDieterMarsagliaTsangGammaSampler incorrectly names parameters
- Closed