jstat / jstat

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

jStat.studentt.inv( p, dof ) info #264

Open chrislawes79 opened 3 years ago

chrislawes79 commented 3 years ago

Hi,

This is about explaining the functions better. The explanation for this is "Returns the value of p in the inverse of the cdf for the Student's T distribution with dof degrees of freedom."

As a stats novice I didn't really understand what this did until by luck I came across the ability to calculate a critical value (CV) with alpha and dof for a t-test (1-tailed). So I used above code with p = 0..95 and dof = 116 and got the expected value.

Basically I think the explanation for this function should say it returns the critical value (CV) not P. And the variable p should be alpha.

trevnorris commented 3 years ago

I'm open to a pull request. Unfortunately, I have no background in statistics and just maintain the library at this point.

Manoj-Goskonda commented 3 years ago

varible p is probability example p = 0.95 and dof = 116. so, left side = Critical region: (-∞, 1.6581] , right side = Critical region: [-1.6581, ∞) , two tailed = (-∞, -0.0628] ∪ [0.0628, ∞) your ans value CV. jStat.studentt.inv( p, dof ) in this inveerse also better to helpful use Excel sheet there is avaible many solution like .DIST and .INV