ConfidenceInterval (Apache Commons Math 3.3 API)

org.apache.commons.math3.stat.interval

## Class ConfidenceInterval

- java.lang.Object
- - org.apache.commons.math3.stat.interval.ConfidenceInterval

-     public class ConfidenceInterval
      extends Object

  Represents an interval estimate of a population parameter.
  Since:
    3.3
  Version:
    $Id: ConfidenceInterval.java 1560531 2014-01-22 22:00:37Z tn $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfidenceInterval(double lowerBound, double upperBound, double confidenceLevel)` Create a confidence interval with the given bounds and confidence level.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getConfidenceLevel()`
    `double` | `getLowerBound()`
    `double` | `getUpperBound()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfidenceInterval

          public ConfidenceInterval(double lowerBound,
                            double upperBound,
                            double confidenceLevel)

      Create a confidence interval with the given bounds and confidence level.

      Preconditions:

      - `lower` must be strictly less than `upper`
      - `confidenceLevel` must be strictly between 0 and 1 (exclusive)
      Parameters:
        `lowerBound` - lower endpoint of the interval
        `upperBound` - upper endpoint of the interval
        `confidenceLevel` - coverage probability
      Throws:
        `MathIllegalArgumentException` - if the preconditions are not met

  - ### Method Detail

    - #### getLowerBound

          public double getLowerBound()

      Returns:
        the lower endpoint of the interval

    - #### getUpperBound

          public double getUpperBound()

      Returns:
        the upper endpoint of the interval

    - #### getConfidenceLevel

          public double getConfidenceLevel()

      Returns:
        the asserted probability that the interval contains the population parameter

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`
      Returns:
        String representation of the confidence interval

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.