From 243a4c044b38f44be5246cfd755e80c1b57f0e83 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 30 Sep 2020 20:21:29 +0200 Subject: [PATCH] Adjusted test for distribution for shape fitter --- FastRngTests/Double/Distributions/Beta.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/FastRngTests/Double/Distributions/Beta.cs b/FastRngTests/Double/Distributions/Beta.cs index aa8ba0f..ad17463 100644 --- a/FastRngTests/Double/Distributions/Beta.cs +++ b/FastRngTests/Double/Distributions/Beta.cs @@ -15,13 +15,12 @@ namespace FastRngTests.Double.Distributions [Category(TestCategories.NORMAL)] public async Task TestBetaDistribution01() { - const double A = 7.0; - const double B = 2.0; - + const double A = 2; + const double B = 2; const double MEAN = A / (A + B); - const double VARIANCE = MEAN * (1 - MEAN) / (A + B + 1); + const double VARIANCE = (A * B) / ((A + B) * (A + B) * (A + B + 1.0)); - var dist = new FastRng.Double.Distributions.Beta{ A = A, B = B }; + var dist = new FastRng.Double.Distributions.Beta(); var stats = new RunningStatistics(); var rng = new MultiThreadedRng();