Ejemplo n.º 1
0
        public static double TestStatic(IList <IList <double> > samples)
        {
            double total_size            = 0.0f;
            double squared_rank_mean_sum = 0.0f;

            double[][] rank_samples = ToolsMathStatistics.ConvertToAccendingRanks(samples);

            foreach (double[] sample in rank_samples)
            {
                total_size += sample.Length;
                double sum = ToolsMathCollection.Sum(sample);

                squared_rank_mean_sum += (sum * sum) / ((double)sample.Length);
            }

            double statistic = (12.0 * squared_rank_mean_sum) / (total_size * (total_size + 1)) - 3 * (total_size + 1);

            return(1 - ChiSquared.CDF(samples.Count - 1, statistic));
        }