Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

Results 1 to 3 of 3

Thread: Statistics module

  1. #1
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    47
    Posts
    7,551
    Blog Entries
    2
    Rep Power
    10

    Statistics module

    Hi all.

    Roberto is thinking on a new module: STAT
    STAT module will be dedicated to statistics.

    Apart basic statistical functions, do you have some suggestions? We are interested on idea or web link references.

    Regards
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  2. #2

    Re: Statistics module

    Did a statistics module get developed?
    If so, how do I access it?

    Thanks



    Quote Originally Posted by Eros Olmi
    Hi all.

    Roberto is thinking on a new module: STAT
    STAT module will be dedicated to statistics.

    Apart basic statistical functions, do you have some suggestions? We are interested on idea or web link references.

    Regards
    Eros

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    6,353
    Rep Power
    645

    Re: Statistics module

    Hi Pete,

    STAT module is already part of ThinBasic.
    It operates on arrays mostly.

    Here is tiny example on calculating median:
    [code=thinbasic]
    USES "Console", "STAT"

    DIM MyData(5) as long

    ' -- Multi-assign from index 1 to 5
    MyData(1) = 1, 2, 3, 4, 5

    PRINTL "Array:", JOIN$(MyData, " ")
    PRINTL "Median:", STAT_Median(MyData)

    printl "Any key to quit"
    WaitKey
    [/code]

    But there are more functions in STAT. If you copied the code above to thinAir, just move your cursor on "STAT" and hit F1, context help will show you info on STAT module.

    Currently STAT provides following funcitons:
    STAT_SUM
    STAT_STDERROR
    STAT_STDDEVIATION
    STAT_RANDOM
    STAT_PRODUCT
    STAT_MIN
    STAT_MEDIAN
    STAT_MEANHARMONIC
    STAT_MEANGEOMETRIC
    STAT_MEANARITHMETIC
    STAT_MAX
    STAT_INVERSESUM
    STAT_HISTOGRAM
    STAT_FILLARRAY
    STAT_COUNT
    STAT_COPYARRAY
    STAT_CLONEARRAY
    STAT_CHISQUARE
    To enable statistics functions, do not forget USES "STAT" in your script.


    Hope it helps,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

Similar Threads

  1. Some Win32 API usage statistics
    By ErosOlmi in forum Development
    Replies: 0
    Last Post: 15-03-2009, 23:16

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
  •