one-data-set.js 409 B

1234567891011121314151617181920
  1. 'use strict';
  2. const Distribution = require('distributions').Studentt;
  3. const AbstactStudentT = require('./abstact.js');
  4. class StudentT extends AbstactStudentT {
  5. constructor(data, options) {
  6. super(options);
  7. this._df = data.size - 1;
  8. this._dist = new Distribution(this._df);
  9. this._se = Math.sqrt(data.variance / data.size);
  10. this._mean = data.mean;
  11. }
  12. }
  13. module.exports = StudentT;