GWorking
GWorking

Reputation: 4341

Javascript and statistics: a library for calculating p-values?

It seems that there's no library that can calculate p-values with javascript, but how that can be? I'm sure there has to be something.

What I've found is these 2 options that calculate these values but then you should find the code in the web page and adapt to your necessities.

http://home.ubalt.edu/ntsbarsh/Business-stat/otherapplets/pvalues.htm#rtdist http://www.njohnston.ca/2010/09/p-value-calculators-and-graphers-in-javascript/

And a library that also calculates it but without documentation and an abandoned state

https://code.google.com/archive/p/statistics-distributions-js/source/default/source

Is this truth? It doesn't exist any stats js library that has included this calculation?

Upvotes: 2

Views: 3461

Answers (2)

embulldogs99
embulldogs99

Reputation: 980

As said before, jStat is a great resource. To help on your search...

Here is the documentation:http://jstat.github.io/all.html

Here is the function that returns pvalues:

    jStat.tukeyhsd( arrays )

This is what to include in your html

    <script src="https://cdn.jsdelivr.net/npm/jstat@latest/dist/jstat.min.js"></script>

And here is the github: https://github.com/jstat/jstat

Upvotes: 0

Tr1gZer0
Tr1gZer0

Reputation: 1712

What about https://github.com/jstat/jstat?

I'm not sure they calculate P-values, but I'm sure you can calculate the probabilities you are looking for based on the assumed distribution.

Hope this helps.

Upvotes: 5

Related Questions