Opened 14 years ago

Closed 14 years ago

#2651 closed Bugs (fixed)

Documentation errors, potential application problems

Reported by: georg.mainik@… Owned by: John Maddock
Milestone: Component: math
Version: Boost 1.35.0 Severity: Optimization
Keywords: Pareto Distribution Cc: pbristow@…

Description

Some formulae in the documentation of pareto_distribution are wrong, e.g. the true quantile is beta/(1-p)(1/alpha).

Further I have a remark on the implementation. According to the documentation page, computation errors are low except p is near to 1. Unfortunately, this is just the region of interest in extreme value applications, and the Pareto distribution is widely used there.

I have not tested the implementation yet, but there may be some problems with extreme value applications.

Change History (4)

comment:1 by Steven Watanabe, 14 years ago

Component: Nonemath
Owner: set to John Maddock

comment:2 by John Maddock, 14 years ago

Cc: pbristow@… added
Status: newassigned

I'm CC'ing Paul Bristow on this one as I believe he wrote this one.

The quantile in the docs looks like a simple type (alpha and beta wrong way around).

Re: errors for p near 1, I'm not sure I understand this remark - Paul can you clarify what the issue is if any?

John.

comment:3 by John Maddock, 14 years ago

Just to clarify this is an issue with getting the docs wording correct, not with the implementation.

  • Asuming the p values passed to the quantile function are exact binary values then there is no issue with accuracy, but...
  • As with all distributions if you pass a p value close to 1, and that value is inexact, then what we're really need in order to calculate the quantile is 1-p which will be mostly garbage digits for p ~ 1.

To put this another way:

quantile(my_pareto, 0.99)

is potentially less accurate than

quantile(complement(my_pareto, 0.01))

since 1 - 0.99 != 0.01 when using fp-arithmetic.

This assumes that the 0.01 value (for example) is either a constant, or computed by some manner other than subtracting 0.99 from 1.

Not sure at present, whether we should reword this, or just remove the accuracy caveat from the docs, given that this is an issue with all distributions, and all implementations thereof not just ours.

HTH, John.

comment:4 by Paul A. Bristow, 14 years ago

Resolution: fixed
Status: assignedclosed

Pareto errors corrected and major revisions to make need for complements more obvious, in TOC, and indexed.

Note: See TracTickets for help on using tickets.