1.1.1 • Published 3 years ago

normal-distribution v1.1.1

Weekly downloads
952
License
ISC
Repository
github
Last release
3 years ago

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

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

6 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago