Class OneWayAnova

    • Method Detail

      • withDefaults

        public static OneWayAnova withDefaults()
        Return an instance using the default options.
        Returns:
        default instance
      • statistic

        public double statistic​(Collection<double[]> data)
        Computes the F statistic for an ANOVA test for a collection of category data, evaluating the null hypothesis that there is no difference among the means of the data categories.

        Special cases:

        • If the value in each category is the same (no variance within groups) but different between groups, the f-value is infinity.
        • If the value in every group is the same (no variance within or between groups), the f-value is NaN.
        Parameters:
        data - Category summary data.
        Returns:
        F statistic
        Throws:
        IllegalArgumentException - if the number of categories is less than two; a contained category does not have at least one value; or all categories have only one value (zero degrees of freedom within groups)
      • test

        public OneWayAnova.Result test​(Collection<double[]> data)
        Performs an ANOVA test for a collection of category data, evaluating the null hypothesis that there is no difference among the means of the data categories.

        Special cases:

        • If the value in each category is the same (no variance within groups) but different between groups, the f-value is infinity and the p-value is zero.
        • If the value in every group is the same (no variance within or between groups), the f-value and p-value are NaN.
        Parameters:
        data - Category summary data.
        Returns:
        test result
        Throws:
        IllegalArgumentException - if the number of categories is less than two; a contained category does not have at least one value; or all categories have only one value (zero degrees of freedom within groups)