/** * Calculates the [point-biserial correlation coefficient]{@link https://en.wikipedia.org/wiki/Point-biserial_correlation_coefficient} * for paired arrays of values. * * @method pointBiserial * @memberof ran.dependence * @param {number[]} x First array of values. * @param {number[]} y Second array of values. Must contain 0s and 1s only. * @throws {Error} If the arrays have different lengths. * @returns {number} The point-biserial correlation coefficient, or NaN if arrays have fewer than 2 elements or * zero variance. * @example * * ran.dependence.pointBiserial([], []) * // => NaN * * ran.dependence.pointBiserial([2, 2, 2], [0, 0, 1]) * // => NaN * * ran.dependence.pointBiserial([1, 2, 3], [4, 5, 6]) * // => 0.8660254037844386 */ export default function (x: number[], y: number[]): number;