Given $X\sim \text{Weibull}(\lambda,k)$, generate samples from the Weibull distribution using the inverse transform.
We know $F_X(x) = 1-\text{e}^{-(x/\lambda)^k}$ for $x\ge 0$ with $\lambda,k > 0$.
cumulative distribution functionquantilesweibull distribution
Given $X\sim \text{Weibull}(\lambda,k)$, generate samples from the Weibull distribution using the inverse transform.
We know $F_X(x) = 1-\text{e}^{-(x/\lambda)^k}$ for $x\ge 0$ with $\lambda,k > 0$.
Best Answer
Start with the CDF, replace $F_X(x)$ with $U\sim U(0,1)$, $X$ for $x$, and solve for $X$.
$$\begin{align} U &= 1-\text{e}^{-(X/\lambda)^k} \\ 1-U &=\text{e}^{-(X/\lambda)^k} \\ -\text{ln}(1-U) &= \left(\frac{X}{\lambda}\right)^k \\ \left[-\text{ln}(1-U)\right]^{\frac{1}{k}} &= \frac{X}{\lambda} \\ X &= \lambda\left[-\text{ln}(1-U)\right]^{\frac{1}{k}} \quad \quad \square \end{align}$$