/** * Calculates the [Bartlett statistics]{@link https://en.wikipedia.org/wiki/Bartlett%27s_test} for multiple data sets. * * @method bartlett * @memberof ran.test * @param {Array[]} dataSets Array containing the data sets. * @param {number} [alpha = 0.05] Confidence level. * @returns {{stat: number, passed: boolean}} Object containing the test statistics (chi2) and whether the data sets passed the null hypothesis that * their variances are the same. * @throws {Error} If the number of data sets is less than 2. * @throws {Error} If the size of any data set is less than 2 elements. * @example * * let normal1 = new ran.dist.Normal(1, 2) * let normal2 = new ran.dist.Normal(1, 3) * let normal3 = new ran.dist.Normal(1, 5) * * ran.test.bartlett([normal1.sample(100), normal1.sample(100), normal1.sample(100)], 0.1) * // => { stat: 0.09827551592930094, passed: true } * * ran.test.bartlett([normal1.sample(100), normal2.sample(100), normal3.sample(100)], 0.1) * // => { stat: 104.31185521417476, passed: false } */ export default function (dataSets: any[][], alpha?: number): { stat: number; passed: boolean; };