3
$\begingroup$

If $X$ is uniformly distributed on $(0,1)$, then the random variable $ \lambda(-\ln(1-X))^{1/k}\ $, is Weibull distributed with parameters $k$ and $\lambda$.

With this, I can get random numbers distributed weibull from a uniform random number generator.

but if I have a translated Weibull distribution

$ f(x, k, \lambda, \theta) = \frac{k}{\lambda} (\frac{x-\theta}{\lambda})^{k-1} \exp^{-(\frac{x-\theta}{\lambda})^k} $

how is the transformation to generate random numbers distributed like a translated weibull from a generator of uniform random numbers ?

EDIT

the question it's not about the density function, it about of the transformation. How I can generate random numbers distributed like a translated weibull ? (using a uniform random number generator)

$\endgroup$
6
  • $\begingroup$ It seems that you are saying you know how to generate values of $X-\theta$ and you wish to have a set of values of $X$ instead. In other words, given any realization $x_i-\theta$ you need a formula for $x_i$ in terms of $x_i-\theta$ and $\theta$. Is this correct? $\endgroup$
    – whuber
    Commented Feb 18, 2014 at 19:06
  • $\begingroup$ @whuber I can generate random numbers with an uniform distribution, and with the transformation ($ \lambda(-\ln(1-X))^{1/k}\ $) exposed in the question, therefore I can change the distribution of the numbers to a Weibull distribution ( $[0, \inf)$). how I can change the distribution of the randon numbers uniformely distributed to random numbers distributed like a translated weibull distribution ( $[\theta, \inf)$ ). $\endgroup$
    – Gabriel
    Commented Feb 18, 2014 at 19:50
  • 1
    $\begingroup$ Have you noticed that to convert $x-\theta$ to $x$ you only need to add $\theta$? $\endgroup$
    – whuber
    Commented Feb 18, 2014 at 19:52
  • $\begingroup$ @whuber , the question it's not about the density function, it about of the transformation. How I can generate random numbers distributed like a translated weibull ? (using a uniform random number generator). $\endgroup$
    – Gabriel
    Commented Feb 18, 2014 at 20:01
  • 1
    $\begingroup$ To expand on @whuber's comment / answer, let $y = x - \theta$. $y$ then has a standard Weibull distribution; you can see this by substituting $y$ for $x-\theta$ in your formula for $f(\dots)$. You can generate $y$ as you describe above, then get back to $x$ by adding $\theta$. $\endgroup$
    – jbowman
    Commented Feb 18, 2014 at 20:11

1 Answer 1

5
$\begingroup$

What the commenters are saying is this:

If $T$ is your translated Weibull, then you can generate variates $t_i$ from the translated Weibull with the following: $$t_i = \theta + \lambda(-\ln(1-x_i))^{1/k}\ ,$$ where the $x_i$ are your uniform random numbers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.