Logisdf: Difference between revisions
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Logistic distribution. | Logistic distribution. | ||
===Synopsis=== | ===Synopsis=== | ||
:prob = logisdf(function,x,a,b) | :prob = logisdf(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 Logistic distribution. | 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. | 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==== | ====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''' = mean parameter (real). | * '''a''' = mean parameter (real). | ||
* '''b''' = standard deviation parameter (real and positive). | * '''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''': 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 = logisdf('c',0.99,1,2) | >> prob = logisdf('c',0.99,1,2) | ||
prob = | prob = | ||
0.4988 | 0.4988 | ||
>> x = [0:0.1:10]; | >> x = [0:0.1:10]; | ||
>> plot(x,logisdf('c',x,1,2),'b-',x,logisdf('c',x,3,.5),'r-') | >> plot(x,logisdf('c',x,1,2),'b-',x,logisdf('c',x,3,.5),'r-') | ||
====Density:==== | ====Density:==== | ||
>> prob = logisdf('d',0.99,1,2) | >> prob = logisdf('d',0.99,1,2) | ||
prob = | prob = | ||
0.1250 | 0.1250 | ||
>> x = [0:0.1:10]; | >> x = [0:0.1:10]; | ||
>> plot(x,logisdf('d',x,2,1),'b-',x,logisdf('d',x,0.5,1),'r-') | >> plot(x,logisdf('d',x,2,1),'b-',x,logisdf('d',x,0.5,1),'r-') | ||
====Quantile:==== | ====Quantile:==== | ||
>> prob = logisdf('q',0.99,1,2) | >> prob = logisdf('q',0.99,1,2) | ||
prob = | prob = | ||
10.1902 | 10.1902 | ||
====Random:==== | ====Random:==== | ||
>> prob = logisdf('r',[4 1],2,1) | >> prob = logisdf('r',[4 1],2,1) | ||
ans = | ans = | ||
0.4549 | 0.4549 | ||
0.4638 | 0.4638 | ||
0.3426 | 0.3426 | ||
0.5011 | 0.5011 | ||
===See Also=== | ===See Also=== | ||
[[betadr]], [[cauchydf]], [[chidf]], [[expdf]], [[gammadf]], [[gumbeldf]], [[laplacedf]], [[lognormdf]], [[normdf]], [[paretodf]], [[raydf]], [[triangledf]], [[unifdf]], [[weibulldf]] | [[betadr]], [[cauchydf]], [[chidf]], [[expdf]], [[gammadf]], [[gumbeldf]], [[laplacedf]], [[lognormdf]], [[normdf]], [[paretodf]], [[raydf]], [[triangledf]], [[unifdf]], [[weibulldf]] |
Revision as of 15:25, 3 September 2008
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
betadr, cauchydf, chidf, expdf, gammadf, gumbeldf, laplacedf, lognormdf, normdf, paretodf, raydf, triangledf, unifdf, weibulldf