Exemplo 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 = System.Math.Sqrt((UnnormalizedVariance
                                 + m.UnnormalizedVariance) / dof);
     var tDistr = new StudentDistribution(dof);
     return tDistr.ConfidenceLevel((Average - m.Average)
                                     / (sbar * System.Math.Sqrt(1.0 / Count
                                                     + 1.0 / m.Count)));
 }
Exemplo 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)
 {
     var tDistr = new StudentDistribution(
                                         (int)(Count + m.Count - 2));
     return tDistr.ConfidenceLevel((Average / StandardDeviation
                                         - m.Average
                                         / m.StandardDeviation)
                                         / System.Math.Sqrt(1 / Count
                                                     + 1 / m.Count));
 }
Exemplo n.º 3
0
 /// Constructor method.
 /// @param x double
 /// @param m DhbStatistics.StatisticalMoments
 public WeightedPoint(double x, StatisticalMoments m)
     : this(x, m.Average)
 {
     Error = m.ErrorOnAverage;
 }
Exemplo n.º 4
0
 /// @return double	F-test confidence level with data accumulated
 ///											in the supplied moments.
 /// @param m DhbStatistics.StatisticalMoments
 public double FConfidenceLevel(StatisticalMoments m)
 {
     var fDistr = new FisherSnedecorDistribution((int)Count, (int)m.Count);
     return fDistr.ConfidenceLevel(Variance / m.Variance);
 }
 /// @param x double
 /// @param m StatisticalMoments
 public void AccumulateAverage(double x, StatisticalMoments m)
 {
     AccumulatePoint(x, m.Average, m.ErrorOnAverage);
 }