/** * Calculates [Yule's Y]{@link https://en.wikipedia.org/wiki/Coefficient_of_colligation} for the joint probabilities of * two binary variables: * * $$Y(p_{00}, p_{01}, p_{10}, p_{11}) = \frac{\sqrt{p_{00} p_{11}} - \sqrt{p_{01} p_{10}}}{\sqrt{p_{00} p_{11}} + \sqrt{p_{01} p_{10}}}.$$ * * @method yuleY * @memberof ran.dependence * @param {number} p00 The probability of X = 0 and Y = 0. * @param {number} p01 The probability of X = 0 and Y = 1. * @param {number} p10 The probability of X = 1 and Y = 0. * @param {number} p11 The probability of X = 1 and Y = 1. * @returns {number} Yule's Y, or NaN when p01 or p10 is zero (the odds ratio diverges, making the formula * indeterminate). * @example * * ran.dependence.yuleY(0.3, 0, 0.3, 0.4) * // => NaN * * ran.dependence.yuleY(0.3, 0.3, 0, 0.4) * // => NaN * * ran.dependence.yuleY(0.1, 0.2, 0.3, 0.4) * // => -0.10102051443364372 */ export default function (p00: number, p01: number, p10: number, p11: number): number;