Paretodf: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
(Importing text file)
Line 1: Line 1:
===Purpose===
===Purpose===
Pareto distribution.
Pareto distribution.
===Synopsis===
===Synopsis===
:prob = paretodf(function,x,a,b)
:prob = paretodf(function,x,a,b)
===Description===
===Description===
Estimates cumulative distribution function (cumulative, cdf), probability density function (density, pdf), quantile (inverse of cdf), or random numbers for a Pareto distribution.  
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.
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====
====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' ].
* '''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).  
* '''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=quantile - matrix with values in the interval (0,1).
*  '''for''' function=random - vector indicating the size of the random matrix to create.
*  '''for''' function=random - vector indicating the size of the random matrix to create.
* '''a''' = scale parameter (real and positive).
* '''a''' = scale parameter (real and positive).
*  '''b''' = shape 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''': 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.  
'''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===
===Examples===
====Cumulative:====
====Cumulative:====
>> prob = paretodf('c',2,1,2)
>> prob = paretodf('c',2,1,2)
prob =
prob =
     0.7500
     0.7500
>> x    = [0:0.1:10];
>> x    = [0:0.1:10];
>> plot(x,paretodf('c',x,1,2),'b-',x,paretodf('c',x,3,7),'r-')
>> plot(x,paretodf('c',x,1,2),'b-',x,paretodf('c',x,3,7),'r-')
====Density:====
====Density:====
>> prob = paretodf('d',2,1,1)
>> prob = paretodf('d',2,1,1)
prob =
prob =
     0.2500
     0.2500
>> x    = [0:0.1:10];
>> x    = [0:0.1:10];
>> plot(x,paretodf('d',x,2,1),'b-',x,paretodf('d',x,0.5,1),'r-')
>> plot(x,paretodf('d',x,2,1),'b-',x,paretodf('d',x,0.5,1),'r-')
====Quantile:====
====Quantile:====
>> prob = paretodf('q',0.5,1,2)
>> prob = paretodf('q',0.5,1,2)
prob =
prob =
     1.4142
     1.4142
====Random:====
====Random:====
>> prob = paretodf('r',[4 1],2,1)
>> prob = paretodf('r',[4 1],2,1)
ans =
ans =
   40.1037
   40.1037
     2.6012
     2.6012
     5.0870
     5.0870
     3.8909
     3.8909
===See Also===
===See Also===
[[betadr]], [[cauchydf]], [[chidf]], [[expdf]], [[gammadf]], [[gumbeldf]], [[laplacedf]], [[logisdf]], [[lognormdf]], [[normdf]], [[raydf]], [[triangledf]], [[unifdf]], [[weibulldf]]
[[betadr]], [[cauchydf]], [[chidf]], [[expdf]], [[gammadf]], [[gumbeldf]], [[laplacedf]], [[logisdf]], [[lognormdf]], [[normdf]], [[raydf]], [[triangledf]], [[unifdf]], [[weibulldf]]

Revision as of 15:26, 3 September 2008

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

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