Skip to content

Off-by-one error in Continuous.p? #3

@jhauffa

Description

@jhauffa

According to the paper of Clauset et al. (both the 2007 and the 2009 version), the PDF of a continuous power-law distribution is defined as (alpha-1)/x_min * (x/x_min)^(-alpha). The current implementation (line 43 of Continuous.java) does not match that definition:
return (exponent() / xMin()) * Math.pow(x / xMin(), -exponent());
Should it be changed to:
return ((exponent() - 1.0) / xMin()) * Math.pow(x / xMin(), -exponent());
?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions