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

Replaced the BinomialDistribution existing PDF with Catherine Loader's algorithm (as per wishlist on the wiki page)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1
    • None

    Description

      The existing PDF for Binomial distributions cannot handle n>1029. This implementation of Catherine Loader's algorithm can handle n upto and larger than 1000000. The Commons-Math wiki page has a wishlist entry asking for this, with a link to the paper describing the new algorithm: http://projects.scipy.org/scipy/raw-attachment/ticket/620/loader2000Fast.pdf

      I've updated the probability() function in BInomialDistributionImpl.java, as well as the unit test for this method. The updated unit test has higher precision expected values, which were calculated with Mathematica 6.

      Attachments

        1. BinomialDistributionPatch.txt
          6 kB
          Nipun Jawalkar

        Activity

          People

            Unassigned Unassigned
            njawalkar Nipun Jawalkar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: