Is there any statistical library for javascript?

13,268

Solution 1

OpenEpi is a Javascript stats library, is open source, and has ANOVA and t-tests. I've not tried it (it's a bit too focused on epidemiology for my needs) but it might be useful.


jStat is a javascript statistical library project, and it looks like it's got a great future, but it might not have all you need right now. Edit: as of Dec 2012 it looks like the jStat project page is no longer maintained but the project is continuing to be developed. There's more up to date documentation on github. It now does have anova tests and varieties of t-test. No sign of Wilcoxon signed-rank though.


If you need very specific statistical processing in javascript urgently, you might have most success by browsing Omegahat who have various little tools that bridge the established stats language R with others including javascript.

It'll depend on the details of exactly what you want to do, but you might have some success with packages such as RJavascript - a code translator which aims to help turn existing R features into Javascript (just don't expect quality results first time). Also, SpiderMonkey builds on R for browsers, so it might be useful for internal or personal uses (but it's unlikely to be suitable for public publishing).

Solution 2

Some years ago I ported https://code.google.com/p/statistics-distributions-js/ so that I could use it in http://elem.com/~btilly/effective-ab-testing/ - it may have the functionality you need if you only need simple things.

Share:
13,268
Orhun Alp Oral
Author by

Orhun Alp Oral

Updated on June 16, 2022

Comments

  • Orhun Alp Oral
    Orhun Alp Oral almost 2 years

    I need to implement some statistical tests like: T-test, Anova and Wilcoxon on javascript.

    Similar to Java's - Apache Commons Math Library, is there any statistical tests library or codes for javascript?

  • Orhun Alp Oral
    Orhun Alp Oral about 13 years
    It looks easy to implement tprob but I couldn't find anova or wilcoxon tests in this library
  • btilly
    btilly about 13 years
    @orhun-alp-oral: For ANOVA you need the student's t distribution, which is there. The wilcoxon is indeed missing, however for n > 20 it is reasonable to use the normal distribution instead.