• We are pleased to announce that the winner of our Feedback Prize Draw for the Winter 2024-25 session and winning £150 of gift vouchers is Zhao Liang Tay. Congratulations to Zhao Liang. If you fancy winning £150 worth of gift vouchers (from a major UK store) for the Summer 2025 exam sitting for just a few minutes of your time throughout the session, please see our website at https://www.acted.co.uk/further-info.html?pat=feedback#feedback-prize for more information on how you can make sure your name is included in the draw at the end of the session.
  • Please be advised that the SP1, SP5 and SP7 X1 deadline is the 14th July and not the 17th June as first stated. Please accept out apologies for any confusion caused.

How did the author arrive at the equation for reverse weibull and quantile functions?

vidhya36

Very Active Member
In page 22 of chapter 6, I see a R snippet stating, we can define the aforementioned functions from first principles and the author went on to put up the equations.

rweibull: (log(1-runif(n))/c) ^ (1/g)
qweibull: (log(1-p)/c) ^ (1/g)

I understand the other two pweibull and dweibull.
(I understand runiform gives samples from uniform distribution. I just need to understand the concept here as how he/she arrived at this.)
If any one can guide me to a source or help me understand the derivation, it would be great.

TIA
 
One way of generating a random sample from a distribution is to generate a random sample from a Uniform(0,1) distribution and put those numbers into the inverse of the required CDF. (The CDF has range 0->1 and the inverse of the CDF takes the values in that range generated by the random Uniform sample and turns it into a random sample from the required distribution). To read more about it see the following link:

https://en.wikipedia.org/wiki/Inverse_transform_sampling

Hence the rweibull is taking a random sample from the Uniform distribution and putting into the inverse of the Weibull CDF (rearrange the CDF to get in terms of x). That being said, I think it should be dividing by minus c not just c (or put the minus somewhere else in that step).

The q function is similar in that it is also using the inverse of the CDF. The CDF takes a number c and turns it into the probability P(X <= c). The q function takes probabilities and outputs the value of c, i.e. it is just the inverse of the Weibull CDF. However I think that again a minus sign is missing.
 
Back
Top