hoangduit / accord

Automatically exported from code.google.com/p/accord
0 stars 0 forks source link

ProbabilityDensityFunction in MultivariateNormalDistribution does not return values higher than 1 #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

            MultivariateNormalDistribution mnd = new MultivariateNormalDistribution(
                new[] { 0.25, 0.082 },
                new[,] { {0.0117, 0.0032}, {0.0032, 0.001062} });

            Double[] vec = {0.25, -1d};
            for (Double d = 0.03; d < 0.13; d += 0.0001)
            {
                vec[1] = d;
                Double pr = mnd.ProbabilityDensityFunction(vec);
                if (pr > 0)
                {
                    Console.WriteLine(d + ": " + pr);
                }
            }

What is the expected output? What do you see instead?
I would expect the PDF go to higher values, much higher than 1

What version of the product are you using? On what operating system?
Accord.2.12.0.0, Windows 8

Please provide any additional information below.
Check my comment in 
https://code.google.com/p/accord/source/browse/trunk/Sources/Accord.Statistics/D
istributions/Multivariate/Continuous/MultivariateNormalDistribution.cs?r=346

Original issue reported on code.google.com by FeroHajn...@gmail.com on 2 Jul 2014 at 2:08

GoogleCodeExporter commented 9 years ago
Thanks! Will be fixed on the next release (2.13).

Original comment by cesarso...@gmail.com on 5 Jul 2014 at 6:44

GoogleCodeExporter commented 9 years ago

Original comment by cesarso...@gmail.com on 8 Aug 2014 at 10:03

GoogleCodeExporter commented 9 years ago
Available on release 2.13.

Original comment by cesarso...@gmail.com on 19 Aug 2014 at 8:33