
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
simple-statistics
Advanced tools
A JavaScript implementation of descriptive, regression, and inference statistics.
Implemented in literate JavaScript with no dependencies, designed to work in all modern browsers (including IE) as well as in node.js.
simple-statistics module, using npm install simple-statistics,
then include the code with require or import:require function to use modules in my project. (most likely)
require, you have the freedom to assign the module to any
variable name you want, but you need to specify the module's name exactly:
in this case, 'simple-statistics'. The require method returns an object
with all of the module's methods attached to it.var ss = require('simple-statistics')import to use modules in my project. I'm probably using Babel, @std/esm, Webpack, or Rollup.
import * as ss from 'simple-statistics'Include a specific named export:
import {min} from 'simple-statistics'
Simple statistics has only named exports for ES6.ss. You can reassign this variable to
another name if you want to, but doing so is optional.
<script src='https://unpkg.com/simple-statistics@7.8.8/dist/simple-statistics.min.js'>
</script>
?module query parameter of unpkg. If you
specify type='module' in your script tag, you'll be able to import simple-statistics
directly - through index.js and with true ES6 import syntax and behavior.
<script type='module'>
import {min} from "https://unpkg.com/simple-statistics@7.8.8/index.js?module"
console.log(min([1, 2, 3]))
</script>
This feature is still experimental in unpkg and very bleeding-edge.jstat is a JavaScript library for statistical operations. It offers a wide range of statistical functions similar to simple-statistics, including descriptive statistics, probability distributions, and hypothesis testing. However, jstat has a more extensive API and supports matrix operations, making it suitable for more complex statistical analyses.
mathjs is a comprehensive mathematics library for JavaScript and Node.js. It includes a variety of mathematical functions, including statistical operations. While it is not solely focused on statistics like simple-statistics, it provides a broader range of mathematical tools, making it a versatile choice for projects that require both statistical and general mathematical computations.
ssjs (Statistical Software in JavaScript) is another library that provides statistical functions for JavaScript. It offers similar functionalities to simple-statistics, such as descriptive statistics and probability distributions. However, ssjs is less popular and has a smaller community compared to simple-statistics, which may affect the availability of support and updates.
FAQs
Simple Statistics
The npm package simple-statistics receives a total of 194,479 weekly downloads. As such, simple-statistics popularity was classified as popular.
We found that simple-statistics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.