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

normal-distribution

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normal-distribution

A small javascript module for working with normal distributions

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NormalDistribution

https://github.com/RichieAHB/normal-distribution

A small javascript module for working with normal distributions.

The class can be instantiated like so:

const normDist = new NormalDistribution(mean, standardDeviation);

With no arguments the distribution will be a standard normal distribution with mean = 0 and standardDeviation = 1.


The four main methods that can be called are:

#pdf(value)

Accepts an integer argument and returns the probability denisty at that point in the distribution; useful for drawing the curve.

#cdf(value)

Accepts an integer argument and returns the probability of a random variable being below the one argument passed to the method.

#probabilityBetween(value1, value2)

Accepts two integer arguments and returns the probability of a random variable being between the two arguments passed.

#zScore(value)

Accepts an integer argument and returns the z-score for that value.


Note: the z-table used in this module gives probabilities for up to 3.5 standard deviations from the mean

Keywords

FAQs

Package last updated on 02 Jul 2021

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