ChiSquaredDistribution extends AbstractRealDistribution { public double getDegreesOfFreedom() { return gamma.getShape() * 2.0; } ChiSquaredDistribution(double degreesOfFreedom);  ChiSquaredDistribution(double degreesOfFreedom,
                                  double inverseCumAccuracy);  ChiSquaredDistribution(RandomGenerator rng, double degreesOfFreedom);  ChiSquaredDistribution(RandomGenerator rng,
                                  double degreesOfFreedom,
                                  double inverseCumAccuracy); double getDegreesOfFreedom(); double density(double x); @Override double logDensity(double x); double cumulativeProbability(double x); double getNumericalMean(); double getNumericalVariance(); double getSupportLowerBound(); double getSupportUpperBound(); boolean isSupportLowerBoundInclusive(); boolean isSupportUpperBoundInclusive(); boolean isSupportConnected(); static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY; }
@Test public void testDfAccessors() { ChiSquaredDistribution distribution = (ChiSquaredDistribution) getDistribution(); Assert.assertEquals(5d, distribution.getDegreesOfFreedom(), Double.MIN_VALUE); }