Ejemplo n.º 1
0
        /// @return double	t-test confidence level with data accumulated
        ///											in the supplied moments.
        /// The variance of both sets is assumed to be the same.
        /// @param m DhbStatistics.StatisticalMoments
        public double TConfidenceLevel(StatisticalMoments m)
        {
            int    dof  = (int)(Count + m.Count - 2);
            double sbar = Math.Sqrt((UnnormalizedVariance
                                     + m.UnnormalizedVariance) / dof);
            StudentDistribution tDistr = new StudentDistribution(dof);

            return(tDistr.ConfidenceLevel((Average - m.Average)
                                          / (sbar * Math.Sqrt(1.0 / Count
                                                              + 1.0 / m.Count))));
        }
Ejemplo n.º 2
0
        /// @return double	t-test confidence level with data accumulated
        ///											in the supplied moments.
        /// Approximation for the case where the variance of both sets may
        ///															differ.
        /// @param m DhbStatistics.StatisticalMoments
        public double TApproximateConfidenceLevel(StatisticalMoments m)
        {
            StudentDistribution tDistr = new StudentDistribution(
                (int)(Count + m.Count - 2));

            return(tDistr.ConfidenceLevel((Average / StandardDeviation
                                           - m.Average
                                           / m.StandardDeviation)
                                          / Math.Sqrt(1 / Count
                                                      + 1 / m.Count)));
        }
Ejemplo n.º 3
0
        /// @return double	F-test confidence level with data accumulated
        ///											in the supplied moments.
        /// @param m DhbStatistics.StatisticalMoments
        public double FConfidenceLevel(StatisticalMoments m)
        {
            FisherSnedecorDistribution fDistr = new FisherSnedecorDistribution((int)Count, (int)m.Count);

            return(fDistr.ConfidenceLevel(Variance / m.Variance));
        }