@SuppressWarnings("unchecked") @Override public CumulativeDistributionFunction<Number> getCDF() { return (CumulativeDistributionFunction<Number>) this.getDistribution().getCDF(); }
/** * Computes the Gaussian confidence interval given a distribution of * data, number of samples, and corresponding confidence interval * @param dataDistribution * UnivariateGaussian describing the distribution of the underlying data * @param numSamples * Number of samples in the underlying data * @param confidence * Confidence value to assume for the ConfidenceInterval * @return * ConfidenceInterval capturing the range of the mean of the data * at the desired level of confidence */ public static ConfidenceInterval computeConfidenceInterval( UnivariateDistribution<?> dataDistribution, int numSamples, double confidence ) { return INSTANCE.computeConfidenceInterval( dataDistribution.getMean().doubleValue(), dataDistribution.getVariance(), numSamples, confidence ); }
@Override public double getMeanAsDouble() { return this.getDistribution().getMeanAsDouble(); }
@Override public Number sample( final Random random) { return this.getDistribution().sample(random); }
@Override public Number getMean() { return this.getDistribution().getMean(); }
@Override public double getVariance() { return this.getDistribution().getVariance(); }
@Override public void sampleInto( final Random random, final int sampleCount, final Collection<? super Number> output) { this.getDistribution().sampleInto(random, sampleCount, output); }
@Override public Number sample( final Random random) { return this.getDistribution().sample(random); }
@Override public Number getMean() { return this.getDistribution().getMean(); }
@Override public double getVariance() { return this.getDistribution().getVariance(); }
@Override public void sampleInto( final Random random, final int sampleCount, final Collection<? super Number> output) { this.getDistribution().sampleInto(random, sampleCount, output); }
/** * Computes the Gaussian confidence interval given a distribution of * data, number of samples, and corresponding confidence interval * @param dataDistribution * UnivariateGaussian describing the distribution of the underlying data * @param numSamples * Number of samples in the underlying data * @param confidence * Confidence value to assume for the ConfidenceInterval * @return * ConfidenceInterval capturing the range of the mean of the data * at the desired level of confidence */ public static ConfidenceInterval computeConfidenceInterval( UnivariateDistribution<?> dataDistribution, int numSamples, double confidence ) { return INSTANCE.computeConfidenceInterval( dataDistribution.getMean().doubleValue(), dataDistribution.getVariance(), numSamples, confidence ); }
@SuppressWarnings("unchecked") @Override public CumulativeDistributionFunction<Number> getCDF() { return (CumulativeDistributionFunction<Number>) this.getDistribution().getCDF(); }
@Override public Number sample( final Random random) { return this.getDistribution().sample(random); }
@Override public double getMeanAsDouble() { return this.getDistribution().getMeanAsDouble(); }
@Override public Number getMean() { return this.getDistribution().getMean(); }
@Override public double getVariance() { return this.getDistribution().getVariance(); }
@Override public void sampleInto( final Random random, final int sampleCount, final Collection<? super Number> output) { this.getDistribution().sampleInto(random, sampleCount, output); }
/** * Computes the Gaussian confidence interval given a distribution of * data, number of samples, and corresponding confidence interval * @param dataDistribution * UnivariateGaussian describing the distribution of the underlying data * @param numSamples * Number of samples in the underlying data * @param confidence * Confidence value to assume for the ConfidenceInterval * @return * ConfidenceInterval capturing the range of the mean of the data * at the desired level of confidence */ public static ConfidenceInterval computeConfidenceInterval( UnivariateDistribution<?> dataDistribution, int numSamples, double confidence ) { return INSTANCE.computeConfidenceInterval( dataDistribution.getMean().doubleValue(), dataDistribution.getVariance(), numSamples, confidence ); }
@SuppressWarnings("unchecked") @Override public CumulativeDistributionFunction<Number> getCDF() { return (CumulativeDistributionFunction<Number>) this.getDistribution().getCDF(); }