random number generator for the unit normal distribution


Keywords
random, stats, statistics, sample, distribution, normal, gaussian
License
MIT
Install
npm install random-z@2.0.1

Documentation

random-z

random number generator following the normal standard distribution

IntroductionInstallationUsageTestLicense

Introduction

Simple and small standalone random number generator for Z, the standard normal distribution with an average of 0 and a variance of 1 (μ=0, σ=1). The random number generator uses the Marsaglia polar method. The additional independent random sample is cashed for the next call.

Usage

The function takes no parameters and returns a random number. Available in cjs (require), es6 (import) or browser (script) formats

import Z from 'random-z'
var newRandomSample = Z()

License

MIT © Hugo Villeneuve