<commit_before><!--

@license Apache-2.0

Copyright (c) 2018 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# Chi-squared

> Chi-squared distribution.

<section class="usage">

## Usage

```javascript
var chisquare = require( '@stdlib/math/base/dists/chisquare' );
```

#### chisquare

Chi-squared distribution.

```javascript
var dist = chisquare;
// returns {...}
```

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

<!-- eslint no-undef: "error" -->

```javascript
var getKeys = require( 'object-keys' ).shim();
var chisquare = require( '@stdlib/math/base/dists/chisquare' );

console.log( getKeys( chisquare ) );
```

</section>

<!-- /.examples -->

<section class="links">

</section>

<!-- /.links --><commit_msg>Add table of contents<commit_after><!--

@license Apache-2.0

Copyright (c) 2018 The Stdlib Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

# Chi-squared

> Chi-squared distribution.

<section class="usage">

## Usage

```javascript
var chisquare = require( '@stdlib/math/base/dists/chisquare' );
```

#### chisquare

Chi-squared distribution.

```javascript
var dist = chisquare;
// returns {...}
```

The following functions are exported for the Chi-squared distribution:

<!-- <toc pattern="*+(cdf|pdf|mgf|quantile)*"> -->

<div class="namespace-toc">

-   <span class="signature">[`cdf( x, k )`][@stdlib/math/base/dists/chisquare/cdf]</span><span class="delimiter">: </span><span class="description">chi-squared distribution cumulative distribution function.</span>
-   <span class="signature">[`logpdf( x, k )`][@stdlib/math/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>
-   <span class="signature">[`mgf( t, k )`][@stdlib/math/base/dists/chisquare/mgf]</span><span class="delimiter">: </span><span class="description">chi-squared distribution moment-generating function (MGF).</span>
-   <span class="signature">[`pdf( x, k )`][@stdlib/math/base/dists/chisquare/pdf]</span><span class="delimiter">: </span><span class="description">chi-squared distribution probability density function (PDF).</span>
-   <span class="signature">[`quantile( p, k )`][@stdlib/math/base/dists/chisquare/quantile]</span><span class="delimiter">: </span><span class="description">chi-squared distribution quantile function.</span>

</div>

<!-- </toc> -->

The following functions to calculate distribution properties are part of the namespace:

<!-- <toc pattern="*+(entropy|kurtosis|mean|median|mode|skewness|stdev|variance)*"> -->

<div class="namespace-toc">

-   <span class="signature">[`entropy( k )`][@stdlib/math/base/dists/chisquare/entropy]</span><span class="delimiter">: </span><span class="description">chi-squared distribution differential entropy.</span>
-   <span class="signature">[`kurtosis( k )`][@stdlib/math/base/dists/chisquare/kurtosis]</span><span class="delimiter">: </span><span class="description">chi-squared distribution excess kurtosis.</span>
-   <span class="signature">[`mean( k )`][@stdlib/math/base/dists/chisquare/mean]</span><span class="delimiter">: </span><span class="description">chi-squared distribution expected value.</span>
-   <span class="signature">[`mode( k )`][@stdlib/math/base/dists/chisquare/mode]</span><span class="delimiter">: </span><span class="description">chi-squared distribution mode.</span>
-   <span class="signature">[`skewness( k )`][@stdlib/math/base/dists/chisquare/skewness]</span><span class="delimiter">: </span><span class="description">chi-squared distribution skewness.</span>
-   <span class="signature">[`stdev( k )`][@stdlib/math/base/dists/chisquare/stdev]</span><span class="delimiter">: </span><span class="description">chi-squared distribution standard deviation.</span>
-   <span class="signature">[`variance( k )`][@stdlib/math/base/dists/chisquare/variance]</span><span class="delimiter">: </span><span class="description">chi-squared distribution variance.</span>

</div>

<!-- </toc> -->

The namespace also exposes a constructor function that may be used to create a [Chi-squared][chisquare-distribution] distribution object.

<!-- <toc pattern="*ctor*"> -->

<div class="namespace-toc">

-   <span class="signature">[`ChiSquare( [k] )`][@stdlib/math/base/dists/chisquare/ctor]</span><span class="delimiter">: </span><span class="description">chi-squared distribution constructor.</span>

</div>

<!-- </toc> -->

```javascript
var ChiSquare = require( '@stdlib/math/base/dists/chisquare' ).Chi;

var chisquare = new ChiSquare( 4.0 );

var mu = chisquare.mean;
// returns 4.0
```

</section>

<!-- /.usage -->

<section class="examples">

## Examples

<!-- TODO: better examples -->

<!-- eslint no-undef: "error" -->

```javascript
var getKeys = require( 'object-keys' ).shim();
var chisquare = require( '@stdlib/math/base/dists/chisquare' );

console.log( getKeys( chisquare ) );
```

</section>

<!-- /.examples -->

<section class="links">

[chisquare-distribution]: https://en.wikipedia.org/wiki/Chi-squared_distribution

<!-- <toc-links> -->

[@stdlib/math/base/dists/chisquare/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/ctor

[@stdlib/math/base/dists/chisquare/entropy]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/entropy

[@stdlib/math/base/dists/chisquare/kurtosis]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/kurtosis

[@stdlib/math/base/dists/chisquare/mean]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/mean

[@stdlib/math/base/dists/chisquare/mode]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/mode

[@stdlib/math/base/dists/chisquare/skewness]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/skewness

[@stdlib/math/base/dists/chisquare/stdev]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/stdev

[@stdlib/math/base/dists/chisquare/variance]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/variance

[@stdlib/math/base/dists/chisquare/cdf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/cdf

[@stdlib/math/base/dists/chisquare/logpdf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/logpdf

[@stdlib/math/base/dists/chisquare/mgf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/mgf

[@stdlib/math/base/dists/chisquare/pdf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/pdf

[@stdlib/math/base/dists/chisquare/quantile]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/dists/chisquare/quantile

<!-- </toc-links> -->

</section>

<!-- /.links -->
{'fraction_non_alphanumeric': 0.18048601782879473, 'fraction_numerical': 0.006105751618024179, 'mean_word_length': 5.022058823529412, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 129, 'https://': 14, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1790146', 'n_tokens_mistral': 2839, 'n_tokens_neox': 2628, 'n_words': 522}