Skip to content

Commit e1641aa

Browse files
committed
Auto-generated commit
1 parent 8ff6e74 commit e1641aa

File tree

4 files changed

+91
-10
lines changed

4 files changed

+91
-10
lines changed

CHANGELOG.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,36 @@
44

55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-11-11)
7+
## Unreleased (2024-11-17)
88

99
<section class="packages">
1010

1111
### Packages
1212

13+
<section class="package" id="stats-base-dists-chisquare-unreleased">
14+
15+
#### [@stdlib/stats/base/dists/chisquare](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists/chisquare)
16+
17+
<details>
18+
19+
<section class="issues">
20+
21+
##### Closed Issues
22+
23+
This release closes the following issue:
24+
25+
[#1619](https://github.com/stdlib-js/stdlib/issues/1619)
26+
27+
</section>
28+
29+
<!-- /.issues -->
30+
31+
</details>
32+
33+
</section>
34+
35+
<!-- /.package -->
36+
1337
<section class="package" id="stats-base-dists-kumaraswamy-unreleased">
1438

1539
#### [@stdlib/stats/base/dists/kumaraswamy](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/base/dists/kumaraswamy)
@@ -66,9 +90,9 @@ This release closes the following issue:
6690

6791
### Closed Issues
6892

69-
A total of 2 issues were closed in this release:
93+
A total of 3 issues were closed in this release:
7094

71-
[#1632](https://github.com/stdlib-js/stdlib/issues/1632), [#1633](https://github.com/stdlib-js/stdlib/issues/1633)
95+
[#1619](https://github.com/stdlib-js/stdlib/issues/1619), [#1632](https://github.com/stdlib-js/stdlib/issues/1632), [#1633](https://github.com/stdlib-js/stdlib/issues/1633)
7296

7397
</section>
7498

@@ -78,10 +102,11 @@ A total of 2 issues were closed in this release:
78102

79103
### Contributors
80104

81-
A total of 3 people contributed to this release. Thank you to the following contributors:
105+
A total of 4 people contributed to this release. Thank you to the following contributors:
82106

107+
- Kohantika Nath
83108
- Philipp Burckhardt
84-
- Pratyush
109+
- Pratyush Kumar Chouhan
85110
- Ruthwik Chikoti
86111

87112
</section>
@@ -94,8 +119,9 @@ A total of 3 people contributed to this release. Thank you to the following cont
94119

95120
<details>
96121

122+
- [`28bdda3`](https://github.com/stdlib-js/stdlib/commit/28bdda3affa89470bbdf531cb3bbc233c85d3d17) - **docs:** improve examples of `stats/base/dists/chisquare` namespace [(#2678)](https://github.com/stdlib-js/stdlib/pull/2678) _(by Kohantika Nath, Philipp Burckhardt)_
97123
- [`4e1c68b`](https://github.com/stdlib-js/stdlib/commit/4e1c68b10906fea989b1a785405eb17d68553461) - **docs:** improve examples of `stats/base/dists/kumaraswamy` [(#2605)](https://github.com/stdlib-js/stdlib/pull/2605) _(by Ruthwik Chikoti, Philipp Burckhardt)_
98-
- [`19c8688`](https://github.com/stdlib-js/stdlib/commit/19c868816d201337c4cb77683c2ff0a306b81e95) - **docs:** improve README examples of `stats/base/dists/laplace` namespace [(#1875)](https://github.com/stdlib-js/stdlib/pull/1875) _(by Pratyush, Philipp Burckhardt)_
124+
- [`19c8688`](https://github.com/stdlib-js/stdlib/commit/19c868816d201337c4cb77683c2ff0a306b81e95) - **docs:** improve README examples of `stats/base/dists/laplace` namespace [(#1875)](https://github.com/stdlib-js/stdlib/pull/1875) _(by Pratyush Kumar Chouhan, Philipp Burckhardt)_
99125

100126
</details>
101127

CONTRIBUTORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Mohammad Kaif <[email protected]>
5959
Momtchil Momtchev <[email protected]>
6060
Muhammad Haris <[email protected]>
6161
Naresh Jagadeesan <[email protected]>
62+
Neeraj Pathak <[email protected]>
6263
NightKnight <[email protected]>
6364
Nithin Katta <[email protected]>
6465
Nourhan Hasan <[email protected]>
@@ -69,6 +70,7 @@ Prajwal Kulkarni <[email protected]>
6970
Pranav Goswami <[email protected]>
7071
7172
73+
Pratyush Kumar Chouhan <[email protected]>
7274
7375
Pushpendra Chandravanshi <[email protected]>
7476
@@ -79,6 +81,7 @@ Ridam Garg <[email protected]>
7981
Robert Gislason <[email protected]>
8082
Roman Stetsyk <[email protected]>
8183
84+
Ruthwik Chikoti <[email protected]>
8285
Ryan Seal <[email protected]>
8386
Sai Srikar Dumpeti <[email protected]>
8487
SarthakPaandey <[email protected]>

base/dists/chisquare/README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,36 @@ var mu = dist.mean;
108108
<!-- eslint no-undef: "error" -->
109109

110110
```javascript
111-
var objectKeys = require( '@stdlib/utils/keys' );
111+
var roundn = require( '@stdlib/math/base/special/roundn' );
112112
var chisquare = require( '@stdlib/stats/base/dists/chisquare' );
113113

114-
console.log( objectKeys( chisquare ) );
114+
// Define degrees of freedom:
115+
var k = 5.0;
116+
117+
// Calculate distribution properties:
118+
console.log( 'Mean: %d', chisquare.mean( k ) );
119+
console.log( 'Median: %d', roundn( chisquare.median( k ), -4 ) );
120+
console.log( 'Mode: %d', chisquare.mode( k ) );
121+
console.log( 'Variance: %d', chisquare.variance( k ) );
122+
console.log( 'Standard Deviation: %d', roundn( chisquare.stdev( k ), -4 ) );
123+
console.log( 'Skewness: %d', roundn( chisquare.skewness( k ), -4 ) );
124+
console.log( 'Excess Kurtosis: %d', roundn( chisquare.kurtosis( k ), -4 ) );
125+
console.log( 'Entropy: %d', roundn( chisquare.entropy( k ), -4 ) );
126+
127+
// Evaluate probability functions:
128+
var x = 3.0;
129+
console.log( '\nEvaluating at x = %d', x );
130+
console.log( 'PDF: %d', roundn( chisquare.pdf( x, k ), -4 ) );
131+
console.log( 'logPDF: %d', roundn( chisquare.logpdf( x, k ), -4 ) );
132+
console.log( 'CDF: %d', roundn( chisquare.cdf( x, k ), -4 ) );
133+
134+
// Calculate quantiles:
135+
var p = 0.7;
136+
console.log( '\nQuantile at p = %d: %d', p, roundn( chisquare.quantile( p, k ), -4 ) );
137+
138+
// Evaluate moment-generating function:
139+
var t = 0.1;
140+
console.log( 'MGF at t = %d: %d', t, roundn( chisquare.mgf( t, k ), -4 ) );
115141
```
116142

117143
</section>

base/dists/chisquare/examples/index.js

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,33 @@
1818

1919
'use strict';
2020

21-
var objectKeys = require( '@stdlib/utils/keys' );
21+
var roundn = require( '@stdlib/math/base/special/roundn' );
2222
var chisquare = require( './../lib' );
2323

24-
console.log( objectKeys( chisquare ) );
24+
// Define degrees of freedom:
25+
var k = 5.0;
26+
27+
// Calculate distribution properties:
28+
console.log( 'Mean: %d', chisquare.mean( k ) );
29+
console.log( 'Median: %d', roundn( chisquare.median( k ), -4 ) );
30+
console.log( 'Mode: %d', chisquare.mode( k ) );
31+
console.log( 'Variance: %d', chisquare.variance( k ) );
32+
console.log( 'Standard Deviation: %d', roundn( chisquare.stdev( k ), -4 ) );
33+
console.log( 'Skewness: %d', roundn( chisquare.skewness( k ), -4 ) );
34+
console.log( 'Excess Kurtosis: %d', roundn( chisquare.kurtosis( k ), -4 ) );
35+
console.log( 'Entropy: %d', roundn( chisquare.entropy( k ), -4 ) );
36+
37+
// Evaluate probability functions:
38+
var x = 3.0;
39+
console.log( '\nEvaluating at x = %d', x );
40+
console.log( 'PDF: %d', roundn( chisquare.pdf( x, k ), -4 ) );
41+
console.log( 'logPDF: %d', roundn( chisquare.logpdf( x, k ), -4 ) );
42+
console.log( 'CDF: %d', roundn( chisquare.cdf( x, k ), -4 ) );
43+
44+
// Calculate quantiles:
45+
var p = 0.7;
46+
console.log( '\nQuantile at p = %d: %d', p, roundn( chisquare.quantile( p, k ), -4 ) );
47+
48+
// Evaluate moment-generating function:
49+
var t = 0.1;
50+
console.log( 'MGF at t = %d: %d', t, roundn( chisquare.mgf( t, k ), -4 ) );

0 commit comments

Comments
 (0)