jstat / jstat

JavaScript Statistical Library
http://jstat.github.io/
MIT License
1.76k stars 246 forks source link

ttest function #66

Closed feifeipan closed 10 years ago

feifeipan commented 11 years ago

I wanna use ttest to test if my data(in array) is normal distribution.

What's the params "value" means in the ttest function

jStat.ttest( value, array, sides)?

Thanks.

trevnorris commented 11 years ago

To be honest I'm not completely sure. That was contributed, and I don't fully understand the statistics. The code shows that the value is passed to tscore, so I'm assuming it's the same as in the following:

jStat.tscore(value, array)
Returns the t-score of value given the data from the array.
mcclella commented 11 years ago

t-tests in general are for comparing the mean of an array to either an a priori value or to the mean of another array. It is not appropriate for determining if the data values in an array are consistent with the normal distribution. The Kolmogorov-Smirnov test or others are appropriate for that. I don't think those are implemented in jStat.

trevnorris commented 11 years ago

All the implemented statistical tests are listed here http://jstat.github.io/test.html

If you find they're not implemented correctly please let me know. That was a community contribution, but they forgot to add proper tests.

trevnorris commented 10 years ago

Closing for no follow up.