{"name":"distributions","description":"A collection of probability distribution functions","version":"2.0.0","author":{"name":"Andreas Madsen","email":"amwebdk@gmail.com"},"main":"./distributions.js","scripts":{"test":"tap test/simple/*"},"repository":{"type":"git","url":"git://github.com/AndreasMadsen/distributions.git"},"keywords":["distribution","normal","studentt","uniform"],"dependencies":{"cephes":"^1.1.2"},"devDependencies":{"tap":"^12.1.0"},"license":"MIT","gitHead":"17b33ab90721af05ce0dfd7dbe9fee10a9b19c4c","bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"homepage":"https://github.com/AndreasMadsen/distributions#readme","_id":"distributions@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"12.0.0-pre","_npmUser":{"name":"andreasmadsen","email":"amwebdk@gmail.com"},"dist":{"integrity":"sha512-vZoOsO1T4vMvvjnFW3NmyVRfrOrCpnOo3k6IlUn/qBKXzm5toOs2joiie7VYyXlB8qKt5SmoeX/09S3GgjMEww==","shasum":"be9f8264decef37cc5379c1c05bac6984b18abfc","tarball":"http://registry-npm.ywwl.com/distributions/download/distributions-2.0.0.tgz","fileCount":13,"unpackedSize":21270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcBmpOCRA9TVsSAnZWagAAcxEP/1WTgiexeIk12a0YVPJD\nteA2NqkRFqlEkx8scPq3olmztJm9sVag5Pxv11O4QXzlSQD5r2FX/wkByG98\ni/E3FcfM5FJo7L9ahL2i2p1CBfqX/UeQLjO96yJKx4zSL6QK6OqqGuo/X/me\nQzhRLVkywVi92zm+LG4LeXidAhaZGQg9gHpy8z+mPyccfAA7jJb6BBwCgJQz\n6sS8d5ceVrO+9d3+jACD7C3mM4bNNPRmucevv91K5DCv7M4mvylg2oc6vtj0\nPOWbpGWv5G1h/JTh2SrW5+SrU2/Dhtp2LJSEaM/u9s5VjYCDSCR1Mk0RuaiC\nbpUnoqe37zskfxykRgOcxIchiumRs2vetXEu3Llg+N+FA2ZbyK6yxcLm3zt+\nBf0TOQSH5aV1zKce1VoxuHLpXVuIVTk3Y3diaN9jaHfa61myQxLzOkS/rTa9\nSx1DnWu/OEA7Xq6c5EseOeF6Miobb3eyqv4+nlQd1Fs3yrnri4wtbAU3bRkC\nEyJHsndbB4tf700kV0OAyi/Nh1PGlCn/5XBp9u9MowkXvfvdxGWWrGF3Clga\npBKO1RMrmF1tYMbQxO749SL/Vc6f4DYVOoFxH8edyqNVc1hajMnreQ7c2rU2\nAZ1k0Ix5HwcN3BgThKWDpVSPtaN2k2m/oyzCaQ/mwaPwP9nmlypujUgLg48m\n1lqG\r\n=3zvd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/+wYpZZmPDCbH2/vRz/pVW7x3YTa4A5j84yiFbsr8uQIhAPNtr272nHTtdQdDGv2D0eovXdyzw2DKh/M6PFm1jR8+"}],"size":5255,"noattachment":false,"key":"/distributions/-/distributions-2.0.0.tgz"},"maintainers":[{"name":"andreasmadsen","email":"amwebdk@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/distributions_2.0.0_1543924301879_0.9495642503765813"},"_hasShrinkwrap":false,"readme":"# distributions\n\n> A collection of probability distribution functions\n\n## Installation\n\n```sheel\nnpm install distributions\n```\n\n## Example\n\n```javascript\nvar distributions = require('distributions');\nvar normal = distributions.Normal(1 /* mean */, 2 /* std deviation */);\n\nconsole.log(normal.pdf(1)); // 0.199...\nconsole.log(normal.cdf(1)); // 0.5\nconsole.log(normal.inv(1)); // Infiniy\n\nconsole.log(normal.mean()); // 1\nconsole.log(normal.median()); // 1\nconsole.log(normal.variance()); // 4\n```\n\n## Documentation\n\nAll distributions in this module takes some or no arguments and can have a\ndefault value. They are also created by calling the constructor:\n\n```javascript\n// both do the same\nvar uniform = distributions.Uniform(-2, 2);\nvar uniform = new distributions.Uniform(-2, 2);\n```\n\nThe instance then has 3 probability functions:\n\n```javascript\nvar y = uniform.pdf(x); // probability density function\nvar p = uniform.cdf(q); // cumulative distribution function\nvar q = uniform.inv(p); // quantile function\n```\n\nand also 3 general methods for the _median_, _mean_ and _variance_:\n\n```javascript\nuniform.median();\nuniform.mean();\nuniform.variance();\n```\n\nThe currently implemented distributions are listed bellow.\n\n##### `Uniform(a = 0, b = 1)` - The Uniform Distribution\n\nCreate a uniform distribution, with a range from `a` to `b`. Note that\n`uniform.inv(p)` will return `NaN` outside the range from `0` to `1`,\nand that `uniform.inv(0) == a` and  `uniform.inv(1) == b`.\n\n##### `Normal(mean = 0, sd = 1)` - The Normal Distribution\n\nCreate a normal distribution, with a custom mean (`mean`) and standard deviation\n(`sd`).\n\n##### `Studentt(df)` - The Student t Distribution\n\nCreate a student t distribution, with a degree of freedom set to `df`.\n\n##### `Binomial(properbility, size)` - The Binomial Distribution\n\nCreate a binomial distribution, with a a given `properbility` of success and\nsample `size`.\n\n## Testing\n\nAll functions are tested by comparing with a mathematical reference\neither _MatLab_, _Maple_ or _R_.\n\n## License\n\n**The software is license under \"MIT\"**\n\n> Copyright (c) 2013 Andreas Madsen\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n","publish_time":1543924302027,"_cnpm_publish_time":1543924302027,"dist-tags":{"latest":"2.2.0"}}