5

Is there a scientific library in JavaScript that can generate probability distributions like this library in Ruby?

http://rb-gsl.rubyforge.org/

For more details on the use cases see this related question: Generate Array of Numbers that fit to a Probability Distribution in Ruby?

Community
  • 1
  • 1
Lance
  • 75,200
  • 93
  • 289
  • 503
  • 1
    There's [jstat](http://www.jstat.org); not much documentation, questionable code (if you were to ask for my opinion ;-) – Pointy Jul 11 '12 at 14:47
  • Why not make an API wrapper around Ruby GSL by using say, Sinatra, then call that API from your browser using `jQuery.ajax`. – briangonzalez Aug 16 '12 at 22:34

2 Answers2

3

For generating distributions in JavaScript, see stdlib, which includes seedable PRNGs for many distributions.

kgryte
  • 864
  • 1
  • 8
  • 12
-1

From what I've been reading, some R defectors are moving toward a library called Julia. It's been ported to Javascript here by the makers of Julia themselves, and it looks quite promising.

The Julia Language

briangonzalez
  • 1,606
  • 16
  • 21
  • Also, read this interesting write-up: [The Best Statistical Programming Language is …Javascript?](http://www.r-bloggers.com/the-best-statistical-programming-language-is-%E2%80%A6javascript/) – briangonzalez Aug 16 '12 at 22:42