Beispiel #1
0
        public void StandardDeviationConsistentWithNistData(string dataSet, int digits)
        {
            var data = _data[dataSet];

            AssertHelpers.AlmostEqual(data.StandardDeviation, Statistics.StandardDeviation(data.Data), digits);
            AssertHelpers.AlmostEqual(data.StandardDeviation, ArrayStatistics.StandardDeviation(data.Data), digits);
            AssertHelpers.AlmostEqual(data.StandardDeviation, StreamingStatistics.StandardDeviation(data.Data), digits);
            AssertHelpers.AlmostEqual(data.StandardDeviation, Math.Sqrt(Statistics.MeanVariance(data.Data).Item2), digits);
            AssertHelpers.AlmostEqual(data.StandardDeviation, Math.Sqrt(ArrayStatistics.MeanVariance(data.Data).Item2), digits);
            AssertHelpers.AlmostEqual(data.StandardDeviation, Math.Sqrt(StreamingStatistics.MeanVariance(data.Data).Item2), digits);
        }
Beispiel #2
0
        public void MeanConsistentWithNistData(string dataSet)
        {
            var data = _data[dataSet];

            AssertHelpers.AlmostEqual(data.Mean, Statistics.Mean(data.Data), 15);
            AssertHelpers.AlmostEqual(data.Mean, ArrayStatistics.Mean(data.Data), 15);
            AssertHelpers.AlmostEqual(data.Mean, StreamingStatistics.Mean(data.Data), 15);
            AssertHelpers.AlmostEqual(data.Mean, Statistics.MeanVariance(data.Data).Item1, 15);
            AssertHelpers.AlmostEqual(data.Mean, ArrayStatistics.MeanVariance(data.Data).Item1, 15);
            AssertHelpers.AlmostEqual(data.Mean, StreamingStatistics.MeanVariance(data.Data).Item1, 15);
        }