ErosOlmi
07-09-2006, 10:45
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
Did a statistics module get developed?
If so, how do I access it?
Thanks
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
Petr Schreiber
02-09-2008, 18:46
Hi Pete,
STAT module is already part of ThinBasic.
It operates on arrays mostly.
Here is tiny example on calculating median:
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
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