Class 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 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.