{"versions":{"0.2.0":{"name":"distributions","description":"A collection of probability distribution functions","version":"0.2.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":{"mathfn":"0.3.x"},"devDependencies":{"tap":"0.4.x"},"license":"MIT","engines":{"node":"0.10","npm":"1"},"bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"_id":"distributions@0.2.0","dist":{"shasum":"168b6ec79a59080976fe6a258b20eda676f7a25d","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/distributions-0.2.0.tgz","integrity":"sha512-JWKKEFPA91ekq76avMqVfVPgrJuHEX9eIpi71SRnHUbrcxuHVEzBDRpV5JiFuZb6u5tqokFnolHRdRjLZvGb4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpwVEq+Zpfvf3Ys/6/mFpi6/HfWxrO925eRUpB3TbrEwIgE4PItD3DDXzc0V5lS+Um3jtxoXb9yd7YXX8cFJiRTro="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"anonymous","email":"amwebdk@gmail.com"},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"directories":{},"contributors":[]},"0.2.1":{"name":"distributions","description":"A collection of probability distribution functions","version":"0.2.1","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":{"mathfn":"0.3.x"},"devDependencies":{"tap":"0.6.x"},"license":"MIT","gitHead":"ba633c2ff9f9395d94e0397db08bfc9a3feafb8a","bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"homepage":"https://github.com/AndreasMadsen/distributions","_id":"distributions@0.2.1","_shasum":"578ad0dcfb01527c5810b1c0690ae9e491bff360","_from":".","_npmVersion":"2.5.1","_nodeVersion":"1.3.0","_npmUser":{"name":"anonymous","email":"amwebdk@gmail.com"},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"dist":{"shasum":"578ad0dcfb01527c5810b1c0690ae9e491bff360","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/distributions-0.2.1.tgz","integrity":"sha512-eb1XE+Ydj3zAr1+VW0eZy4KCWGEE6lihIk5Nfals10wGa3nqGvygOKzJxm69w5s2G7AwxZw9t5jaWCXfHu7Bwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/bhLVNSBvAA6kJpiZheNH8UblkQn++xdWSiZOWzWE6AiEAgSDntoPSEFxfaWaHvC/v5kIc2ooCb1DhciJZmtSBc3s="}]},"directories":{},"contributors":[]},"1.0.0":{"name":"distributions","description":"A collection of probability distribution functions","version":"1.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":{"mathfn":"^1.0.0"},"devDependencies":{"tap":"^6.3.0"},"license":"MIT","gitHead":"18e6d16137a6ab30f4e2721b69e644f0bb11061e","bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"homepage":"https://github.com/AndreasMadsen/distributions#readme","_id":"distributions@1.0.0","_shasum":"16466e676df7f311929941d3d7f02010466671a9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.2-pre","_npmUser":{"name":"anonymous","email":"amwebdk@gmail.com"},"dist":{"shasum":"16466e676df7f311929941d3d7f02010466671a9","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/distributions-1.0.0.tgz","integrity":"sha512-whZgPSACZKP9XAqPsmHeKs6U0e95eYcD4A94WqfzKf+g0t1UmiNTK4iuV0U1RbsBzTgllkkfKJN+kp0Ce5GnZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICb7R5H75wVUPPX/wlfR+p0i/Jz38jVVFzNCXpz8q+uUAiBOcp5eAfLncrgax2Ft+ngjDWjbNkaMAL4uS4r+l+LCiA=="}]},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/distributions-1.0.0.tgz_1470832814065_0.9235431863926351"},"directories":{},"contributors":[]},"1.1.0":{"name":"distributions","description":"A collection of probability distribution functions","version":"1.1.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":{"mathfn":"^1.0.0"},"devDependencies":{"tap":"^6.3.0"},"license":"MIT","gitHead":"41f3065155596a2148ff6c1496d22774b31dbb91","bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"homepage":"https://github.com/AndreasMadsen/distributions#readme","_id":"distributions@1.1.0","_npmVersion":"5.3.0","_nodeVersion":"9.0.0-pre","_npmUser":{"name":"anonymous","email":"amwebdk@gmail.com"},"dist":{"integrity":"sha512-mufW9T1kRlzLVAaekUhgdfcMgX2r/zYQmJx3sGdUAwe0/JSQWey0XgqiDtfUUqYcr/QWHCnBd2M/v45tS/+YAQ==","shasum":"012973634ef6dd595a525ab1b397d217131c0ea5","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/distributions-1.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKxK6b+5QzHeWbK+AqxWNeg4hjV75M9wgE5vKyAuKIcAiBtY8yPyB+YqPj0Dv6SFN15O10lhta6pYNaidDMTEoWBQ=="}]},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/distributions-1.1.0.tgz_1510571691863_0.9927574049215764"},"directories":{},"contributors":[]},"2.0.0":{"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":"anonymous","email":"amwebdk@gmail.com"},"dist":{"integrity":"sha512-vZoOsO1T4vMvvjnFW3NmyVRfrOrCpnOo3k6IlUn/qBKXzm5toOs2joiie7VYyXlB8qKt5SmoeX/09S3GgjMEww==","shasum":"be9f8264decef37cc5379c1c05bac6984b18abfc","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/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+"}]},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/distributions_2.0.0_1543924301879_0.9495642503765813"},"_hasShrinkwrap":false,"contributors":[]},"2.1.0":{"name":"distributions","description":"A collection of probability distribution functions","version":"2.1.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":"a8e2601c0919c9d28c2945b084464568fc0a7b3b","bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"homepage":"https://github.com/AndreasMadsen/distributions#readme","_id":"distributions@2.1.0","_nodeVersion":"13.0.0-pre","_npmVersion":"6.9.0","dist":{"integrity":"sha512-4eov7WXRip5Tu0K7Y51W1oVt+DcvkoE0EzsvbLzgedC/n4PUpYXHqk6vo/OH1HteBHp5Vm6cmfnInf9NAXM4qQ==","shasum":"7005f01898937fbe6404abda20fa7f4aaaa058e0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/distributions-2.1.0.tgz","fileCount":15,"unpackedSize":34851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdYqUcCRA9TVsSAnZWagAA7+gP/11hKdfppGNT9JyvNp/a\n/8YcU2gymKpiZu5aLhtSjCvi1yz6MLXFk0SxPifgiByORz0sD3tHxoz3S4i8\nTuKWPF/I/J2diUuhlwM7t0hTIFIU+F6CxBMBIUxGiRtO6K1lDpmxSbT+16xr\ndmWNKZ2wto8PK0L7mpTy053w+JYTTIRSsyw4+6f6Hxs3LqOMJCAnM3nsrJt+\ntkDbbXM1l/Q6S/Hn8M6ftutyIL44wlT/Yqq3nUmnjbHi1S2x/5xkrdyOfmtu\nqqdrT3uUTX015aIf0G2EMLxl/ydHv4HMUV1R1Jh9OqJ9wkyNrz4ZAnonrF39\novwDm9y0b3eOLGltstxUph1TywYf8gkX01GsUK/B3b1BFdemO7BTXbc6SMul\n7+rpWdAjl6JfVLabV6+1+SomS+qs4mdZc6txwU08ZmQcfmQ9ydIQy0W6jXo2\ndzOZXzVCTh+hskBxXJIJvi95B3kXQBEdJVajA4FZGJy2aIdXKZfmnqtrnqXt\nNodY9xtskSYod0q1nxwOFOiMoZRMwQonP75VhME2rX8aNRjCPlSM1NzRWLoK\nGTUoZR2cIQB+D5UZ0bCN1S8ykOITwFMXQJg5ax4zPpeNx3oTpScn+9PqdLmY\nfXlnOQ+Wtygzc0DrmqbsdVBaGUhJkSOS44sc/cpEDZzZaz7dm6ZLkNdJDYAr\nsOwi\r\n=4Xi/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSRs8+tEHi7C6X3zRyOwkjFuCJO3GbgYs+l1VINgzQRwIgGfrlaSD+oDWr6JXc2mvFkcoM3UNmc3uFO62BWrDWSJ0="}]},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"_npmUser":{"name":"anonymous","email":"amwebdk@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/distributions_2.1.0_1566745884056_0.016336668842030333"},"_hasShrinkwrap":false,"contributors":[]},"2.2.0":{"name":"distributions","description":"A collection of probability distribution functions","version":"2.2.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":"^2.0.0"},"devDependencies":{"tap":"^18.0.0"},"license":"MIT","_id":"distributions@2.2.0","gitHead":"9a2ad08f961467815385cd55838cc17e70b97de5","bugs":{"url":"https://github.com/AndreasMadsen/distributions/issues"},"homepage":"https://github.com/AndreasMadsen/distributions#readme","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-n7ybud+CRAOZlpg+ETuA0PTiSBfyVNt8Okns5gSK4NvHwj7RamQoufptOucvVcTn9CV4DZ38p1k6TgwMexUNkQ==","shasum":"1b5852bb241498eb3aeb5f12db43eb103dbe5572","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/distributions/-/distributions-2.2.0.tgz","fileCount":15,"unpackedSize":34851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHIPfOROfnD11xMgtU183g7dz8WJbt4LWFwTtBUDw8aAiATwhAP71t7fjY4qXOgEtf8Rgfn58zLW6rXfSpNVsCFaA=="}]},"_npmUser":{"name":"anonymous","email":"amwebdk@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"amwebdk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/distributions_2.2.0_1714748189148_0.4368329657828789"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"2.2.0"},"name":"distributions","time":{"modified":"2024-05-03T15:29:11.420Z","created":"2022-01-26T22:36:30.082Z","0.2.0":"2013-06-30T20:18:43.994Z","0.2.1":"2015-02-25T12:50:02.457Z","1.0.0":"2016-08-10T12:40:15.774Z","1.1.0":"2017-11-13T11:14:52.811Z","2.0.0":"2018-12-04T11:51:42.027Z","2.1.0":"2019-08-25T15:11:24.203Z","2.2.0":"2024-05-03T14:56:29.306Z"},"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.","users":{}}