Browse Source

Implement test case for DescriptiveStatistics which proves

that it computes kurtosis incorrectly for large samples
v2
Artyom Baranovskiy 14 years ago
parent
commit
7dd31a162d
  1. 10019
      data/NIST/Meixner.dat
  2. 3
      src/UnitTests/StatisticsTests/DescriptiveStatisticsTests.cs
  3. 4
      src/UnitTests/UnitTests.csproj

10019
data/NIST/Meixner.dat

File diff suppressed because it is too large

3
src/UnitTests/StatisticsTests/DescriptiveStatisticsTests.cs

@ -66,6 +66,8 @@ namespace MathNet.Numerics.UnitTests.StatisticsTests
_data.Add("numacc3", numacc3); _data.Add("numacc3", numacc3);
var numacc4 = new StatTestData("./data/NIST/NumAcc4.dat"); var numacc4 = new StatTestData("./data/NIST/NumAcc4.dat");
_data.Add("numacc4", numacc4); _data.Add("numacc4", numacc4);
var meixner = new StatTestData("./data/NIST/Meixner.dat");
_data.Add("meixner", meixner);
} }
/// <summary> /// <summary>
@ -102,6 +104,7 @@ namespace MathNet.Numerics.UnitTests.StatisticsTests
[TestCase("numacc2", 13, 0, -2.003003003003, 1.2, 1.1, 1.3, 1001)] [TestCase("numacc2", 13, 0, -2.003003003003, 1.2, 1.1, 1.3, 1001)]
[TestCase("numacc3", 9, 0, -2.003003003003, 1000000.2, 1000000.1, 1000000.3, 1001)] [TestCase("numacc3", 9, 0, -2.003003003003, 1000000.2, 1000000.1, 1000000.3, 1001)]
[TestCase("numacc4", 8, 0, -2.00300300299913, 10000000.2, 10000000.1, 10000000.3, 1001)] [TestCase("numacc4", 8, 0, -2.00300300299913, 10000000.2, 10000000.1, 10000000.3, 1001)]
[TestCase("meixner", 8, -0.016649617280859657, 0.8171318629552635, -0.002042931016531602, -4.825626912281697, 5.3018298664184913, 10000)]
public void IEnumerableDouble(string dataSet, int digits, double skewness, double kurtosis, double median, double min, double max, int count) public void IEnumerableDouble(string dataSet, int digits, double skewness, double kurtosis, double median, double min, double max, int count)
{ {
var data = _data[dataSet]; var data = _data[dataSet];

4
src/UnitTests/UnitTests.csproj

@ -1065,6 +1065,10 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="App.config" /> <None Include="App.config" />
<None Include="..\..\data\NIST\Meixner.dat">
<Link>data\NIST\Meixner.dat</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>

Loading…
Cancel
Save