JSPM

skew-normal-random

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q26441F
  • License MIT

Generate random numbers in a skew-normal distribution, optionally truncated.

Package Exports

  • skew-normal-random

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (skew-normal-random) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Skew-normal Random

Generate a set of random numbers over a skew-normal distribution.

Build Status

Usage

rSkewNorm(alpha, location, scale, [min], [max])

Generate a single random number, optionally limited by a minimum and maximum. If alpha is zero, it would be the same as a regular normal distribution.

rvSkewNorm(size, alpha, location, scale, [min], [max])

Generate an array of size with random numbers generated according to the specification provided.

Examples

var skewnorm = require('skew-normal-random');

skewnorm.rSkewNorm(0, 0, 1); // Will generate a single random number with no skew.
skewnorm.rSkewNorm(6, 5, 2); // Will generate a single random number skewed such that the mean is 7, rather than 5.
skewnorm.rvSkewNorm(10000, 6, 5, 2); // Will generate an array of 10,000 values with the above properties.
skewnorm.rvSkewNorm(10000, 6, 5, 2, 0, 10); // Will generate an array similar to the above, but with a minimum value of 0 and maximum of 10.

Acknowledgements

Uses random normal distribution and vectorization functions from randgen.