public StatisticsTests() { StatTestData lottery = new StatTestData("./data/NIST/Lottery.dat"); mData.Add("lottery", lottery); StatTestData lew = new StatTestData("./data/NIST/Lew.dat"); mData.Add("lew", lew); StatTestData mavro = new StatTestData("./data/NIST/Mavro.dat"); mData.Add("mavro", mavro); StatTestData michelso = new StatTestData("./data/NIST/Michelso.dat"); mData.Add("michelso", michelso); StatTestData numacc1 = new StatTestData("./data/NIST/NumAcc1.dat"); mData.Add("numacc1", numacc1); StatTestData numacc2 = new StatTestData("./data/NIST/NumAcc2.dat"); mData.Add("numacc2", numacc2); StatTestData numacc3 = new StatTestData("./data/NIST/NumAcc3.dat"); mData.Add("numacc3", numacc3); StatTestData numacc4 = new StatTestData("./data/NIST/NumAcc4.dat"); mData.Add("numacc4", numacc4); }
/// <summary> /// Initializes a new instance of the CorrelationTests class. /// </summary> public CorrelationTests() { var lottery = new StatTestData("./data/NIST/Lottery.dat"); _data.Add("lottery", lottery); var lew = new StatTestData("./data/NIST/Lew.dat"); _data.Add("lew", lew); }
/// <summary> /// Initializes a new instance of the DescriptiveStatisticsTests class. /// </summary> public DescriptiveStatisticsTests() { var lottery = new StatTestData("./data/NIST/Lottery.dat"); _data.Add("lottery", lottery); var lew = new StatTestData("./data/NIST/Lew.dat"); _data.Add("lew", lew); var mavro = new StatTestData("./data/NIST/Mavro.dat"); _data.Add("mavro", mavro); var michelso = new StatTestData("./data/NIST/Michelso.dat"); _data.Add("michelso", michelso); var numacc1 = new StatTestData("./data/NIST/NumAcc1.dat"); _data.Add("numacc1", numacc1); var numacc2 = new StatTestData("./data/NIST/NumAcc2.dat"); _data.Add("numacc2", numacc2); var numacc3 = new StatTestData("./data/NIST/NumAcc3.dat"); _data.Add("numacc3", numacc3); var numacc4 = new StatTestData("./data/NIST/NumAcc4.dat"); _data.Add("numacc4", numacc4); }
public void IEnumerableDouble(string dataSet, int digits, double skewness, double kurtosis, double median, double min, double max, int count) { StatTestData data = mData[dataSet]; DescriptiveStatistics stats = new DescriptiveStatistics(data.Data); AssertHelpers.AlmostEqual(data.Mean, stats.Mean, 15); AssertHelpers.AlmostEqual(data.StandardDeviation, stats.StandardDeviation, digits); AssertHelpers.AlmostEqual(skewness, stats.Skewness, 7); AssertHelpers.AlmostEqual(kurtosis, stats.Kurtosis, 7); AssertHelpers.AlmostEqual(median, stats.Median, 15); Assert.AreEqual(stats.Minimum, min); Assert.AreEqual(stats.Maximum, max); Assert.AreEqual(stats.Count, count); }
/// <summary> /// Initializes a new instance of the StatisticsTests class. /// </summary> public StatisticsTests() { var lottery = new StatTestData("./data/NIST/Lottery.dat"); _data.Add("lottery", lottery); var lew = new StatTestData("./data/NIST/Lew.dat"); _data.Add("lew", lew); var mavro = new StatTestData("./data/NIST/Mavro.dat"); _data.Add("mavro", mavro); var michelso = new StatTestData("./data/NIST/Michelso.dat"); _data.Add("michelso", michelso); var numacc1 = new StatTestData("./data/NIST/NumAcc1.dat"); _data.Add("numacc1", numacc1); var numacc2 = new StatTestData("./data/NIST/NumAcc2.dat"); _data.Add("numacc2", numacc2); var numacc3 = new StatTestData("./data/NIST/NumAcc3.dat"); _data.Add("numacc3", numacc3); var numacc4 = new StatTestData("./data/NIST/NumAcc4.dat"); _data.Add("numacc4", numacc4); }
public DescriptiveStatisticsTests() { StatTestData lottery = new StatTestData("./data/NIST/Lottery.dat"); mData.Add("lottery", lottery); StatTestData lew = new StatTestData("./data/NIST/Lew.dat"); mData.Add("lew", lew); StatTestData mavro = new StatTestData("./data/NIST/Mavro.dat"); mData.Add("mavro", mavro); StatTestData michelso = new StatTestData("./data/NIST/Michelso.dat"); mData.Add("michelso", michelso); StatTestData numacc1 = new StatTestData("./data/NIST/NumAcc1.dat"); mData.Add("numacc1", numacc1); StatTestData numacc2 = new StatTestData("./data/NIST/NumAcc2.dat"); mData.Add("numacc2", numacc2); StatTestData numacc3 = new StatTestData("./data/NIST/NumAcc3.dat"); mData.Add("numacc3", numacc3); StatTestData numacc4 = new StatTestData("./data/NIST/NumAcc4.dat"); mData.Add("numacc4", numacc4); }
public void NullableMean(string dataSet) { StatTestData data = mData[dataSet]; AssertHelpers.AlmostEqual(data.Mean, data.DataWithNulls.Mean(), 15); }
public void NullableStandardDeviation(string dataSet, int digits) { StatTestData data = mData[dataSet]; AssertHelpers.AlmostEqual(data.StandardDeviation, data.DataWithNulls.StandardDeviation(), digits); }