Main Content

wblinv

Weibull inverse cumulative distribution function

Syntax

X = wblinv(P,A,B)
[X,XLO,XUP] = wblinv(P,A,B,PCOV,alpha)

Description

X = wblinv(P,A,B)returns the inverse cumulative distribution function (cdf) for a Weibull distribution with scale parameterAand shape parameterB, evaluated at the values inP.P,A, andBcan be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array of the same size as the other inputs. The default values forAandBare both1.

[X,XLO,XUP] = wblinv(P,A,B,PCOV,alpha)returns confidence bounds forXwhen the input parametersAandBare estimates.PCOVis a 2-by-2 matrix containing the covariance matrix of the estimated parameters.alphahas a default value of 0.05, and specifies 100(1 -alpha)% confidence bounds.XLOandXUPare arrays of the same size asXcontaining the lower and upper confidence bounds.

The functionwblinvcomputes confidence bounds forXusing a normal approximation to the distribution of the estimate

log a ^ + log q b ^

whereqis thePth quantile from a Weibull distribution with scale and shape parameters both equal to 1. The computed bounds give approximately the desired confidence level when you estimatemu,sigma, andPCOVfrom large samples, but in smaller samples other methods of computing the confidence bounds might be more accurate.

The inverse of the Weibull cdf is

x = F 1 ( p | a , b ) = a [ ln ( 1 p ) ] 1 / b .

Examples

The lifetimes (in hours) of a batch of light bulbs has a Weibull distribution with parametersa=200and b =6.

Find the median lifetime of the bulbs:

life = wblinv(0.5, 200, 6) life = 188.1486

Generate 100 random values from this distribution, and estimate the 90th percentile (with confidence bounds) from the random sample

x = wblrnd(200,6,100,1); p = wblfit(x) [nlogl,pcov] = wbllike(p,x) [q90,q90lo,q90up] = wblinv(0.9,p(1),p(2),pcov) p = 204.8918 6.3920 nlogl = 496.8915 pcov = 11.3392 0.5233 0.5233 0.2573 q90 = 233.4489 q90lo = 226.0092 q90up = 241.1335

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

版本历史

Introduced before R2006a