/** * {@inheritDoc} */ public long getN() { return moment.getN(); }
/** * @see org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic#getN() */ public long getN() { return moment.getN(); }
/** * {@inheritDoc} */ public long getN() { return moment.getN(); }
/** * Returns the value of the statistic based on the values that have been added. * <p> * See {@link Skewness} for the definition used in the computation.</p> * * @return the skewness of the available values. */ @Override public double getResult() { if (moment.n < 3) { return Double.NaN; } double variance = moment.m2 / (moment.n - 1); if (variance < 10E-20) { return 0.0d; } else { double n0 = moment.getN(); return (n0 * moment.m3) / ((n0 - 1) * (n0 -2) * Math.sqrt(variance) * variance); } }
/** * Returns the value of the statistic based on the values that have been added. * <p> * See {@link Skewness} for the definition used in the computation.</p> * * @return the skewness of the available values. */ public double getResult() { if (moment.n < 3) { return Double.NaN; } double variance = moment.m2 / (double) (moment.n - 1); if (variance < 10E-20) { return 0.0d; } else { double n0 = (double) moment.getN(); return (n0 * moment.m3) / ((n0 - 1) * (n0 -2) * Math.sqrt(variance) * variance); } }
/** * Returns the value of the statistic based on the values that have been added. * <p> * See {@link Skewness} for the definition used in the computation.</p> * * @return the skewness of the available values. */ @Override public double getResult() { if (moment.n < 3) { return Double.NaN; } double variance = moment.m2 / (moment.n - 1); if (variance < 10E-20) { return 0.0d; } else { double n0 = moment.getN(); return (n0 * moment.m3) / ((n0 - 1) * (n0 -2) * FastMath.sqrt(variance) * variance); } }