Paretodf

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

Purpose

Pareto distribution.

Synopsis

prob = paretodf(function,x,a,b)

Description

Estimates cumulative distribution function (cumulative, cdf), probability density function (density, pdf), quantile (inverse of cdf), or random numbers for a Pareto distribution.

This distribution is commonly used to model financial data (especially insurance data). It is skewed to the right and the variance may be smaller, equal, or larger than the mean. Negative values in the sample are ignored.


Inputs

  • function = [ {'cumulative'} | 'density' | 'quantile' | 'random' ], defines the functionality to be used. Note that the function recognizes the first letter of each string so that the string could be: [ 'c' | 'd' | 'q' | 'r' ].
  • x = matrix in which the sample data is stored, in the interval (-inf,inf).
for function=quantile - matrix with values in the interval (0,1).
for function=random - vector indicating the size of the random matrix to create.
  • a = scale parameter (real and positive).
  • b = shape parameter (real and positive).

Note: If inputs (x, a, and b) are not equal in size, the function will attempt to resize all inputs to the largest input using the RESIZE function.

Note: Functions will typically allow input values outside of the acceptable range to be passed but such values will return NaN in the results.

Examples

Cumulative

>> prob = paretodf('c',2,1,2)
prob =
    0.7500
>> x    = [0:0.1:10];
>> plot(x,paretodf('c',x,1,2),'b-',x,paretodf('c',x,3,7),'r-')

Density

>> prob = paretodf('d',2,1,1)
prob =
    0.2500
>> x    = [0:0.1:10];
>> plot(x,paretodf('d',x,2,1),'b-',x,paretodf('d',x,0.5,1),'r-')

Quantile

>> prob = paretodf('q',0.5,1,2)
prob =
    1.4142

Random

>> prob = paretodf('r',[4 1],2,1)
ans =
   40.1037
    2.6012
    5.0870
    3.8909

See Also

betadf, cauchydf, chidf, expdf, gammadf, gumbeldf, laplacedf, logisdf, lognormdf, normdf, raydf, triangledf, unifdf, weibulldf