|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.stat.Summary
Computes basic univariate statistics.
For the data in x
. Summary
computes the sample
mean, variance, minimum, maximum, and ther basic statistics. It also
computes confidence intervals for the mean and variance if the sample is
assumed to be from a normal population.
Missing values, that is, values equal to NaN (not a number), are excluded from the computations. The sum of the weights is used only in computing the mean (of course, then the weighted mean is used in computing the central moments). The definitions of some of the statistics are given below in terms of a single variable x. The i-th datum is , with corresponding weight . If weights are not specified, the are identically one. The summation in each case is over the set of valid observations, based on the presence of missing values in the data.
Number of nonmissing observations,
Mean,
Variance,
Skewness,
Excess or Kurtosis,
Minimum,
Maximum,
Constructor Summary | |
Summary()
Constructs a new summary statistics object. |
Method Summary | |
double[] |
confidenceMean(double p)
Returns the confidence interval for the mean (assuming normality). |
double[] |
confidenceVariance(double p)
Returns the confidence interval for the variance (assuming normality). |
double |
getKurtosis()
Returns the kurtosis. |
double |
getMaximum()
Returns the maximum. |
double |
getMean()
Returns the population mean. |
double |
getMinimum()
Returns the minimum. |
double |
getSampleStandardDeviation()
Returns the sample standard deviation. |
double |
getSampleVariance()
Returns the sample variance. |
double |
getSkewness()
Returns the skewness. |
double |
getStandardDeviation()
Returns the population standard deviation. |
double |
getVariance()
Returns the population variance. |
static double |
kurtosis(double[] x)
Returns the kurtosis of the given data set. |
static double |
kurtosis(double[] x,
double[] weight)
Returns the kurtosis of the given data set and associated weights. |
static double |
maximum(double[] x)
Returns the maximum of the given data set. |
static double |
mean(double[] x)
Returns the mean of the given data set. |
static double |
mean(double[] x,
double[] weight)
Returns the mean of the given data set with associated weights. |
static double |
median(double[] x)
Returns the median of the given data set. |
static double |
minimum(double[] x)
Returns the minimum of the given data set. |
static double |
mode(double[] x)
Returns the mode of the given data set. |
static double |
sampleStandardDeviation(double[] x)
Returns the sample standard deviation of the given data set. |
static double |
sampleStandardDeviation(double[] x,
double[] weight)
Returns the sample standard deviation of the given data set and associated weights. |
static double |
sampleVariance(double[] x)
Returns the sample variance of the given data set. |
static double |
sampleVariance(double[] x,
double[] weight)
Returns the sample variance of the given data set and associated weights. |
static double |
skewness(double[] x)
Returns the skewness of the given data set. |
static double |
skewness(double[] x,
double[] weight)
Returns the skewness of the given data set and associated weights. |
static double |
standardDeviation(double[] x)
Returns the population standard deviation of the given data set. |
static double |
standardDeviation(double[] x,
double[] weight)
Returns the population standard deviation of the given data set and associated weights. |
void |
update(double x)
Adds an observation to the Summary object. |
void |
update(double[] x)
Adds a set of observations to the Summary object. |
void |
update(double[] x,
double[] weight)
Adds a set of observations and associated weights to the Summary object. |
void |
update(double x,
double weight)
Adds an observation and associated weight to the Summary object. |
static double |
variance(double[] x)
Returns the population variance of the given data set. |
static double |
variance(double[] x,
double[] weight)
Returns the population variance of the given data set and associated weights. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Summary()
Method Detail |
public double[] confidenceMean(double p)
p
- a double
, the confidence level desired, usually
0.90, 0.95 or 0.99.
double
array of length 2 which contains
the lower and upper confidence limits for the meanpublic double[] confidenceVariance(double p)
p
- a double
, the confidence level desired, usually
0.90, 0.95 or 0.99.
double
array of length 2 which contains
the lower and upper confidence limits for the variancepublic double getKurtosis()
double
representing the kurtosispublic double getMaximum()
double
representing the maximumpublic double getMean()
double
representing the population meanpublic double getMinimum()
double
representing the minimumpublic double getSampleStandardDeviation()
double
representing the
sample standard deviationpublic double getSampleVariance()
double
representing the sample variancepublic double getSkewness()
double
representing the skewnesspublic double getStandardDeviation()
double
representing the population
standard deviationpublic double getVariance()
double
representing the population variancepublic static double kurtosis(double[] x)
x
- a double
array containing the data set whose
kurtosis is to be found
double
, the kurtosis of the given
data setpublic static double kurtosis(double[] x, double[] weight)
x
- a double
array containing the data set whose
kurtosis is to be foundweight
- a double
array containing the weights associated
with the data points x
double
, the kurtosis of the given
data setpublic static double maximum(double[] x)
x
- a double
array containing the data set whose
maximum is to be found
double
, the maximum of the given data setpublic static double mean(double[] x)
x
- a double
array containing the data set whose
mean is to be found
double
, the mean of the given data setpublic static double mean(double[] x, double[] weight)
x
- a double
array containing the data set whose
mean is to be foundweight
- a double
array containing the weights
associated with the data points x
double
, the mean of the given data setpublic static double median(double[] x)
x
- a double
array containing the data set whose
median is to be found
double
, the median of the given
data setpublic static double minimum(double[] x)
x
- a double
array containing the data set whose
minimum is to be found
double
, the minimum of the given data setpublic static double mode(double[] x)
x
- a double
array containing the data set whose
mode is to be found
double
, the mode of the given
data setpublic static double sampleStandardDeviation(double[] x)
x
- a double
array containing the data set whose
sample standard deviation is to be found
double
, the sample standard deviation of the given
data setpublic static double sampleStandardDeviation(double[] x, double[] weight)
x
- a double
array containing the data set whose
sample standard deviation is to be foundweight
- a double
array containing the weights associated
with the data points x.
double
, the sample standard deviation of the given
data setpublic static double sampleVariance(double[] x)
x
- a double
array containing the data set whose
sample variance is to be found
double
, the sample variance of the given
data setpublic static double sampleVariance(double[] x, double[] weight)
x
- a double
array containing the data set whose
sample variance is to be foundweight
- a double
array containing the weights associated
with the data points x
double
, the sample variance of the given
data setpublic static double skewness(double[] x)
x
- a double
array containing the data set whose
skewness is to be found
double
, the skewness of the given
data setpublic static double skewness(double[] x, double[] weight)
x
- a double
array containing the data set whose
skewness is to be foundweight
- a double
array containing the weights associated
with the data points x
double
, the skewness of the given
data setpublic static double standardDeviation(double[] x)
x
- a double
array containing the data set whose
standard deviation is to be found
double
, the population standard deviation of the given
data setpublic static double standardDeviation(double[] x, double[] weight)
x
- a double
array containing the data set whose
standard deviation is to be foundweight
- a double
array containing the weights associated with
the data points x
double
, the population standard deviation of the given
data setpublic void update(double x)
Summary
object.
x
- a double
, the data observation to be addedpublic void update(double[] x)
Summary
object.
x
- a double
array of data observations to be addedpublic void update(double[] x, double[] weight)
Summary
object.
x
- a double
array of data observations to be addedweight
- a double
array of weights associated with the observationspublic void update(double x, double weight)
Summary
object.
x
- a double
, the data observation to be addedweight
- a double
, the weight associated with the observationpublic static double variance(double[] x)
x
- a double
array containing the data set whose
population variance is to be found
double
, the population variance of the given
data setpublic static double variance(double[] x, double[] weight)
x
- a double
array containing the data set whose
population variance is to be foundweight
- a double
array containing the weights associated
with the data points x
double
, the population variance of the given
data set
|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |