Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

GeneralizedBetaDistribution.ProbabilityDensityFunction does not have an area of 1 #630

@arubiomoreno

Description

@arubiomoreno

The PDF should have an area of 1 by definition. The current implementation has an area of Support.Length. The fix is as simple as changing this line:
return constant * Math.Pow(z, alpha - 1) * Math.Pow(1 - z, beta - 1);
for this line:
return constant * Math.Pow(z, alpha - 1) * Math.Pow(1 - z, beta - 1) / Support.Length;

Edit: check also GeneralizedBetaDistribution.LogProbabilityDensityFunction

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions