Cauchydf: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy No edit summary |
imported>Bob |
||
Line 24: | Line 24: | ||
: An application of the Cauchy distribution is in software testing where it is necessary to use datasets which contain a few extreme values which might trigger some adverse reaction. | : An application of the Cauchy distribution is in software testing where it is necessary to use datasets which contain a few extreme values which might trigger some adverse reaction. | ||
::<math>f(x) = \left \{ \pi b \left [ 1+ \left ( \frac {x-a} {b} \right )^2 \right ] \right \}^{-1}</math> | |||
::<math>F(x) = \frac {1} {2} + \frac {1} {\pi} arctan \left ( \frac {x-a} {b} \right )</math> | |||
====Inputs==== | ====Inputs==== |
Latest revision as of 04:57, 10 October 2008
Purpose
Cauchy distribution.
Synopsis
- prob = cauchydf(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 Cauchy distribution.
This distribution is equivalent to a t-distribution with zero degrees of freedom and is symmetric.
From: [[1]]
- The Cauchy distribution is a symmetrical, and to use a technical term, heavy tailed. Heavy tailed means that a high proportion of the population is comprised of extreme values.
- There is no analytical definition of moment based properties (e.g. mean, variance etc.) thus the parameters are typically described as the location parameter and a scale factor. The most easily derived property is the median for this reason and for consistency with the rest of the site, the parameters have been defined as the median and a scale factor.
- The moment based properties derived from a set of random numbers do not provide any useful information on the properties of the distribution.
- The Cauchy distribution is also known as the Lorentzian Distribution.
- An application of the Cauchy distribution is in software testing where it is necessary to use datasets which contain a few extreme values which might trigger some adverse reaction.
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 = median or location parameter (real).
- b = scale parameter (real and positive). Describes distribution of data around the mode.
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
>> x = [-5:0.1:5]; >> prob = cauchydf('c',x); >> plot(x,prob), vline >> x = [-8:0.1:8]; >> prob = cauchydf('c',x); >> plot(x,prob), vline([0; cauchydf('q',[0.9 0.95])'])
Density
>> prob = cauchydf('d',x); >> plot(x,prob), vline >> x = [-8:0.1:8]; >> prob = cauchydf('d',x); >> plot(x,prob), vline([0; cauchydf('q',[0.9 0.95])'])
Quantile
>> x2 = cauchydf('q',cauchydf('c',x)); >> plot(x,x2,'.'), dp
Random
>> prob = cauchydf('r',[4 1]) prob = 0.0480 -1.0204 5.7400 -0.2175
See Also
betadf, chidf, expdf, gammadf, gumbeldf, laplacedf, logisdf, lognormdf, normdf, paretodf, raydf, triangledf, unifdf, weibulldf