Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

probability-distributions

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

probability-distributions

Generate random variables from a variety of probability distributions. Includes tools to shuffle an array or sample from it.

  • 0.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6K
decreased by-18.3%
Maintainers
1
Weekly downloads
 
Created
Source

Probability Distributions Library for JavaScript

Functions for sampling random variables from probability distributions. Uses the same function names as R.

Installation

npm install --save probability-distributions

var PD = require("probability-distributions");

Documentation and examples

See http://statisticsblog.com/probability-distributions/

Currently supported

  • Binomial distribution

  • Beta distribution

  • Cauchy distribution

  • Chi-Squared distribution

  • Exponential distribution

  • F distribution

  • Gamma distribution

  • Laplace distribution

  • Log Normal distribution

  • Negative Binomial distribution

  • Normal (Gaussian) distribution

  • Poisson distribution (not recommended for lambda > 100)

  • Sample (shuffle an array, or select items using optional array of weights)

  • Uniform distribution (with entropy option for standard uniform)

  • Uniform limited to whole numbers

  • Words (generate random words from a library of characters)

  • Visualization (show the values of a random variable in an animated loop)

Warning

This package contains additional distributions marked as "experimental". Use these with extreme caution.

License

MIT

Keywords

FAQs

Package last updated on 31 Oct 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc