time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (6849B)


      1 <!--
      2 
      3 @license Apache-2.0
      4 
      5 Copyright (c) 2018 The Stdlib Authors.
      6 
      7 Licensed under the Apache License, Version 2.0 (the "License");
      8 you may not use this file except in compliance with the License.
      9 You may obtain a copy of the License at
     10 
     11    http://www.apache.org/licenses/LICENSE-2.0
     12 
     13 Unless required by applicable law or agreed to in writing, software
     14 distributed under the License is distributed on an "AS IS" BASIS,
     15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 See the License for the specific language governing permissions and
     17 limitations under the License.
     18 
     19 -->
     20 
     21 # Chi-squared
     22 
     23 > Chi-squared distribution.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var chisquare = require( '@stdlib/stats/base/dists/chisquare' );
     31 ```
     32 
     33 #### chisquare
     34 
     35 Chi-squared distribution.
     36 
     37 ```javascript
     38 var dist = chisquare;
     39 // returns {...}
     40 ```
     41 
     42 The namespace contains the following distribution functions:
     43 
     44 <!-- <toc pattern="*+(cdf|pdf|mgf|quantile)*"> -->
     45 
     46 <div class="namespace-toc">
     47 
     48 -   <span class="signature">[`cdf( x, k )`][@stdlib/stats/base/dists/chisquare/cdf]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution cumulative distribution function.</span>
     49 -   <span class="signature">[`logpdf( x, k )`][@stdlib/stats/base/dists/chisquare/logpdf]</span><span class="delimiter">: </span><span class="description">evaluate the natural logarithm of the probability density function (PDF) for a chi-squared distribution.</span>
     50 -   <span class="signature">[`mgf( t, k )`][@stdlib/stats/base/dists/chisquare/mgf]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution moment-generating function (MGF).</span>
     51 -   <span class="signature">[`pdf( x, k )`][@stdlib/stats/base/dists/chisquare/pdf]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution probability density function (PDF).</span>
     52 -   <span class="signature">[`quantile( p, k )`][@stdlib/stats/base/dists/chisquare/quantile]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution quantile function.</span>
     53 
     54 </div>
     55 
     56 <!-- </toc> -->
     57 
     58 The namespace contains the following functions for calculating distribution properties:
     59 
     60 <!-- <toc pattern="*+(entropy|kurtosis|mean|median|mode|skewness|stdev|variance)*"> -->
     61 
     62 <div class="namespace-toc">
     63 
     64 -   <span class="signature">[`entropy( k )`][@stdlib/stats/base/dists/chisquare/entropy]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution differential entropy.</span>
     65 -   <span class="signature">[`kurtosis( k )`][@stdlib/stats/base/dists/chisquare/kurtosis]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution excess kurtosis.</span>
     66 -   <span class="signature">[`mean( k )`][@stdlib/stats/base/dists/chisquare/mean]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution expected value.</span>
     67 -   <span class="signature">[`median( k )`][@stdlib/stats/base/dists/chisquare/median]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution median.</span>
     68 -   <span class="signature">[`mode( k )`][@stdlib/stats/base/dists/chisquare/mode]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution mode.</span>
     69 -   <span class="signature">[`skewness( k )`][@stdlib/stats/base/dists/chisquare/skewness]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution skewness.</span>
     70 -   <span class="signature">[`stdev( k )`][@stdlib/stats/base/dists/chisquare/stdev]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution standard deviation.</span>
     71 -   <span class="signature">[`variance( k )`][@stdlib/stats/base/dists/chisquare/variance]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution variance.</span>
     72 
     73 </div>
     74 
     75 <!-- </toc> -->
     76 
     77 The namespace contains a constructor function for creating a [Chi-squared][chisquare-distribution] distribution object.
     78 
     79 <!-- <toc pattern="*ctor*"> -->
     80 
     81 <div class="namespace-toc">
     82 
     83 -   <span class="signature">[`ChiSquare( [k] )`][@stdlib/stats/base/dists/chisquare/ctor]</span><span class="delimiter">: </span><span class="description">Chi-squared distribution constructor.</span>
     84 
     85 </div>
     86 
     87 <!-- </toc> -->
     88 
     89 ```javascript
     90 var ChiSquare = require( '@stdlib/stats/base/dists/chisquare' ).ChiSquare;
     91 
     92 var dist = new ChiSquare( 4.0 );
     93 
     94 var mu = dist.mean;
     95 // returns 4.0
     96 ```
     97 
     98 </section>
     99 
    100 <!-- /.usage -->
    101 
    102 <section class="examples">
    103 
    104 ## Examples
    105 
    106 <!-- TODO: better examples -->
    107 
    108 <!-- eslint no-undef: "error" -->
    109 
    110 ```javascript
    111 var objectKeys = require( '@stdlib/utils/keys' );
    112 var chisquare = require( '@stdlib/stats/base/dists/chisquare' );
    113 
    114 console.log( objectKeys( chisquare ) );
    115 ```
    116 
    117 </section>
    118 
    119 <!-- /.examples -->
    120 
    121 <section class="links">
    122 
    123 [chisquare-distribution]: https://en.wikipedia.org/wiki/Chi-squared_distribution
    124 
    125 <!-- <toc-links> -->
    126 
    127 [@stdlib/stats/base/dists/chisquare/ctor]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/ctor
    128 
    129 [@stdlib/stats/base/dists/chisquare/entropy]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/entropy
    130 
    131 [@stdlib/stats/base/dists/chisquare/kurtosis]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/kurtosis
    132 
    133 [@stdlib/stats/base/dists/chisquare/mean]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/mean
    134 
    135 [@stdlib/stats/base/dists/chisquare/median]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/median
    136 
    137 [@stdlib/stats/base/dists/chisquare/mode]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/mode
    138 
    139 [@stdlib/stats/base/dists/chisquare/skewness]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/skewness
    140 
    141 [@stdlib/stats/base/dists/chisquare/stdev]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/stdev
    142 
    143 [@stdlib/stats/base/dists/chisquare/variance]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/variance
    144 
    145 [@stdlib/stats/base/dists/chisquare/cdf]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/cdf
    146 
    147 [@stdlib/stats/base/dists/chisquare/logpdf]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/logpdf
    148 
    149 [@stdlib/stats/base/dists/chisquare/mgf]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/mgf
    150 
    151 [@stdlib/stats/base/dists/chisquare/pdf]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/pdf
    152 
    153 [@stdlib/stats/base/dists/chisquare/quantile]: https://www.npmjs.com/package/@stdlib/stats/tree/main/base/dists/chisquare/quantile
    154 
    155 <!-- </toc-links> -->
    156 
    157 </section>
    158 
    159 <!-- /.links -->