Class ConfidenceInterval
java.lang.Object
de.uka.ipd.sdq.statistics.estimation.ConfidenceInterval
Represents a confidence interval. Whether one confidence interval contains another can be checked
by using the
contains(ConfidenceInterval)
method.-
Constructor Summary
ConstructorDescriptionConfidenceInterval
(double mean, double halfWidth, double level) Constructs a confidence interval around the specified mean having width (2 * mean * halfWidth).ConfidenceInterval
(double mean, double lowerBound, double upperBound, double level) Constructs a confidence interval around the specified mean, having bounds lowerBound and upperBound. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks, whether the specified confidence interval lies within the bounds of this confidence interval.double
getLevel()
double
double
getMean()
double
void
setLowerBound
(double lowerBound) void
setMean
(double mean) void
setUpperBound
(double upperBound)
-
Constructor Details
-
ConfidenceInterval
public ConfidenceInterval(double mean, double lowerBound, double upperBound, double level) Constructs a confidence interval around the specified mean, having bounds lowerBound and upperBound.- Parameters:
mean
- the center of the confidence intervallowerBound
- the confidence interval's lower boundupperBound
- the confidence interval's upper boundlevel
- the confidence level. Use values between 0 and 1. For instance use 0.95 to estimate the 95% confidence interval.noOfObservations
- the number of observations this confidence interval is constructed from
-
ConfidenceInterval
public ConfidenceInterval(double mean, double halfWidth, double level) Constructs a confidence interval around the specified mean having width (2 * mean * halfWidth).- Parameters:
mean
- the center of the confidence intervalhalfWidth
- the relative half-width. Use values between 0 and 1. For instance use 0.1 in order to specify a 10% half-width.
-
-
Method Details
-
getLowerBound
public double getLowerBound() -
setLowerBound
public void setLowerBound(double lowerBound) -
getUpperBound
public double getUpperBound() -
setUpperBound
public void setUpperBound(double upperBound) -
getMean
public double getMean() -
setMean
public void setMean(double mean) -
getLevel
public double getLevel() -
contains
Checks, whether the specified confidence interval lies within the bounds of this confidence interval.- Parameters:
ci
- the confidence interval- Returns:
- true if this confidence interval contains the specified one; false else.
-