Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
Fréchet distribution kurtosis.
License
stdlib-js/stats-base-dists-frechet-kurtosis
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About stdlib...
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 onGitHub, and please considerfinancially supporting stdlib. We greatly appreciate your continued support!
Theexcess kurtosis for aFréchet random variable shapeα > 0
, scales > 0
, and location parameterm
is
whereΓ
is thegamma function.
npm install @stdlib/stats-base-dists-frechet-kurtosis
Alternatively,
- To load the package in a website via a
script
tag without installation and bundlers, use theES Module available on theesm
branch (seeREADME). - If you are using Deno, visit the
deno
branch (seeREADME for usage intructions). - For use in Observable, or in browser/node environments, use theUniversal Module Definition (UMD) build available on the
umd
branch (seeREADME).
Thebranches.md file summarizes the available branches and displays a diagram illustrating their relationships.
To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.
varkurtosis=require('@stdlib/stats-base-dists-frechet-kurtosis');
Returns theexcess kurtosis for aFréchet distribution with shapealpha > 0
, scales > 0
, and location parameterm
.
vary=kurtosis(5.0,1.0,1.0);// returns ~45.092y=kurtosis(5.0,10.0,1.0);// returns ~45.092y=kurtosis(5.0,1.0,2.0);// returns ~45.092
If0 < alpha <= 4
, the function returns+Infinity
.
vary=kurtosis(2.5,1.0,1.0);// returns Infinity
If providedNaN
as any argument, the function returnsNaN
.
vary=kurtosis(NaN,1.0,-2.0);// returns NaNy=kurtosis(1.0,NaN,-2.0);// returns NaNy=kurtosis(1.0,1.0,NaN);// returns NaN
If providedalpha <= 0
, the function returnsNaN
.
vary=kurtosis(0.0,3.0,2.0);// returns NaNy=kurtosis(0.0,-1.0,2.0);// returns NaN
If provideds <= 0
, the function returnsNaN
.
vary=kurtosis(1.0,0.0,2.0);// returns NaNy=kurtosis(1.0,-1.0,2.0);// returns NaN
varrandu=require('@stdlib/random-base-randu');varEPS=require('@stdlib/constants-float64-eps');varkurtosis=require('@stdlib/stats-base-dists-frechet-kurtosis');varalpha;varm;vars;vary;vari;for(i=0;i<10;i++){alpha=(randu()*20.0)+EPS;s=(randu()*20.0)+EPS;m=(randu()*40.0)-20.0;y=kurtosis(alpha,s,m);console.log('α: %d, s: %d, m: %d, Kurt(X;α,s,m): %d',alpha.toFixed(4),s.toFixed(4),m.toFixed(4),y.toFixed(4));}
#include"stdlib/stats/base/dists/frechet/kurtosis.h"
Returns the excess kurtosis for a Fréchet distribution with shapealpha
, scales
, and locationm
.
doubley=stdlib_base_dists_frechet_kurtosis(5.0,2.0,0.0 );// returns ~45.092
The function accepts the following arguments:
- alpha:
[in] double
shape parameter. - s:
[in] double
scale parameter. - m:
[in] double
location parameter.
doublestdlib_base_dists_frechet_kurtosis(constdoublealpha,constdoubles,constdoublem );
#include"stdlib/stats/base/dists/frechet/kurtosis.h"#include"stdlib/constants/float64/eps.h"#include<stdlib.h>#include<stdio.h>staticdoublerandom_uniform(constdoublemin,constdoublemax ) {doublev= (double)rand() / ( (double)RAND_MAX+1.0 );returnmin+ (v*(max-min) );}intmain(void ) {doublealpha;doubles;doublem;doubley;inti;for (i=0;i<10;i++ ) {alpha=random_uniform(STDLIB_CONSTANT_FLOAT64_EPS,20.0 );s=random_uniform(STDLIB_CONSTANT_FLOAT64_EPS,20.0 );m=random_uniform(-40.0,-20.0 );y=stdlib_base_dists_frechet_kurtosis(alpha,s,m );printf("α: %.4lf, s: %.4lf, m: %.4lf, Kurt(X;α,s,m): %.4lf\n",alpha,s,m,y ); }}
This package is part ofstdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to developstdlib, see the main projectrepository.
SeeLICENSE.
Copyright © 2016-2025. The StdlibAuthors.
About
Fréchet distribution kurtosis.
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.