scipy stats binom_test

Discussion in 'Python' started by dusans, Jun 25, 2009.

  1. dusans

    dusans Guest

    Amm i using the function wrong or ...? cuz in R i get the right value

    >>> binom_test(3, 5, p=0.8)

    0.262

    > dbinom(3, 5, 0.8)

    [1] 0.205
     
    dusans, Jun 25, 2009
    #1
    1. Advertising

  2. dusans

    Robert Kern Guest

    On 2009-06-25 07:14, dusans wrote:
    > Amm i using the function wrong or ...? cuz in R i get the right value
    >
    >>>> binom_test(3, 5, p=0.8)

    > 0.262
    >
    >> dbinom(3, 5, 0.8)

    > [1] 0.205


    The R equivalent of scipy.stats.binom_test() is binom.test(), not dbinom(). If
    you want the equivalent of dbinom(), use scipy.stats.binom.pmf(3,5,0.8).

    If you have more scipy questions, you should ask them on the scipy mailing list:

    http://www.scipy.org/Mailing_Lists

    --
    Robert Kern

    "I have come to believe that the whole world is an enigma, a harmless enigma
    that is made terrible by our own mad attempt to interpret it as though it had
    an underlying truth."
    -- Umberto Eco
     
    Robert Kern, Jun 25, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Utter Newbie
    Replies:
    0
    Views:
    469
    Utter Newbie
    Jul 28, 2003
  2. Paxcal
    Replies:
    0
    Views:
    1,850
    Paxcal
    Feb 11, 2004
  3. Hans Georg Krauthaeuser

    scipy.stats.itemfreq: overflow with add.reduce

    Hans Georg Krauthaeuser, Dec 21, 2005, in forum: Python
    Replies:
    2
    Views:
    284
    Hans Georg Krauthaeuser
    Dec 22, 2005
  4. vml
    Replies:
    3
    Views:
    692
  5. Christopher Barrington-Leigh

    scipy / stats : quantiles using sample weights from survey data

    Christopher Barrington-Leigh, Aug 4, 2010, in forum: Python
    Replies:
    1
    Views:
    398
Loading...

Share This Page