Enum NormalConfidenceInterval
java.lang.Object
java.lang.Enum<NormalConfidenceInterval>
org.apache.commons.statistics.interval.NormalConfidenceInterval
- All Implemented Interfaces:
Serializable, Comparable<NormalConfidenceInterval>
Generate confidence intervals for a normally distributed population.
- Since:
- 1.2
- See Also:
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract Intervalcreate(double mean, double variance, long n, double alpha) Create a confidence interval from an independent sample from an unknown normally distributed population with the given error rate.fromErrorRate(double mean, double variance, long n, double alpha) Create a confidence interval from an independent sample from an unknown normally distributed population with the given error rate.static NormalConfidenceIntervalReturns the enum constant of this type with the specified name.static NormalConfidenceInterval[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MEAN
Create a confidence interval for the true mean of an unknown normally distributed population. -
VARIANCE
Create a confidence interval for the true variance of an unknown normally distributed population.
-
-
Constructor Details
-
NormalConfidenceInterval
private NormalConfidenceInterval()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromErrorRate
Create a confidence interval from an independent sample from an unknown normally distributed population with the given error rate.The error rate
alphais related to the confidence level that the interval contains the true probability of success asalpha = 1 - confidence, whereconfidenceis the confidence level in[0, 1]. For example a 95% confidence level is analphaof 0.05.The unbiased variance is the sum of the squared deviations from the mean divided by
n - 1.- Parameters:
mean- Sample mean.variance- Unbiased sample variance.n- Sample size.alpha- Desired error rate that the true probability of success falls outside the returned interval.- Returns:
- Confidence interval containing the target with error rate
alpha - Throws:
IllegalArgumentException- ifn <= 1, or ifalphais not in the open interval(0, 1).
-
create
Create a confidence interval from an independent sample from an unknown normally distributed population with the given error rate.- Parameters:
mean- Sample mean.variance- Unbiased sample variance.n- Sample size.alpha- Desired error rate.- Returns:
- Confidence interval
-