|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50672 - sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions
From: pbristow_at_[hidden]
Date: 2009-01-19 10:52:20
Author: pbristow
Date: 2009-01-19 10:52:19 EST (Mon, 19 Jan 2009)
New Revision: 50672
URL: http://svn.boost.org/trac/boost/changeset/50672
Log:
Corrected quantile formula - and also changed 'location' to 'scale' to match the reference texts. (also in source code pareto.cpp)
Text files modified:
sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/pareto.qbk | 69 ++++++++++++++++++++-------------------
1 files changed, 36 insertions(+), 33 deletions(-)
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/pareto.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/pareto.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/pareto.qbk 2009-01-19 10:52:19 EST (Mon, 19 Jan 2009)
@@ -3,41 +3,42 @@
``#include <boost/math/distributions/pareto.hpp>``
- namespace boost{ namespace math{
-
- template <class RealType = double,
+ namespace boost{ namespace math{
+
+ template <class RealType = double,
class ``__Policy`` = ``__policy_class`` >
class pareto_distribution;
-
+
typedef pareto_distribution<> pareto;
-
+
template <class RealType, class ``__Policy``>
class pareto_distribution
{
public:
typedef RealType value_type;
// Constructor:
- pareto_distribution(RealType location = 1, RealType shape = 1)
+ pareto_distribution(RealType scale = 1, RealType shape = 1)
// Accessors:
- RealType location()const;
+ RealType scale()const;
RealType shape()const;
};
-
+
}} // namespaces
-
+
The [@http://en.wikipedia.org/wiki/pareto_distribution Pareto distribution]
-is a continuous distribution with the
+is a continuous distribution with the
[@http://en.wikipedia.org/wiki/Probability_density_function probability density function (pdf)]:
f(x; [alpha], [beta]) = [alpha][beta][super [alpha]] / x[super [alpha]+ 1]
-For shape parameter [alpha][space] > 0, and location parameter [beta][space] > 0, and [alpha][space] > 0.
+For shape parameter [alpha][space] > 0, and scale parameter [beta][space] > 0.
+If x < [beta][space], the pdf is zero.
-The [@http://mathworld.wolfram.com/paretoDistribution.html Pareto distribution]
+The [@http://mathworld.wolfram.com/ParetoDistribution.html Pareto distribution]
often describes the larger compared to the smaller.
A classic example is that 80% of the wealth is owned by 20% of the population.
-The following graph illustrates how the PDF varies with the location parameter [beta]:
+The following graph illustrates how the PDF varies with the scale parameter [beta]:
[graph pareto_pdf1]
@@ -48,23 +49,23 @@
[h4 Related distributions]
-
+
[h4 Member Functions]
- pareto_distribution(RealType location = 1, RealType shape = 1);
-
-Constructs a [@http://en.wikipedia.org/wiki/pareto_distribution
+ pareto_distribution(RealType scale = 1, RealType shape = 1);
+
+Constructs a [@http://en.wikipedia.org/wiki/pareto_distribution
pareto distribution] with shape /shape/ and scale /scale/.
-Requires that the /shape/ and /scale/ parameters are both greater than zero,
+Requires that the /shape/ and /scale/ parameters are both greater than zero,
otherwise calls __domain_error.
-
- RealType location()const;
-
-Returns the /location/ parameter of this distribution.
+
+ RealType scale()const;
+
+Returns the /scale/ parameter of this distribution.
RealType shape()const;
-
+
Returns the /shape/ parameter of this distribution.
[h4 Non-member Accessors]
@@ -72,11 +73,11 @@
All the [link math_toolkit.dist.dist_ref.nmp usual non-member accessor functions] that are generic to all
distributions are supported: __usual_accessors.
-The supported domain of the random variable is \[location, [infin]\].
+The supported domain of the random variable is \[scale, [infin]\].
[h4 Accuracy]
-The pareto distribution is implemented in terms of the
+The pareto distribution is implemented in terms of the
standard library `exp` functions plus __expm1
and as such should have very low error rates
except when probability is very close to unity.
@@ -84,7 +85,7 @@
[h4 Implementation]
In the following table [alpha][space] is the shape parameter of the distribution, and
-[beta][space] is its location parameter, /x/ is the random variate, /p/ is the probability
+[beta][space] is its scale parameter, /x/ is the random variate, /p/ is the probability
and its complement /q = 1-p/.
[table
@@ -92,24 +93,26 @@
[[pdf][Using the relation: pdf p = [alpha][beta][super [alpha]]/x[super [alpha] +1] ]]
[[cdf][Using the relation: cdf p = 1 - ([beta][space] / x)[super [alpha]] ]]
[[cdf complement][Using the relation: q = 1 - p = -([beta][space] / x)[super [alpha]] ]]
-[[quantile][Using the relation: x = [alpha] / (1 - p)[super 1/[beta]] ]]
-[[quantile from the complement][Using the relation: x = [alpha] / (q)[super 1/[beta]] ]]
+[[quantile][Using the relation: x = [beta] / (1 - p)[super 1/[alpha]] ]]
+[[quantile from the complement][Using the relation: x = [beta] / (q)[super 1/[alpha]] ]]
[[mean][[alpha][beta] / ([beta] - 1) ]]
[[variance][[beta][alpha][super 2] / ([beta] - 1)[super 2] ([beta] - 2) ]]
[[mode][[alpha]]]
-[[skewness][Refer to [@http://mathworld.wolfram.com/paretoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
-[[kurtosis][Refer to [@http://mathworld.wolfram.com/paretoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
-[[kurtosis excess][Refer to [@http://mathworld.wolfram.com/paretoDistribution.html Weisstein, Eric W. "pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
+[[skewness][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
+[[kurtosis][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
+[[kurtosis excess][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
]
[h4 References]
* [@http://en.wikipedia.org/wiki/pareto_distribution Pareto Distribution]
* [@http://mathworld.wolfram.com/paretoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.]
+* Handbook of Statistical Distributions with Applications, K Krishnamoorthy, ISBN 1-58488-635-8, Chapter 23, pp 257 - 267.
+(Note the meaning of a and b is reversed in Wolfram and Krishnamoorthy).
[endsect][/section:pareto pareto]
-[/
- Copyright 2006 John Maddock and Paul A. Bristow.
+[/
+ Copyright 2006, 2009 John Maddock and Paul A. Bristow.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk