# Weibull distribution

1. Mar 30, 2016

### squenshl

1. The problem statement, all variables and given/known data
The Weibull distribution is used frequently as a lifetime distribution and is so is used a lot in survival analysis. It can be parameterised as:$f(x;\lambda,k) = \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}e^{-\left(\frac{x}{\lambda}\right)^k}$ for $x\geq 0$ & $0$ for $x < 0$, where $k > 0$ is called the shape parameter and $\lambda > 0$ is called the scale parameter of the distribution.

I have shown that it is a PDF, found the CDF, median value, Variance & failure rate. My question is how would I describe how you would generate random observations from a $\text{Weibull}(k,\lambda)$ distribution from random $\text{Uniform}(0,1)$ observations.

2. Relevant equations

3. The attempt at a solution

2. Mar 30, 2016

### andrewkirk

Hmm. This is something that would usually just be taught, rather than asking the student to derive it, as the answer is not terribly obvious.
I'll try to give a hint that doesn't give the whole thing away.
The desired random variable W will be a function of U where U is a Uniform[0,1] random variable.
Can you think of a suitable function to use that will have the desired properties, given the functions you have worked out above and their properties, including domain and range?

3. Mar 30, 2016

### Ray Vickson

Google "Generation of random variable" or "...random variate".

4. Mar 30, 2016

### squenshl

Oh right. I used the CDF of the Weibull distribution and noted that if $U$ is Uniform, then so is $1-U$ to get the desired result.