js-stats
Package provides the implementation of various statistics distribution such as normal distribution, fisher, student-t, and so on
Features
-
Normal Distribution
- cumulativeProbability(Z)
- invCumulativeProbability(p)
-
Student's T Distribution
- cumulativeProbability(t_df)
- invCumulativeProbability(p)
-
Fisher–Snedecor Distribution
- cumulativeProbabiliyt(F)
-
Chi-Square Distribution
- cumulativeProbabiliy(ChiSquare)
Install
Run the following npm command to install
npm install js-stats
Usage
Sample code is available at playground
Using with nodejs
jsstats = ; //====================NORMAL DISTRIBUTION====================// var mu = 00; // meanvar sd = 10; // standard deviationvar normal_distribution = mu sd; var X = 100; // point estimate value var p = normal_distribution; // cumulative probability var p = 07; // cumulative probabilityvar X = normal_distribution; // point estimate value //====================T DISTRIBUTION====================// var df = 10; // degrees of freedom for t-distributionvar t_distribution = df; var t_df = 100; // point estimate or test statisticvar p = t_distribution; // cumulative probability var p = 07;var t_df = t_distribution; // point estimate or test statistic //====================F DISTRIBUTION====================// var df1 = 10; // degrees of freedom for f-distributionvar df2 = 20; // degrees of freedom for f-distributionvar f_distribution = df1 df2; var F = 100; // point estimate or test statisticvar p = f_distribution; // cumulative probability //====================Chi Square DISTRIBUTION====================// var df = 10; // degrees of freedom for cs-distributionvar cs_distribution = df; var X = 100; // point estimate or test statisticvar p = cs_distribution; // cumulative probability