![]() |
Home | Libraries | People | FAQ | More |
#include <boost/math/distributions/pareto.hpp>
namespace boost{ namespace math{ template <class RealType = double, class Policy = policies::policy<> > class pareto_distribution; typedef pareto_distribution<> pareto; template <class RealType, class Policy> class pareto_distribution { public: typedef RealType value_type; // 構造函數: pareto_distribution(RealType location = 1, RealType shape = 1) // 訪問函數(Accessors): RealType location()const; RealType shape()const; }; }} // namespaces
巴萊多分佈(Pareto distribution) 是一個連續分佈,概率密度函數(probability density function (pdf))為:
f(x; α, β) = αβα / xα+ 1
對於形狀參數(shape parameter) α > 0,以及位置參數( location parameter) β > 0,且α > 0。
巴萊多分佈(Pareto distribution) 經常用於描述與較小量相比的較大量(the larger compared to the smaller)。一個經典的例子是80%的財富被20%的人擁有( A classic example is that 80% of the wealth is owned by 20% of the population)。
下面的圖像顯示了當位置參數 β 發垂變化時函數PDF的變化:
下面的圖像顯示了對於不同的形狀參數(shape parameter),PDF函數是如何變化的:
pareto_distribution(RealType location = 1, RealType shape = 1);
使用形狀參數(shape parameter)shape 和尺度參數(scale parameter)scale構造一個 巴萊多分佈(pareto distribution) 。
要求形狀參數(shape parameter) shape 和尺度參數(scale parameter)scale 都大於0,否則調用定義域錯誤。
RealType location()const;
返回構造分佈的位置參數(location parameter)location 。
RealType shape()const;
返回構造分佈的形狀參數(shape parameter)shape 。
支持所有的分佈都通用的 常見的非成員訪問函數 : 累積分佈函數(Cumulative Distribution Function),概率密度函數(Probability Density Function),分位點(Quantile), 故障率函數(Hazard Function), 累積危險函數(Cumulative Hazard Function), 均值(mean), 中位數(median), 眾數(mode), 方差(variance), 標準差(standard deviation), 偏斜(skewness), 峰態(kurtosis), 峰態超越(kurtosis_excess), 值域(range) 以及 支持(support)。
隨機變量的定義域為:[location, ∞]。
巴萊多分佈(pareto distribution)使用標準庫函數exp
加上expm1 函數實現,因此誤差率(error rate)非常低,除非概率非常接近於單位元素(unity) 。
在下面的表中,α 是形狀參數( shape parameter),β 是位置參數( location parameter),x 是隨機變量,p 是概率且它的補集 q = 1-p。
函數 |
實現註解 |
---|---|
|
使用關係: pdf p = αβα/xα +1 |
cdf |
使用關係: cdf p = 1 - (β / x)α |
cdf 補集(complement) |
使用關係: q = 1 - p = -(β / x)α |
分位點(quantile ) |
使用關係: x = α / (1 - p)1/β |
補集的分位點(quantile from the complement) |
使用關係: x = α / (q)1/β |
均值(mean) |
αβ / (β - 1) |
方差(variance) |
βα2 / (β - 1)2 (β - 2) |
眾數(mode) |
α |
偏斜(skewness) |
參考Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource. |
峰態(kurtosis) |
參考Weisstein, Eric W. "Pareto Distribution." From MathWorld--A Wolfram Web Resource. |
峰態超越(kurtosis excess) |
參考Weisstein, Eric W. "pareto Distribution." From MathWorld--A Wolfram Web Resource. |