Aloha,

I could really use some help. I have the fun task of converting Splus code to Perl. All has worked beautifully so far the majority of the project. But I am stuck now. I am trying to find out if Perl has a library module for the cumulative probability for the Hypergeometric discrete distribution. Even if such a thing does not exist, perhaps someone has already invented this wheel?

In Splus, the bit of code is: phyper(q, m, n, k)

where:

q: the number of red balls out of a sample of size k drawn from an urn containing m red balls and n black ones.

m: number of red balls in the urn.

n: number of black balls in the urn.

k: number of balls drawn from an urn with m red and n black balls.

I have been searching the web with no luck!

Any help would be greatly appreciated!
Aloha,
Annette

In reply to Hypergeometric Distribution by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.