• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[section:pareto Pareto Distribution]
2
3
4``#include <boost/math/distributions/pareto.hpp>``
5
6   namespace boost{ namespace math{
7
8   template <class RealType = double,
9             class ``__Policy``   = ``__policy_class`` >
10   class pareto_distribution;
11
12   typedef pareto_distribution<> pareto;
13
14   template <class RealType, class ``__Policy``>
15   class pareto_distribution
16   {
17   public:
18      typedef RealType value_type;
19      // Constructor:
20      pareto_distribution(RealType scale = 1, RealType shape = 1)
21      // Accessors:
22      RealType scale()const;
23      RealType shape()const;
24   };
25
26   }} // namespaces
27
28The [@http://en.wikipedia.org/wiki/pareto_distribution Pareto distribution]
29is a continuous distribution with the
30[@http://en.wikipedia.org/wiki/Probability_density_function probability density function (pdf)]:
31
32[expression f(x; [alpha], [beta]) = [alpha][beta][super [alpha]] / x[super [alpha]+ 1]]
33
34For shape parameter [alpha] > 0, and scale parameter [beta] > 0.
35If x < [beta], the pdf is zero.
36
37The [@http://mathworld.wolfram.com/ParetoDistribution.html Pareto distribution]
38often describes the larger compared to the smaller.
39A classic example is that 80% of the wealth is owned by 20% of the population.
40
41The following graph illustrates how the PDF varies with the scale parameter [beta]:
42
43[graph pareto_pdf1]
44
45And this graph illustrates how the PDF varies with the shape parameter [alpha]:
46
47[graph pareto_pdf2]
48
49[h4 Related distributions]
50
51[h4 Member Functions]
52
53   pareto_distribution(RealType scale = 1, RealType shape = 1);
54
55Constructs a [@http://en.wikipedia.org/wiki/pareto_distribution
56pareto distribution] with shape /shape/ and scale /scale/.
57
58Requires that the /shape/ and /scale/ parameters are both greater than zero,
59otherwise calls __domain_error.
60
61   RealType scale()const;
62
63Returns the /scale/ parameter of this distribution.
64
65   RealType shape()const;
66
67Returns the /shape/ parameter of this distribution.
68
69[h4 Non-member Accessors]
70
71All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions] that are generic to all
72distributions are supported: __usual_accessors.
73
74The supported domain of the random variable is \[scale, [infin]\].
75
76[h4 Accuracy]
77
78The Pareto distribution is implemented in terms of the
79standard library `exp` functions plus __expm1
80and so should have very small errors, usually only a few epsilon.
81
82If probability is near to unity (or the complement of a probability near zero) see also __why_complements.
83
84[h4 Implementation]
85
86In the following table [alpha] is the shape parameter of the distribution, and
87[beta] is its scale parameter, /x/ is the random variate, /p/ is the probability
88and its complement /q = 1-p/.
89
90[table
91[[Function][Implementation Notes]]
92[[pdf][Using the relation: pdf p = [alpha][beta][super [alpha]]/x[super [alpha] +1] ]]
93[[cdf][Using the relation: cdf p = 1 - ([beta] / x)[super [alpha]] ]]
94[[cdf complement][Using the relation: q = 1 - p = -([beta] / x)[super [alpha]] ]]
95[[quantile][Using the relation: x = [beta] / (1 - p)[super 1/[alpha]] ]]
96[[quantile from the complement][Using the relation: x =  [beta] / (q)[super 1/[alpha]] ]]
97[[mean][[alpha][beta] / ([beta] - 1) ]]
98[[variance][[beta][alpha][super 2] / ([beta] - 1)[super 2] ([beta] - 2) ]]
99[[mode][[alpha]]]
100[[skewness][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
101[[kurtosis][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
102[[kurtosis excess][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
103]
104
105[h4 References]
106* [@http://en.wikipedia.org/wiki/pareto_distribution Pareto Distribution]
107* [@http://mathworld.wolfram.com/paretoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.]
108* Handbook of Statistical Distributions with Applications, K Krishnamoorthy, ISBN 1-58488-635-8, Chapter 23, pp 257 - 267.
109(Note the meaning of a and b is reversed in Wolfram and Krishnamoorthy).
110
111[endsect] [/section:pareto pareto]
112
113[/
114  Copyright 2006, 2009 John Maddock and Paul A. Bristow.
115  Distributed under the Boost Software License, Version 1.0.
116  (See accompanying file LICENSE_1_0.txt or copy at
117  http://www.boost.org/LICENSE_1_0.txt).
118]
119
120