Skip to content

Wrong answers from integralBinomialPDF for p = 0.0 and p = 1.0 #97

@gaurav-arya

Description

@gaurav-arya

For example, integralBinomialPDF 3 1 3 = 2.718281828459045. The issue seems to be that the edge-case handling in integralBinomialLogPdf outputs the actual PDF rather than the log PDF:

| p == 0.0 && xI == 0 = 1.0
| p == 0.0 = 0.0
| p == 1.0 && xI == nI = 1.0
| p == 1.0 = 0.0
| xI == 0 = n * log (1-p)
| xI == nI = n * log p
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions