Weibulldf

From Eigenvector Research Documentation Wiki
Revision as of 15:27, 3 September 2008 by imported>Jeremy (Importing text file)
Jump to navigation Jump to search

Purpose

Weibull distribution.

Synopsis

prob = weibulldf(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 Weibull distribution.

This distribution is used to model lifetime data (time to failure). It is skewed to the right, but may appear symmetric for data in which there are relatively no small outcomes. Negative values in the sample are ignored.



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 = scale parameter (real).
  • b = shape 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 = weibulldf('c',2,1,2)

prob =

   0.9817

>> x = [0:0.1:10];

>> plot(x,weibulldf('c',x,1,2),'b-',x,weibulldf('c',x,3,7),'r-')

Density:

>> prob = weibulldf('d',2,1,1)

prob =

   0.1353

>> x = [0:0.1:10];

>> plot(x,weibulldf('d',x,2,1),'b-',x,weibulldf('d',x,0.5,1),'r-')

Quantile:

>> prob = weibulldf('q',0.5,1,2)

prob =

   0.8326

Random:

>> prob = weibulldf('r',[4 1],2,1)

ans =

   5.4812
   4.9755
   1.0562
   4.4820

See Also

betadr, cauchydf, chidf, expdf, gammadf, gumbeldf, laplacedf, logisdf, lognormdf, normdf, paretodf, raydf, triangledf, unifdf