Results 1 to 6 of 6

Thread: python chance calculations

  1. #1
    Join Date
    Sep 2007
    Location
    the Hague, Netherlands
    Beans
    949
    Distro
    Ubuntu 9.10 Karmic Koala

    python chance calculations

    Hello guys!

    I want to write a program in Python to do chance calculations, you know, like binomcdf and bimompdf functions on the TI calculator, and just general chances.

    Example: "500 Ubuntuforums.org users get interviewed. 280 of them turn out to be Anime fans. What is the chance that if you select 60 people from the 500, at least 40 of them are anime fans?"

    Are there any handy modules/functions in python for calculating chances? Google isn´t giving me any usefull hits
    Last edited by eragon100; November 13th, 2009 at 11:00 AM.

  2. #2
    Join Date
    Sep 2009
    Location
    New York City
    Beans
    116

    Re: python chance calculations

    NumPy, StatPy and SciPy have way more than combinitorics and statistics, but they are a place to start.

    There is a Python binding to R -- also overkill, but good to know.
    It's easy to solve the halting problem with a shotgun.

    -- Larry Wall

  3. #3
    Join Date
    Sep 2007
    Location
    the Hague, Netherlands
    Beans
    949
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: python chance calculations

    Quote Originally Posted by A_Fiachra View Post
    NumPy, StatPy and SciPy have way more than combinitorics and statistics, but they are a place to start.

    There is a Python binding to R -- also overkill, but good to know.
    Thanx for the info!

  4. #4
    Join Date
    Sep 2009
    Location
    New York City
    Beans
    116

    Re: python chance calculations

    Don't forget to look into weighted distributions (google will give you plenty of leads)
    It's easy to solve the halting problem with a shotgun.

    -- Larry Wall

  5. #5
    Join Date
    Aug 2007
    Location
    127.0.0.1
    Beans
    1,800
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: python chance calculations

    Quote Originally Posted by eragon100 View Post
    Hello guys!

    I want to write a program in Python to do chance calculations, you know, like binomcdf and bimompdf functions on the TI calculator, and just general chances.

    Example: "500 Ubuntuforums.org users get interviewed. 280 of them turn out to be Anime fans. What is the chance that if you select 60 people from the 500, at least 40 of them are anime fans?"

    Are there any handy modules/functions in python for calculating chances? Google isn´t giving me any usefull hits
    I would stick to only R, and learn it properly, although it's not the prettiest language.

    Also, two strata, a population and a sample? That looks like a hypergeometric distribution.
    "Just in terms of allocation of time resources, religion is not very efficient. There's a lot more I could be doing on a Sunday morning."
    -Bill Gates

  6. #6
    Join Date
    May 2009
    Beans
    160

    Re: python chance calculations

    Quote Originally Posted by Can+~ View Post
    I would stick to only R, and learn it properly, although it's not the prettiest language.

    Also, two strata, a population and a sample? That looks like a hypergeometric distribution.
    I don't see how R is any more suitable than Python (or any other language for that matter) for this kind of problem.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •