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))

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    5
  • 0.1.0
    3

Package Sidebar

Install

npm i jgauss

Weekly Downloads

4

Version

0.2.0

License

MIT

Last publish

Collaborators

  • johnnyscript