jgauss

0.2.0 • Public • Published

jgauss

Gaussian distribution formulae in standard normal and general normal. These are useful for bell curving. Bell curves sound like bells!

exports.standard epxorts.general

usage

module.exports two functions.

jgauss.standard needs only the x parameter

jgauss.general needs x, the mean, and the deviation

var gus = require('jgauss')
gus.standard(0) // .397...
gus.general(-2, -2, 1) // same as above, only shifted to left 2
gus.general(0, 0, .2) // narrow deviation at .2, this returns .89ish

example

from test.js

var gus = require('./')

console.log(gus.standard(0))
console.log(gus.general(0, 0, 1))
console.log(gus.general(-1, 0, 1))
console.log(gus.general(1, 0, 1))
console.log(gus.general(0, 0, 1))


console.log('chug', gus.general(0, 0, Math.sqrt(5)))
console.log(gus.general(0, 0, Math.sqrt(.2)))
console.log(gus.general(-2, -2, 1))
//console.log(gus.general(0, 0, .5))

Readme

Keywords

Package Sidebar

Install

npm i jgauss

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • johnnyscript