Accelerating the pace of engineering and science

# wblcdf

Weibull cumulative distribution function

## Syntax

p = wblcdf(x,a,b)
[p,plo,pup] = wblcdf(x,a,b,pcov,alpha)
[p,plo,pup] = wblcdf(___,'upper')

## Description

p = wblcdf(x,a,b) returns the cdf of the Weibull distribution with scale parameter a and shape parameter b, at each value in x. x, a, and b can 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 for a and b are both 1. The parameters a and b must be positive.

[p,plo,pup] = wblcdf(x,a,b,pcov,alpha) returns confidence bounds for p when the input parameters a and b are estimates. pcov is the 2-by-2 covariance matrix of the estimated parameters. alpha has a default value of 0.05, and specifies 100(1 - alpha)% confidence bounds. plo and pup are arrays of the same size as p containing the lower and upper confidence bounds.

[p,plo,pup] = wblcdf(___,'upper') returns the complement of the Weibull cdf for each value in x, using an algorithm that more accurately computes the extreme upper tail probabilities. You can use 'upper' with any of the previous syntaxes.

The function wblcdf computes confidence bounds for p using a normal approximation to the distribution of the estimate

$\stackrel{^}{b}\left(\mathrm{log}x-\mathrm{log}\stackrel{^}{a}\right)$

and then transforms those bounds to the scale of the output p. The computed bounds give approximately the desired confidence level when you estimate mu, sigma, and pcov from large samples, but in smaller samples other methods of computing the confidence bounds might be more accurate.

The Weibull cdf is

$p=F\left(x|a,b\right)={\int }_{0}^{x}b{a}^{-b}{t}^{b-1}{e}^{-{\left(\frac{t}{a}\right)}^{b}}dt=1-{e}^{-{\left(\frac{x}{a}\right)}^{b}}{I}_{\left(0,\infty \right)}\left(x\right)$

## Examples

expand all

### Weibull Distribution cdf

What is the probability that a value from a Weibull distribution with parameters a = 0.15 and b = 0.8 is less than 0.5?

`probability = wblcdf(0.5, 0.15, 0.8)`
```probability =
0.9272```

How sensitive is this result to small changes in the parameters?

```[A, B] = meshgrid(0.1:0.05:0.2,0.2:0.05:0.3);
probability = wblcdf(0.5, A, B)```
```probability =
0.7484  0.7198  0.6991
0.7758  0.7411  0.7156
0.8022  0.7619  0.7319```