Have ideas to improve npm?Join in the discussion! »

    norm-dist

    3.0.1 • Public • Published

    norm-dist

    small standalone normal distribution pdf, cdf icdf (quantile) and truncated average

    ExampleWhyAPILicense

    Example

    import {icdf, cdf} from 'norm-dist'
    import pdf from 'norm-dist/pdf.js' //same as normDist.pdf
    var quartile = icdf(0.25)
        probability = pdf(quartile),
        cummulative = cdf(quartile) // => 0.25
        interQuartileAverage = cdf(-quartile, quartile) // => 0

    Why

    This are usually incorporated into large monolitic libraries. Many times, only this is needed.

    API

    • .pdf(number) => number z to probability
    • .cdf(number) => number z to cummulative probability
    • .icdf(number) => number probability to z, 0 <= p <= 1
    • .intE(z0, z1) => number average of a truncated interval

    All 4 functions are also available directly in standalone files(require('normDist').intE === require('normDist/intE'))

    License

    Released under the MIT License

    Install

    npm i norm-dist

    DownloadsWeekly Downloads

    14

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    7.12 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar