]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/doc/distributions/pareto.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / math / doc / distributions / pareto.qbk
CommitLineData
7c673cae
FG
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
32f(x; [alpha], [beta]) = [alpha][beta][super [alpha]] / x[super [alpha]+ 1]
33
34For shape parameter [alpha][space] > 0, and scale parameter [beta][space] > 0.
35If x < [beta][space], 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
50[h4 Related distributions]
51
52
53[h4 Member Functions]
54
55 pareto_distribution(RealType scale = 1, RealType shape = 1);
56
57Constructs a [@http://en.wikipedia.org/wiki/pareto_distribution
58pareto distribution] with shape /shape/ and scale /scale/.
59
60Requires that the /shape/ and /scale/ parameters are both greater than zero,
61otherwise calls __domain_error.
62
63 RealType scale()const;
64
65Returns the /scale/ parameter of this distribution.
66
67 RealType shape()const;
68
69Returns the /shape/ parameter of this distribution.
70
71[h4 Non-member Accessors]
72
73All the [link math_toolkit.dist_ref.nmp usual non-member accessor functions] that are generic to all
74distributions are supported: __usual_accessors.
75
76The supported domain of the random variable is \[scale, [infin]\].
77
78[h4 Accuracy]
79
80The Pareto distribution is implemented in terms of the
81standard library `exp` functions plus __expm1
82and so should have very small errors, usually only a few epsilon.
83
84If probability is near to unity (or the complement of a probability near zero) see also __why_complements.
85
86[h4 Implementation]
87
88In the following table [alpha][space] is the shape parameter of the distribution, and
89[beta][space] is its scale parameter, /x/ is the random variate, /p/ is the probability
90and its complement /q = 1-p/.
91
92[table
93[[Function][Implementation Notes]]
94[[pdf][Using the relation: pdf p = [alpha][beta][super [alpha]]/x[super [alpha] +1] ]]
95[[cdf][Using the relation: cdf p = 1 - ([beta][space] / x)[super [alpha]] ]]
96[[cdf complement][Using the relation: q = 1 - p = -([beta][space] / x)[super [alpha]] ]]
97[[quantile][Using the relation: x = [beta] / (1 - p)[super 1/[alpha]] ]]
98[[quantile from the complement][Using the relation: x = [beta] / (q)[super 1/[alpha]] ]]
99[[mean][[alpha][beta] / ([beta] - 1) ]]
100[[variance][[beta][alpha][super 2] / ([beta] - 1)[super 2] ([beta] - 2) ]]
101[[mode][[alpha]]]
102[[skewness][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
103[[kurtosis][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
104[[kurtosis excess][Refer to [@http://mathworld.wolfram.com/ParetoDistribution.html Weisstein, Eric W. "pareto Distribution." From MathWorld--A Wolfram Web Resource.] ]]
105]
106
107[h4 References]
108* [@http://en.wikipedia.org/wiki/pareto_distribution Pareto Distribution]
109* [@http://mathworld.wolfram.com/paretoDistribution.html Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource.]
110* Handbook of Statistical Distributions with Applications, K Krishnamoorthy, ISBN 1-58488-635-8, Chapter 23, pp 257 - 267.
111(Note the meaning of a and b is reversed in Wolfram and Krishnamoorthy).
112
113[endsect][/section:pareto pareto]
114
115[/
116 Copyright 2006, 2009 John Maddock and Paul A. Bristow.
117 Distributed under the Boost Software License, Version 1.0.
118 (See accompanying file LICENSE_1_0.txt or copy at
119 http://www.boost.org/LICENSE_1_0.txt).
120]
121