Uploaded image for project: 'Commons Numbers'
  1. Commons Numbers
  2. NUMBERS-169

Function to evaluate the complement of the RegularizedBeta

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 1.0
    • None
    • gamma
    • None

    Description

      The RegularizedBeta class computes the regularized beta function I(x, a, b). There is a functional identity for this:

      1 - I(x, a, b) = I(1 - x, b, a)
      

      See Wolfram Regularized Incomplete Beta Identities

      The RegularizedBeta class currently exploits this identity to compute the value by switching to call '1.0 - value(1 - x, b, a)' depending on the parameters.

      I suggest a complement for this function to compute 1 - I(x, a, b):

      public class RegularizedBetac {
          public static double value(double x,
                                     final double a,
                                     final double b,
                                     double epsilon,
                                     int maxIterations);     
      }
      

      This can call RegularizedBeta.value using the same inversion logic and avoid a potential computation of the complement using multiple inversions with loss of precision:

      1 - I(x, a, b) == 1 - [ 1 - I(1 - x, b, a) ] = I(1 - x, b, a)
      
      or
      
      I(1 - x, b, a) == 1 - I(x, a, b) = 1 - [ 1 - I(1 - x, b, a) ]
      

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aherbert Alex Herbert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: