Main Content

wblstat

Weibull mean and variance

Description

m = wblstat(a,b) returns the mean of the Weibull distribution defined by the scale parameter a and shape parameter b.

[m,v] = wblstat(a,b) also returns the variance for the distribution.

example

Examples

collapse all

Compute the mean and variance of a Weibull distribution with the scale parameter a and shape parameter b.

a = 3;
b = 4;
[mean,variance] = wblstat(a,b)
mean = 
2.7192
variance = 
0.5820

Input Arguments

collapse all

Scale parameter, specified as a positive scalar value or an array of positive scalar values. If both a and b are arrays, they must be the same size. If either a or b is a scalar, then wblstat expands the scalar argument into a constant array of the same size as the other argument.

Data Types: single | double

Shape parameter, specified as a positive scalar value or an array of positive scalar values. If both a and b are arrays, they must be the same size. If either a or b is a scalar, then wblstat expands the scalar argument into a constant array of the same size as the other argument.

Data Types: single | double

Output Arguments

collapse all

Mean for the Weibull distribution, returned as a numeric scalar or an array of numeric scalars. m is the same size as a and b. Each element in m is the mean of the Weibull distribution specified by the corresponding elements in a and b. If a(i) or b(i) is less than or equal to zero, then m(i) is NaN.

The mean of the Weibull distribution with parameters a and b is

a[Γ(1+b1)]

Variance for the Weibull distribution, returned as a numeric scalar or an array of numeric scalars. v is the same size as a and b. Each element in v is the variance of the Weibull distribution specified by the corresponding elements in a and b. If a(i) or b(i) is less than or equal to zero, then v(i) is NaN.

The variance of the Weibull distribution with parameters a and b is

a2[Γ(1+2b1)Γ(1+b1)2]

Extended Capabilities

expand all

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

Version History

Introduced before R2006a