![]() |
![]() |
|
PLS_Toolbox Documentation: raydf | < paretodf | tdf > |
raydf
Purpose
Rayleigh distribution.
Synopsis
prob = raydf(function,x,a)
Description
Estimates cumulative distribution function (cumulative, cdf), probability density function (density, pdf), quantile (inverse of cdf), or random numbers for a Rayleigh distribution.
This distribution is commonly used to model lifetime data (time to failure). It is skewed to the right and the variance is usually larger than the mean (though it can be smaller or equal). Negative values in the sample are ignored.
INPUTS:
Note: If inputs (x and a) 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 = raydf('c',2,1)
prob =
0.8647
>> x = [0:0.1:10];
>> plot(x,raydf('c',x,1),'b-',x,raydf('c',x,3),'r-')
Density:
>> prob = raydf('d',2,1)
prob =
0.2707
>> x = [0:0.1:10];
>> plot(x,raydf('d',x,2),'b-',x,raydf('d',x,0.5),'r-')
Quantile:
>> prob = raydf('q',0.5,1)
prob =
1.1774
Random:
>> prob = raydf('r',[4 1],2)
ans =
4.2135
3.3893
2.2085
0.3865
See Also
betadf, cauchydf, chidf, expdf, gammadf, gumbeldf, laplacedf, lognormdf, logisdf, normdf, paretodf, triangledf, unifdf, weibulldf
< paretodf | tdf > |