/** * PDF function * * @param val Value * @param dof Degrees of freedom * @return Pdf value */ public static double pdf(double val, double dof) { if (val < 0) { return 0.0; } return Math.sqrt(ChiSquaredDistribution.pdf(val, dof)); }
@Override public double nextRandom() { return Math.sqrt(chisq.nextRandom()); }