public class ConfidenceInterval
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private double |
confidenceLevel
The asserted probability that the interval contains the population
parameter
|
private double |
lowerBound
Lower endpoint of the interval
|
private double |
upperBound
Upper endpoint of the interval
|
| Constructor and Description |
|---|
ConfidenceInterval(double lowerBound,
double upperBound,
double confidenceLevel)
Create a confidence interval with the given bounds and confidence level.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
checkParameters(double lower,
double upper,
double confidence)
Verifies that (lower, upper) is a valid non-empty interval and confidence
is strictly between 0 and 1.
|
double |
getConfidenceLevel() |
double |
getLowerBound() |
double |
getUpperBound() |
java.lang.String |
toString() |
private double lowerBound
private double upperBound
private double confidenceLevel
public ConfidenceInterval(double lowerBound,
double upperBound,
double confidenceLevel)
Preconditions:
lower must be strictly less than upperconfidenceLevel must be strictly between 0 and 1 (exclusive)lowerBound - lower endpoint of the intervalupperBound - upper endpoint of the intervalconfidenceLevel - coverage probabilityMathIllegalArgumentException - if the preconditions are not metpublic double getLowerBound()
public double getUpperBound()
public double getConfidenceLevel()
public java.lang.String toString()
toString in class java.lang.Objectprivate void checkParameters(double lower,
double upper,
double confidence)
lower - lower endpointupper - upper endpointconfidence - confidence levelCopyright (c) 2003-2015 Apache Software Foundation