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 on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Student's T
Student's t distribution.
Installation
npm install @stdlib/stats-base-dists-t
Usage
var t = require( '@stdlib/stats-base-dists-t' );
t
Student's t distribution.
var dist = t;
The namespace contains the following distribution functions:
cdf( x, v )
: Student's t distribution cumulative distribution function (CDF).logcdf( x, v )
: evaluate the natural logarithm of the cumulative distribution function (CDF) for a Student's t distribution.logpdf( x, v )
: evaluate the natural logarithm of the probability density function (PDF) for a Student's t distribution.pdf( x, v )
: Student's t distribution probability density function (PDF).quantile( p, v )
: Student's t distribution quantile function.
The namespace contains the following functions for calculating distribution properties:
The namespace contains a constructor function for creating a Student's t distribution object.
T( [v] )
: Student's t distribution constructor.
var T = require( '@stdlib/stats-base-dists-t' ).T;
var dist = new T( 2.0 );
var y = dist.cdf( 0.5 );
Examples
var t = require( '@stdlib/stats-base-dists-t' );
var dof = 3;
var x = 1.5;
var res = t.pdf( x, dof );
console.log( 'PDF at x = ' + x + ': ' + res );
res = t.cdf( x, dof );
console.log( 'CDF at x = ' + x + ': ' + res );
var mu = t.mean( dof );
var v = t.variance( dof );
console.log( 'Mean: ' + mu + ', Variance: ' + v );
Notice
This package is part of stdlib, 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 develop stdlib, see the main project repository.
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.
0.2.2 (2024-07-29)
<section class="packages">
Packages
</section>
<!-- /.packages -->
<section class="contributors">
Contributors
A total of 2 people contributed to this release. Thank you to the following contributors:
- Jaimin Godhani
- Philipp Burckhardt
</section>
<!-- /.contributors -->
<section class="commits">
Commits
<details>
41d41e9
- test: include trailing newlines in Julia-generated JSON fixtures (by Philipp Burckhardt)9ed7d0e
- chore: add missing trailing newlines (by Philipp Burckhardt)26d6bde
- docs: improve README examples for stats/base/dists/t
namespace (#1728) (by Jaimin Godhani)
</details>
</section>
<!-- /.commits -->
</section>
<!-- /.release -->
<section class="release" id="v0.2.1">