4
$\begingroup$

I want to know, how Mathematica actually implements the cumulative distribution function of the binomial distribution. Which algorithm does Mathematica use to compute CDF[BinomialDistribution[n, p], x]? Does Mathematica use the normal approximation, or does it use a better approximation?

So far I have found the sites about BinomialDistribution and CDF but I haven't found an answer to my question there. I know that Mathematica is closed source but is there a way get information about the actual used algorithm?

Note: I never have used Mathematica before.

$\endgroup$
  • 7
    $\begingroup$ It evaluates the regularized incomplete beta function, which is built-in as BetaRegularized[], for appropriate arguments. As to what algorithm is being used to evaluate that… the docs only note that it uses hypergeometric function representations and continued fractions under the hood, and nothing more. $\endgroup$ – J. M. will be back soon Jul 21 '15 at 15:07
  • $\begingroup$ You can see the use of BetaRegularized just by evaluating CDF[BinomialDistribution[n, p], x] $\endgroup$ – Bob Hanlon Nov 16 '15 at 19:23
4
$\begingroup$

J.M.'s comment:

It evaluates the regularized incomplete beta function, which is built-in as BetaRegularized[], for appropriate arguments. As to what algorithm is being used to evaluate that… the docs only note that it uses hypergeometric function representations and continued fractions under the hood, and nothing more.

$\endgroup$
  • 2
    $\begingroup$ For what it is worth, Mathematica usually prefers slow and accurate over fast and approximate. $\endgroup$ – Eric Brown Nov 16 '15 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.