functionWeibull
Weibull
Extends from Var (prototype for variate generation functions).
Information
Weibull
Weibull probability distribution function.
Syntax
Weibull(g,alpha,beta)
Description
Generates a random variate following the Weibull probability distribution, with parameters alpha and beta.
The pseudo-code algorithm used for this distribution is:
1. Generate u as U(0,1)
2. Return x = alpha*((-ln(1-u))^(1/beta))
Examples
(u,g) := Weibull(g,0.4,0.8);
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Generator | g (from Var) | Random number generator | |
| Real | a (from Var) | 0 | First parameter of the prob. distribution |
| Real | b (from Var) | 0 | Second parameter of the prob. distribution |
| Real | c (from Var) | 0 | Third parameter of the prob. distribution (only for the Johnson and Triangular distributions) |
| Real | d (from Var) | 0 | Fourth parameter of the prob. distribution (only for the Johnson distribution) |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x (from Var) | Generated random variate | |
| Generator | gout (from Var) | Updated random number generator |