# skew-normal-random

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

Latest version **1.0.0** (published 2017-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install skew-normal-random
pnpm add skew-normal-random
yarn add skew-normal-random
bun add skew-normal-random
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-08-03 |
| First published | 2017-08-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Benjamin Murden |
| Maintainers | benmurden |
| Keywords | skew, skewed, normal, distribution, random |

## Links

- npm: https://www.npmjs.com/package/skew-normal-random
- Repository: https://github.com/benmurden/skew-normal-random
- Homepage: https://github.com/benmurden/skew-normal-random#readme
- Issues: https://github.com/benmurden/skew-normal-random/issues
- npm.io page: https://npm.io/package/skew-normal-random

## Recent versions

- 1.0.0 (latest) — 2017-08-03

## README

# Skew-normal Random
Generate a set of random numbers over a skew-normal distribution.

[![Build Status](https://travis-ci.org/benmurden/skew-normal-random.svg?branch=master)](https://travis-ci.org/benmurden/skew-normal-random)

## 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

```javascript
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](https://github.com/robbrit/randgen).

---
_Source: https://npm.io/package/skew-normal-random · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
