randp.m

版本 1.0.0.0 (10.1 KB) 作者: Matthew Roughan
Generate Pareto random variables.
1.7K 次下载
更新时间 2009/8/2

查看许可证

This function generates Pareto random variables (of type I). See
"Statistical Distributions", Evans, Hastings and Peacock, Wiley, 1993
or http://www.maths.adelaide.edu.au/matthew.roughan/probability_distrns/node6.html
or http://en.wikipedia.org/wiki/Pareto_distribution

The Pareto distribution is a classic "heavy-tailed" or "power-law" distribution. It has distribution function
F(x) = 1 - (b/x)^alpha, for x>=b
and density
f(x) = (alpha/b) * (b/x)^(alpha+1), for x>=b

Its mean is
E[X] = b * alpha/(alpha-1), for alpha>1
but note that the mean is infinite for alpha<=1

Its variance is
Var(X) = b^2 * alpha/[(alpha-1)^2*(alpha-2)], for alpha>1
but note that the variance is infinite for alpha<=2

Median
Med(X) = b * 2^(1/alpha)

Note the function calls "rand" so if you want to control the seed, use rand('state', seed).

Also note that the type II Pareto is just shifted so that x>=0, so to obtain this distributio just take
x = randp(N,M,alpha,b) - b;

引用格式

Matthew Roughan (2024). randp.m (https://www.mathworks.com/matlabcentral/fileexchange/24904-randp-m), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0