Package ffx.numerics.math
Class BootStrapStatistics
java.lang.Object
ffx.numerics.math.BootStrapStatistics
The BootStrapStatistics class uses bootstrapping to estimate statistics from a
given population.
- Since:
- 1.0
- Author:
- Michael J. Schnieders, Rose Gogal
-
Field Summary
Modifier and TypeFieldDescriptionfinal long
The number of entries.final long
The number of degrees of freedom.final double
The maximum value.final double
The mean value.final double
The minimum value.final double
The standard deviation.final double
The population standard deviation.final double
The sum of all values.final double
The sum of all weights.final double
The variance.final double
The population variance. -
Constructor Summary
ConstructorDescriptionBootStrapStatistics
(double[] values) Constructs a static summary of a statistic from provided values.BootStrapStatistics
(double[] values, double[] weights, int first, int last, int stride) Constructs a static summary of a statistic from provided values.BootStrapStatistics
(double[] values, int first) Constructs a static summary of a statistic from provided values.BootStrapStatistics
(double[] values, int first, int last) Constructs a static summary of a statistic from provided values.BootStrapStatistics
(double[] values, int first, int last, int stride) Constructs a static summary of a statistic from provided values. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Computes a 95% confidence interval based on a Student's T-distribution.double
confidenceInterval
(double alpha) Computes a confidence interval based on a Student's T-distribution.describe()
Describe the Summary Statistics.double
getMean()
The mean.double
getSd()
The standard deviation.double
getVar()
The variance.toString()
$
-
Field Details
-
mean
public final double meanThe mean value. -
var
public final double varThe variance. -
varPopulation
public final double varPopulationThe population variance. -
sd
public final double sdThe standard deviation. -
sdPopulation
public final double sdPopulationThe population standard deviation. -
sumWeights
public final double sumWeightsThe sum of all weights. -
min
public final double minThe minimum value. -
max
public final double maxThe maximum value. -
count
public final long countThe number of entries. -
sum
public final double sumThe sum of all values. -
dof
public final long dofThe number of degrees of freedom.
-
-
Constructor Details
-
BootStrapStatistics
public BootStrapStatistics(double[] values) Constructs a static summary of a statistic from provided values. Assumes weights are all constant (1.0). Assumes all values will be used.- Parameters:
values
- Values to summarize.
-
BootStrapStatistics
public BootStrapStatistics(double[] values, int first) Constructs a static summary of a statistic from provided values. Assumes weights are all constant (1.0). Assumes all values from first to end will be used.- Parameters:
values
- Values to summarize.first
- First value to use.
-
BootStrapStatistics
public BootStrapStatistics(double[] values, int first, int last) Constructs a static summary of a statistic from provided values. Assumes weights are all constant (1.0). Assumes a stride of 1.- Parameters:
values
- Values to summarize.first
- First value to use.last
- Last value to use.
-
BootStrapStatistics
public BootStrapStatistics(double[] values, int first, int last, int stride) Constructs a static summary of a statistic from provided values. Assumes weights are all constant (1.0).- Parameters:
values
- Values to summarize.first
- First value to use.last
- Last value to use.stride
- Stride between values used.
-
BootStrapStatistics
public BootStrapStatistics(double[] values, @Nullable double[] weights, int first, int last, int stride) Constructs a static summary of a statistic from provided values.- Parameters:
values
- Values to summarize.weights
- Weights for each value.first
- First value to use.last
- Last value to use.stride
- Stride between values used.
-
-
Method Details
-
confidenceInterval
public double confidenceInterval()Computes a 95% confidence interval based on a Student's T-distribution.- Returns:
- 95% confidence interval.
-
confidenceInterval
public double confidenceInterval(double alpha) Computes a confidence interval based on a Student's T-distribution.- Parameters:
alpha
- Alpha (e.g. 0.05 for a 95% CI).- Returns:
- Confidence interval.
-
getMean
public double getMean()The mean.- Returns:
- Return the mean.
-
getSd
public double getSd()The standard deviation.- Returns:
- Return the standard deviation.
-
getVar
public double getVar()The variance.- Returns:
- Return the variance.
-
toString
$ -
describe
Describe the Summary Statistics.- Returns:
- Return the description.
-