Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1356

HypergeometricDistribution probability give NaN result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.6.1
    • 4.0
    • None
    • None
    • Windows

    Description

      Hi,
      Unless I am mistaken the HypergeometricDistribution probability method returns NaN for the following cases :

      HypergeometricDistribution hgd = new HypergeometricDistribution(11,11,1);
      double probIT = hgd.probability(1);

      HypergeometricDistribution hgd = new HypergeometricDistribution(11,11,11);
      double probIT = hgd.probability(11);

      I think it should return 1.0
      Thanks,
      Thomas

      Attachments

        1. MATH-1356.patch
          2 kB
          Gilles Sadowski

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tlacroix Lacroix Thomas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: