public class RunningWeightedStatistics extends UnivariateStatistics
Modifier and Type | Field and Description |
---|---|
protected int |
ASYMPTOTIC_POPULATION
population beyond which we should use the asymptotic weight
|
protected double |
ASYMPTOTIC_WEIGHT
weight for new samples
|
_mean, _meanSquare, _population
Constructor and Description |
---|
RunningWeightedStatistics(double weight)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSample(double value)
Add a new sample measurement.
|
void |
clear()
Clear the samples
|
protected double |
getWeight()
Get the current weight.
|
protected double |
getWeight(double population)
Get the weight to apply to the next new sample given the specified population.
|
double |
sampleVarianceOfMean()
Get the variance of the mean from the actual value assuming the supporting data is a random subset of all the data.
|
double |
varianceOfMean()
Get the variance of the mean from the actual value.
|
mean, meanSquare, population, sampleStandardDeviation, sampleStandardDeviationOfMean, sampleVariance, standardDeviation, standardDeviationOfMean, variance
protected final double ASYMPTOTIC_WEIGHT
protected final int ASYMPTOTIC_POPULATION
public RunningWeightedStatistics(double weight)
weight
- asymptotic weight to apply to new samples in large populationspublic void clear()
protected final double getWeight()
protected final double getWeight(double population)
public void addSample(double value)
value
- The new sample measurementpublic double varianceOfMean()
varianceOfMean
in class UnivariateStatistics
public double sampleVarianceOfMean()
sampleVarianceOfMean
in class UnivariateStatistics