Logisdf
Contents |
Purpose
Logistic distribution.
Synopsis
- prob = logisdf(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 Logistic distribution.
This distribution is a common alternative to the normal distribution. It is symmetric and many times used when data represents midpoints of interval data (data collected in such a way that a range instead or an exact value is collected). The variance may be smaller, equal, or larger than the mean for this 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 = mean parameter (real).
- b = standard deviation 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 = logisdf('c',0.99,1,2) prob = 0.4988 >> x = [0:0.1:10]; >> plot(x,logisdf('c',x,1,2),'b-',x,logisdf('c',x,3,.5),'r-')
Density
>> prob = logisdf('d',0.99,1,2) prob = 0.1250 >> x = [0:0.1:10]; >> plot(x,logisdf('d',x,2,1),'b-',x,logisdf('d',x,0.5,1),'r-')
Quantile
>> prob = logisdf('q',0.99,1,2) prob = 10.1902
Random
>> prob = logisdf('r',[4 1],2,1) ans = 0.4549 0.4638 0.3426 0.5011
See Also
betadf, cauchydf, chidf, expdf, gammadf, gumbeldf, laplacedf, lognormdf, normdf, paretodf, raydf, triangledf, unifdf, weibulldf