Appendix A: Generating Random Numbers from a Distribution
Jump to navigation
Jump to search
Simulation involves generating random numbers that belong to a specific distribution. We will illustrate this methodology using the Weibull distribution.
Generating Random Times from a Weibull Distribution
The [math]\displaystyle{ cdf }[/math] of the 2-parameter Weibull distribution is given by,
- [math]\displaystyle{ F(T)=1-{{e}^{-{{\left( \tfrac{T}{\eta } \right)}^{\beta }}}}. }[/math]
The Weibull reliability function is given by,
- [math]\displaystyle{ \begin{align} R(T)= & 1-F(t) \\ = & {{e}^{-{{\left( \tfrac{T}{\eta } \right)}^{\beta }}}}. \end{align} }[/math]
To generate a random time from a Weibull distribution, with a given [math]\displaystyle{ \eta }[/math] and [math]\displaystyle{ \beta }[/math] a uniform random number from 0 to 1, [math]\displaystyle{ {{U}_{R}}[0,1] }[/math] , is first obtained. The random time from a weibull distribution is then obtained from:
- [math]\displaystyle{ {{T}_{R}}=\eta \cdot {{\left\{ -\ln \left[ {{U}_{R}}[0,1] \right] \right\}}^{\tfrac{1}{\beta }}}. }[/math]
Conditional
The Weibull conditional reliability function is given by,
- [math]\displaystyle{ R(T,t)=\frac{R(T+t)}{R(T)}=\frac{{{e}^{-{{\left( \tfrac{T+t}{\eta } \right)}^{\beta }}}}}{{{e}^{-{{\left( \tfrac{T}{\eta } \right)}^{\beta }}}}}, }[/math]
or,