Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?

by tlm (Prior)
on Jun 14, 2005 at 01:25 UTC ( #466338=note: print w/replies, xml ) Need Help??


in reply to Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?

In this node I posted some code to compute a one-tailed Fisher's Exact test, which uses a hypergeometric distribution. The implementation uses Math::Pari.

BTW, do you really mean "the odds"? Or do you want the probability p? If the latter is the case, then this probability is equivalent to the P-value obtained from the one-tailed Fisher's Exact test computed with the code referred to above. (The odds are (1– p)/p.)

the lowliest monk

  • Comment on Re: Fastest way to calculate hypergeometric distribution probabilities (i.e. BIG factorials)?

Replies are listed 'Best First'.
What are "the odds"?
by hv (Parson) on Jun 14, 2005 at 09:54 UTC

    BTW, do you really mean "the odds"? Or do you want the probability p? [...] (The odds are (1 p)/p.)

    Hmm, if the probability is 25%, I'd read that as implying "the odds are 3". But that isn't right: the odds are "3 to 1 against", which means the same as 25% - in fact I'd consider it reasonable even to say "the odds are 25%".

    I'm not sure if there is a name for what (1-p)/p represents, but I don't think "the odds" is it.

    Hugo

      In the example you gave the odds are 3:1 (or 3, if one follows the common practice viewing this as a ratio), but decidedly not 25%. Granted, in colloquial speech, "odds" and "probability" are often used interchangeably, but technically odds and probabilities are "interchangeable" only in the limited sense that one can derive one from the other. They mean different things. See here.

      Update: In response to chas's comment, I replaced the link to MathWorld's definition (which was, indeed, well, odd) with a link to a clearer explanation of odds vs. probabilities.

      the lowliest monk

        By the way, I consider that the definition of "odds of winning" on that Mathworld page is badly stated since that expression is exactly what almost every mathematician in the world would call "odds against winning." I have to think that whoever wrote it was just confused.
        chas
      Probability p is expressed in terms of odds is "(1-p)/p to 1 against". Notice that if p=1/4 this gives "3 to 1 against." One can also compute "odds in favor" of an event, although "odds against" seems more common. (I'm not sure why that is, but suspect it may be that gamblers often like to bet on something with big odds against which then has a large payoff.) But you are correct that "the odds are 3" isn't really meaningful although I understood what tlm meant.
      chas

        The expression "odds" by itself (without the qualifier "against" or "in favor") usually means "odds against." Hence the common expression "long odds" to refer to low probability. Long odds == fat chance == slim chance (go figure).

        And you're right, this is "bookie talk".

        the lowliest monk

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://466338]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-01-25 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?