How to use the jstat.chisquare function in jstat

To help you get started, we’ve selected a few jstat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhilu-nanjing / financial-cell / test / mycode / myfunc.js View on Github external
export function CHISQDISTRT(x, k) {
    if (!x || !k) {
        return errorObj.ERROR_NA;
    }

    if (x < 1 || k > Math.pow(10, 10)) {
        return errorObj.ERROR_NUM;
    }

    if ((typeof x !== 'number') || (typeof k !== 'number')) {
        return errorObj.ERROR_VALUE;
    }

    return 1 -  jStat.chisquare.cdf(x, k);
};
github zhilu-nanjing / financial-cell / src / calc / expression_fn / lib / statistical.js View on Github external
export  function CHISQ__INV(probability, k) {
  probability = parseNumber(probability);
  k = parseNumber(k);
  return jStat.chisquare.inv(probability, k);
};