Package org.hipparchus.stat.interval
Class ConfidenceInterval
java.lang.Object
org.hipparchus.stat.interval.ConfidenceInterval
Represents an interval estimate of a population parameter.
-
Constructor Summary
ConstructorDescriptionConfidenceInterval
(double lowerBound, double upperBound, double confidenceLevel) Create a confidence interval with the given bounds and confidence level. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get asserted probability that the interval contains the population parameter.double
Get lower endpoint of the interval.double
Get upper endpoint of the interval.toString()
Get String representation of the confidence interval.
-
Constructor Details
-
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 thanupper
confidenceLevel
must be strictly between 0 and 1 (exclusive)
- Parameters:
lowerBound
- lower endpoint of the intervalupperBound
- upper endpoint of the intervalconfidenceLevel
- coverage probability- Throws:
MathIllegalArgumentException
- if the preconditions are not met
-
-
Method Details
-
getLowerBound
public double getLowerBound()Get lower endpoint of the interval.- Returns:
- the lower endpoint of the interval
-
getUpperBound
public double getUpperBound()Get upper endpoint of the interval.- Returns:
- the upper endpoint of the interval
-
getConfidenceLevel
public double getConfidenceLevel()Get asserted probability that the interval contains the population parameter.- Returns:
- the asserted probability that the interval contains the population parameter
-
toString
Get String representation of the confidence interval.
-