Skip to content

Commit

Permalink
docs: improve README examples of stats/base/dists/chi namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivamAhir committed Mar 9, 2024
1 parent d48f616 commit cba3c7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/node_modules/@stdlib/stats/base/dists/chi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ var objectKeys = require( '@stdlib/utils/keys' );
var chi = require( '@stdlib/stats/base/dists/chi' );

console.log( objectKeys( chi ) );

console.log(chi.variance( 9.0 ));
// => ~0.485

console.log(chi.variance( 0.5 ));
// => ~0.272

console.log(chi.variance( -1.0 ));
// => NaN

```

</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ var objectKeys = require( '@stdlib/utils/keys' );
var chi = require( './../lib' );

console.log( objectKeys( chi ) );

console.log(chi.variance( 9.0 ));
// => ~0.485

console.log(chi.variance( 0.5 ));
// => ~0.272

console.log(chi.variance( -1.0 ));
// => NaN

0 comments on commit cba3c7b

Please sign in to comment.