RepositoryJavaScript
simple-statistics

simple-statistics/simple-statistics

simple statistics for node & browser javascript

3.5kstars
246forks
13issues
4views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: regression

#1 Repository of the month

2
TINIX TRENDING·Topic: statistics

#2 Repository of the month

3
TINIX TRENDING·Topic: math

#3 Repository of the month

Simple Statistics

A JavaScript implementation of descriptive, regression, and inference statistics.

Coverage Status npm version

Implemented in literate JavaScript with no dependencies, designed to work in all modern browsers (including IE) as well as in node.js.

Installation

  • I'm using Node.js, Webpack, Browserify, Rollup, or another module bundler, and install packages from npm.
    • First, install the simple-statistics module, using npm install simple-statistics, then include the code with require or import:
    • I use the require function to use modules in my project. (most likely)
      • When you use 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')
    • I use import to use modules in my project. I'm probably using Babel, @std/esm, Webpack, or Rollup.
      • Import all functions under the ss object:
        import * as ss from 'simple-statistics'
        Include a specific named export:
        import {min} from 'simple-statistics'
        Simple statistics has only named exports for ES6.
  • I'm using Deno.
    • We recommend using Deno's first-class NPM compatibility to use simple-statistics from NPM: you'll need to import it as npm:simple-statistics.
  • I'm not using a module bundler. I'm writing a web page, and want to include simple-statistics using a script tag.
    • I want to support all browsers
      • When you use simple-statistics from a script tag, you don't get to choose the variable name it is assigned to: simple-statistics will always become available globally as the variable ss. You can reassign this variable to another name if you want to, but doing so is optional.
    • I want to use ES6 modules in a browser and I'm willing to only support new browsers to do it
      • This module works great with the ?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.
        This feature is still experimental in unpkg and very bleeding-edge.

Similar Projects

Discover other similar projects and AI models.

RepositoryPHP
markrogoyski/math-php

Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k
Mar 9, 2026
RepositoryJavaScript
trekhleb/javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

196.8k
Jul 26, 2026
Repository
getify/You-Dont-Know-JS

A book series (2 published editions) on the JS language.

184.8k
Oct 31, 2026
RepositoryJavaScript
react/react

The library for web and native user interfaces.

253.0k
Nov 30, 2026
RepositoryJavaScript
twbs/bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

175.1k
Dec 1, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryTypeScript
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

212.6k
Oct 10, 2024