Gumbeldf: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Bob |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Gumbel distribution. | Gumbel distribution. | ||
===Synopsis=== | ===Synopsis=== | ||
:prob = gumbeldf(function,x,a,b) | :prob = gumbeldf(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 Gumbel distribution. | Estimates cumulative distribution function (cumulative, cdf), probability density function (density, pdf), quantile (inverse of cdf), or random numbers for a Gumbel distribution. | ||
This distribution is also known as the Type I extreme value distribution. It is an alternative to the Weibull distribution. | This distribution is also known as the Type I extreme value distribution. It is an alternative to the Weibull distribution. | ||
==== | ::<math>f(x) = \frac { \Gamma \left [ \frac {a+b} {2} \right ] \left ( a/b \right )^{a/2} x^{\left ( a-2 \right ) /2}} {\Gamma \left ( \frac {a} {2} \right ) \Gamma \left ( \frac {b} {2} \right ) \left [ 1+ \frac {a} {b} x \right ] ^{\left ( a+b \right )/2}}</math> | ||
====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=random - vector indicating the size of the random matrix to create. | |||
* '''a''' = mode/location parameter (real). | * '''a''' = mode/location parameter (real). | ||
* '''b''' = scale parameter (real and positive). | * '''b''' = scale 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==== | |||
<pre> | |||
>> prob = gumbeldf('c',0.99,0.5,1) | >> prob = gumbeldf('c',0.99,0.5,1) | ||
prob = | prob = | ||
Line 23: | Line 40: | ||
>> x = [0:0.1:10]; | >> x = [0:0.1:10]; | ||
>> plot(x,gumbeldf('c',x,2),'b-',x,gumbeldf('c',x,0.5),'r-') | >> plot(x,gumbeldf('c',x,2),'b-',x,gumbeldf('c',x,0.5),'r-') | ||
====Density | </pre> | ||
====Density==== | |||
<pre> | |||
>> prob = gumbeldf('d',0.99,0.5,1) | >> prob = gumbeldf('d',0.99,0.5,1) | ||
prob = | prob = | ||
Line 29: | Line 48: | ||
>> x = [0:0.1:10]; | >> x = [0:0.1:10]; | ||
>> plot(x,gumbeldf('d',x,2),'b-',x,gumbeldf('d',x,0.5),'r-') | >> plot(x,gumbeldf('d',x,2),'b-',x,gumbeldf('d',x,0.5),'r-') | ||
====Quantile | </pre> | ||
====Quantile==== | |||
<pre> | |||
>> prob = gumbeldf('q',0.99,0.5,1) | >> prob = gumbeldf('q',0.99,0.5,1) | ||
prob = | prob = | ||
5.1001 | 5.1001</pre> | ||
====Random | |||
====Random==== | |||
<pre> | |||
>> prob = gumbeldf('r',[4 1],2,1) | >> prob = gumbeldf('r',[4 1],2,1) | ||
ans = | ans = | ||
Line 40: | Line 63: | ||
2.3566 | 2.3566 | ||
4.2479 | 4.2479 | ||
</pre> | |||
===See Also=== | ===See Also=== | ||
[[ | |||
[[betadf]], [[cauchydf]], [[chidf]], [[expdf]], [[gammadf]], [[laplacedf]], [[logisdf]], [[lognormdf]], [[normdf]], [[paretodf]], [[raydf]], [[triangledf]], [[unifdf]], [[weibulldf]] |
Latest revision as of 06:15, 10 October 2008
Purpose
Gumbel distribution.
Synopsis
- prob = gumbeldf(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 Gumbel distribution.
This distribution is also known as the Type I extreme value distribution. It is an alternative to the Weibull distribution.
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 = mode/location parameter (real).
- b = scale 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 = gumbeldf('c',0.99,0.5,1) prob = 0.5419 >> x = [0:0.1:10]; >> plot(x,gumbeldf('c',x,2),'b-',x,gumbeldf('c',x,0.5),'r-')
Density
>> prob = gumbeldf('d',0.99,0.5,1) prob = 0.3320 >> x = [0:0.1:10]; >> plot(x,gumbeldf('d',x,2),'b-',x,gumbeldf('d',x,0.5),'r-')
Quantile
>> prob = gumbeldf('q',0.99,0.5,1) prob = 5.1001
Random
>> prob = gumbeldf('r',[4 1],2,1) ans = 3.8437 2.6508 2.3566 4.2479
See Also
betadf, cauchydf, chidf, expdf, gammadf, laplacedf, logisdf, lognormdf, normdf, paretodf, raydf, triangledf, unifdf, weibulldf