Class StatisticalTest

java.lang.Object
com.singularsys.exttests.StatisticalTest

public class StatisticalTest extends Object
Tests for the statistical package.
  • Field Details

    • meanPfmc

      protected Mean meanPfmc
    • jep

      protected Jep jep
    • field

      protected FieldI field
    • numf

      protected NumberFactory numf
    • stack

      protected final Stack<Object> stack
  • Constructor Details

    • StatisticalTest

      public StatisticalTest()
  • Method Details

    • mean_with_four_argument_is_average

      @Test public void mean_with_four_argument_is_average() throws Exception
      Throws:
      Exception
    • mean_with_no_arguments_fails

      @Test public void mean_with_no_arguments_fails()
    • mean_with_one_arguments_gives_that_value

      @Test public void mean_with_one_arguments_gives_that_value() throws Exception
      Throws:
      Exception
    • mean_with_double_array_arguments

      @Test public void mean_with_double_array_arguments() throws Exception
      Throws:
      Exception
    • min_with_double_array_arguments

      @Test public void min_with_double_array_arguments() throws Exception
      Throws:
      Exception
    • mean_with_object_array_arguments

      @Test public void mean_with_object_array_arguments() throws Exception
      Throws:
      Exception
    • mean_with_Number_array_arguments

      @Test public void mean_with_Number_array_arguments() throws Exception
      Throws:
      Exception
    • mean_with_List_of_doubles_arguments

      @Test public void mean_with_List_of_doubles_arguments() throws Exception
      Throws:
      Exception
    • mean_with_VectorI_argument

      @Test public void mean_with_VectorI_argument() throws Exception
      Throws:
      Exception
    • mean_with_MatrixI_argument

      @Test public void mean_with_MatrixI_argument() throws Exception
      Throws:
      Exception
    • mean_with_mixed_argument_types

      @Test public void mean_with_mixed_argument_types() throws Exception
      Throws:
      Exception
    • count_with_mixed_argument_types

      @Test public void count_with_mixed_argument_types() throws Exception
      Throws:
      Exception
    • median_with_odd_number_of_arguments

      @Test public void median_with_odd_number_of_arguments() throws EvaluationException
      Throws:
      EvaluationException
    • median_with_odd_argument_is_that_value

      @Test public void median_with_odd_argument_is_that_value() throws EvaluationException
      Throws:
      EvaluationException
    • median_with_no_arguments_fails

      @Test public void median_with_no_arguments_fails()
    • median_with_even_number_of_arguments

      @Test public void median_with_even_number_of_arguments() throws EvaluationException
      Throws:
      EvaluationException
    • mode_with_single_mode_returns_that_value

      @Test public void mode_with_single_mode_returns_that_value() throws EvaluationException
      Throws:
      EvaluationException
    • mode_with_bimodal_returns_NaN

      @Test public void mode_with_bimodal_returns_NaN() throws EvaluationException
      Throws:
      EvaluationException
    • mode_with_empty_data_returns_NaN

      @Test public void mode_with_empty_data_returns_NaN() throws EvaluationException
      Throws:
      EvaluationException
    • mode_with_single_item_returns_that_item

      @Test public void mode_with_single_item_returns_that_item() throws EvaluationException
      Throws:
      EvaluationException
    • min_with_four_argument_is_smallest

      @Test public void min_with_four_argument_is_smallest() throws Exception
      Throws:
      Exception
    • min_with_one_argument_is_that_value

      @Test public void min_with_one_argument_is_that_value() throws Exception
      Throws:
      Exception
    • min_with_no_arguments_fails

      @Test public void min_with_no_arguments_fails()
    • max_with_four_argument_is_largest

      @Test public void max_with_four_argument_is_largest() throws Exception
      Throws:
      Exception
    • range_with_four_argument_is_highest_minus_lowest

      @Test public void range_with_four_argument_is_highest_minus_lowest() throws Exception
      Throws:
      Exception
    • sum_with_four_argument_is_sum

      @Test public void sum_with_four_argument_is_sum() throws Exception
      Throws:
      Exception
    • sum_with_no_argument_is_zero

      @Test public void sum_with_no_argument_is_zero() throws Exception
      Throws:
      Exception
    • sum_with_one_argument_is_that_value

      @Test public void sum_with_one_argument_is_that_value() throws Exception
      Throws:
      Exception
    • product_with_four_argument_is_product

      @Test public void product_with_four_argument_is_product() throws Exception
      Throws:
      Exception
    • product_with_one_argument_is_that_value

      @Test public void product_with_one_argument_is_that_value() throws Exception
      Throws:
      Exception
    • product_with_no_arguments_is_one

      @Test public void product_with_no_arguments_is_one() throws Exception
      Throws:
      Exception
    • population_variance_with_ten_arguments

      @Test public void population_variance_with_ten_arguments() throws Exception
      Throws:
      Exception
    • population_variance_with_one_argument_is_zero

      @Test public void population_variance_with_one_argument_is_zero() throws Exception
      Throws:
      Exception
    • population_variance_with_no_arguments_fails

      @Test public void population_variance_with_no_arguments_fails()
    • population_variance_with_zero_length_array_fails

      @Test public void population_variance_with_zero_length_array_fails()
    • population_standard_deviation_with_ten_arguments

      @Test public void population_standard_deviation_with_ten_arguments() throws Exception
      Throws:
      Exception
    • sample_variance_with_ten_arguments

      @Test public void sample_variance_with_ten_arguments() throws Exception
      Throws:
      Exception
    • sample_variance_with_one_arguments_in_NaN

      @Test public void sample_variance_with_one_arguments_in_NaN() throws Exception
      Throws:
      Exception
    • sample_variance_with_no_arguments_fails

      @Test public void sample_variance_with_no_arguments_fails()
    • sample_standard_deviation_with_ten_arguments

      @Test public void sample_standard_deviation_with_ten_arguments() throws Exception
      Throws:
      Exception
    • sample_standard_deviation_with_BigDecimal_arguments

      @Test public void sample_standard_deviation_with_BigDecimal_arguments() throws Exception
      Throws:
      Exception
    • sample_variance_with_BigDecimal_arguments

      @Test public void sample_variance_with_BigDecimal_arguments() throws Exception
      Throws:
      Exception
    • population_standard_deviation_with_BigDecimal_arguments

      @Test public void population_standard_deviation_with_BigDecimal_arguments() throws Exception
      Throws:
      Exception
    • population_variance_with_BigDecimal_arguments

      @Test public void population_variance_with_BigDecimal_arguments() throws Exception
      Throws:
      Exception
    • competition_rank_gives_tied_elements_the_lowest_value

      @Test public void competition_rank_gives_tied_elements_the_lowest_value() throws Exception
      Fractional ranking, mean of ordinal ranks of tied elements 4,2.5,2.5,1
      Throws:
      Exception
    • competition_rank_with_missing_item_argument_is_minusone

      @Test public void competition_rank_with_missing_item_argument_is_minusone() throws Exception
      Throws:
      Exception
    • competition_rank_with_one_argument_is_one

      @Test public void competition_rank_with_one_argument_is_one() throws Exception
      Throws:
      Exception
    • competition_rank_with_no_arguments_is_minusone

      @Test public void competition_rank_with_no_arguments_is_minusone() throws Exception
      Throws:
      Exception
    • dense_rank_gives_lowest_possible_non_clashing_values

      @Test public void dense_rank_gives_lowest_possible_non_clashing_values() throws Exception
      Throws:
      Exception
    • ordinal_rank_cannot_be_calculated

      @Disabled("Ordinal rank cannot be calculate with just the value of the item") @Test public void ordinal_rank_cannot_be_calculated() throws Exception
      Throws:
      Exception
    • increasing_competition_rank

      @Test public void increasing_competition_rank() throws Exception
      Throws:
      Exception
    • increasing_dense_rank

      @Test public void increasing_dense_rank() throws Exception
      Throws:
      Exception
    • increasing_fractional_rank

      @Test public void increasing_fractional_rank() throws Exception
      Throws:
      Exception
    • ordinal_ranks_gives_each_elements_unique_value

      @Test public void ordinal_ranks_gives_each_elements_unique_value() throws Exception
      Throws:
      Exception
    • increasing_competition_ranks_gives_compact_indices

      @Test public void increasing_competition_ranks_gives_compact_indices() throws Exception
      Throws:
      Exception
    • increasing_dense_ranks_gives_compact_indices

      @Test public void increasing_dense_ranks_gives_compact_indices() throws Exception
      Throws:
      Exception
    • increasing_fraction_ranks_gives_indices_average_of_sorted_positions

      @Test public void increasing_fraction_ranks_gives_indices_average_of_sorted_positions() throws Exception
      Throws:
      Exception
    • increasing_ordinal_ranks_gives_tied_entries_unique_indices

      @Test public void increasing_ordinal_ranks_gives_tied_entries_unique_indices() throws Exception
      Throws:
      Exception
    • competition_ranks_gives_tied_entries_lowest_indices

      @Test public void competition_ranks_gives_tied_entries_lowest_indices() throws Exception
      Throws:
      Exception
    • competition_ranks_with_no_entries_gives_empty_array

      @Test public void competition_ranks_with_no_entries_gives_empty_array() throws Exception
      Throws:
      Exception
    • dense_ranks_gives_compressed_indices

      @Test public void dense_ranks_gives_compressed_indices() throws Exception
      Throws:
      Exception
    • increasing_ordinal_ranks_with_many_reps_gives_tied_entries_unique_indices

      @Test public void increasing_ordinal_ranks_with_many_reps_gives_tied_entries_unique_indices() throws Exception
      Throws:
      Exception
    • increasing_competition_ranks_with_many_reps_gives_compact_indices

      @Test public void increasing_competition_ranks_with_many_reps_gives_compact_indices() throws Exception
      Throws:
      Exception
    • increasing_dense_ranks_with_many_reps_gives_compact_indices

      @Test public void increasing_dense_ranks_with_many_reps_gives_compact_indices() throws Exception
      Throws:
      Exception
    • fractional_rank_gives_tied_element_average_of_sorted_positions

      @Test public void fractional_rank_gives_tied_element_average_of_sorted_positions() throws Exception
      Throws:
      Exception
    • fraction_ranks_gives_indices_average_of_sorted_positions

      @Test public void fraction_ranks_gives_indices_average_of_sorted_positions() throws Exception
      Throws:
      Exception
    • increasing_fraction_ranks_gives_with_many_reps_indices_average_of_sorted_positions

      @Test public void increasing_fraction_ranks_gives_with_many_reps_indices_average_of_sorted_positions() throws Exception
      Throws:
      Exception
    • ranks

      protected Object[] ranks(Double[] array, Ranks pfmc) throws EvaluationException
      Throws:
      EvaluationException
    • ranks_with_matrix_components_takes_and_returns_VectorI_using_the_MatrixList_function_from_Jep

      @Test public void ranks_with_matrix_components_takes_and_returns_VectorI_using_the_MatrixList_function_from_Jep() throws Exception
      Throws:
      Exception
    • ranks_with_matrix_components_takes_and_returns_VectorI_using_explicit_matrix_factory

      @Test public void ranks_with_matrix_components_takes_and_returns_VectorI_using_explicit_matrix_factory() throws Exception
      Throws:
      Exception
    • ranks_with_matrixListProcessor_returns_VectorI

      @Test public void ranks_with_matrixListProcessor_returns_VectorI() throws Exception
      Throws:
      Exception
    • sort_sorts

      @Test public void sort_sorts() throws Exception
      Throws:
      Exception
    • descending_sort_sorts

      @Test public void descending_sort_sorts() throws Exception
      Throws:
      Exception
    • testMeanParse

      @Test public void testMeanParse() throws JepException
      Throws:
      JepException
    • testBinom

      @Test public void testBinom() throws EvaluationException
      Throws:
      EvaluationException
    • testNormal

      @Test public void testNormal()
    • testInverse

      @Test public void testInverse()
    • nearest_neighbour_percentiles

      @Test public void nearest_neighbour_percentiles() throws EvaluationException
      Test data from https://en.wikipedia.org/wiki/Percentile
      Throws:
      EvaluationException
    • mid_interpolation_percentiles

      @Test public void mid_interpolation_percentiles() throws EvaluationException
      Test data from https://en.wikipedia.org/wiki/Percentile
      Throws:
      EvaluationException
    • inclusive_interpolation_percentiles

      @Test public void inclusive_interpolation_percentiles() throws EvaluationException
      Test data from https://en.wikipedia.org/wiki/Percentile
      Throws:
      EvaluationException
    • exclusive_interpolation_percentiles

      @Test public void exclusive_interpolation_percentiles() throws EvaluationException
      Test data from https://en.wikipedia.org/wiki/Percentile
      Throws:
      EvaluationException
    • median_interpolation_percentiles

      @Test public void median_interpolation_percentiles() throws EvaluationException
      Hyndman and Fan (1996) recommended method. Test data from https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm
      Throws:
      EvaluationException