Package com.bayesserver.statistics
Class IntervalStatistics
- java.lang.Object
-
- com.bayesserver.statistics.IntervalStatistics
-
public final class IntervalStatistics extends Object
Calculates statistics such as mean and variance for discretized variables, i.e. discrete variables whose state values are intervals.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IntervalStatisticscalculate(double min, double max)Calculates statistics for a single interval.static IntervalStatisticscalculate(Table table)Calculates statistics using table probabilities as weights for each interval.doublegetMean()Gets the mean of the discretized variable.doublegetVariance()Gets the variance of the discretized variable.
-
-
-
Method Detail
-
getMean
public double getMean()
Gets the mean of the discretized variable.
-
getVariance
public double getVariance()
Gets the variance of the discretized variable.
-
calculate
public static IntervalStatistics calculate(Table table)
Calculates statistics using table probabilities as weights for each interval.- Parameters:
table- A table based on a discretized variable.- Returns:
- Statistics such as the mean and variance.
-
calculate
public static IntervalStatistics calculate(double min, double max)
Calculates statistics for a single interval.- Parameters:
min- The interval minimum.max- The interval maximum.- Returns:
- Statistics such as the mean and variance.
-
-