Lévy distribution constructor.
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we’ve built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
[![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url]
Lévy distribution constructor.
bash
npm install @stdlib/stats-base-dists-levy-ctor
script
tag without installation and bundlers, use the [ES Module][es-module] available on the [esm
][esm-url] branch (see [README][esm-readme]).deno
][deno-url] branch (see [README][deno-readme] for usage intructions).umd
][umd-url] branch (see [README][umd-readme]).javascript
var Levy = require( '@stdlib/stats-base-dists-levy-ctor' );
javascript
var levy = new Levy();
var median = levy.median;
// returns ~2.198
mu = 0.0
and c = 1.0
. To create a distribution having a different mu
(location parameter) and c
(scale parameter), provide the corresponding arguments.javascript
var levy = new Levy( 2.0, 4.0 );
var median = levy.median;
// returns ~10.792
javascript
var levy = new Levy();
var mu = levy.mu;
// returns 0.0
levy.mu = 3.0;
mu = levy.mu;
// returns 3.0
c
must be a positive number.javascript
var levy = new Levy( 2.0, 4.0 );
var c = levy.c;
// returns 4.0
levy.c = 3.0;
c = levy.c;
// returns 3.0
javascript
var levy = new Levy( 4.0, 12.0 );
var entropy = levy.entropy;
// returns ~5.809
javascript
var levy = new Levy( 4.0, 12.0 );
var mu = levy.mean;
// returns Infinity
javascript
var levy = new Levy( 4.0, 12.0 );
var median = levy.median;
// returns ~30.377
javascript
var levy = new Levy( 4.0, 12.0 );
var mode = levy.mode;
// returns 8.0
javascript
var levy = new Levy( 4.0, 12.0 );
var s = levy.stdev;
// returns Infinity
javascript
var levy = new Levy( 4.0, 12.0 );
var s2 = levy.variance;
// returns Infinity
javascript
var levy = new Levy( 2.0, 4.0 );
var y = levy.cdf( 2.5 );
// returns ~0.005
javascript
var levy = new Levy( 2.0, 4.0 );
var y = levy.logcdf( 2.5 );
// returns ~-5.365
javascript
var levy = new Levy( 2.0, 4.0 );
var y = levy.logpdf( 2.2 );
// returns ~-7.812
javascript
var levy = new Levy( 2.0, 4.0 );
var y = levy.pdf( 2.5 );
// returns ~0.041
p
.javascript
var levy = new Levy( 2.0, 4.0 );
var y = levy.quantile( 0.5 );
// returns ~10.792
y = levy.quantile( 1.9 );
// returns NaN
javascript
var Levy = require( '@stdlib/stats-base-dists-levy-ctor' );
var levy = new Levy( 2.0, 4.0 );
var mean = levy.mean;
// returns Infinity
var median = levy.median;
// returns ~10.792
var s2 = levy.variance;
// returns Infinity
var y = levy.cdf( 20.0 );
// returns ~0.637