How to generate random failure time conditional to a lower bound

For my Monte Carlo simulation (job related) I needed to generate random numbers with conditional probability of related distribution. (example: given that an item has been working for 1200 hours, generating a proper random failure time related to its time-to-failure distribution.)

I searched the web and couldn't find a formula or process to generate this kind of dataset.

In my case I am only interested in 2 distributions:

1. exponential
2. weibull

Question 1: My opinion for exponential is "Since exponential distribution has memoryless property then generating random number with conditional probability is still same as generating random number without any condition."

Am I right?

Question 2: I couldn't find any source for weibull distribution. Can you please help me on how to generate weibull random number with conditional probability.

If I understand correctly, you are correct concerning exponential distribution: the failure time $T$, conditional to $T > t_1$, is $t_1 + T'$ with $T' \sim \mathcal E(\lambda)$.
Weibull distribution has the property (which may be used as a definition) that $$Pr( T > t ) = e^{-\left( {t\over \lambda} \right)^k}.$$ Thus, the distribution of the failure time conditional to $T > t_1$ verifies $$Pr( T > t_1 + t | T > t_1) = e^{ -{1\over \lambda^k}\left( (t_1+t)^k - t_1^k\right) }.$$ You can generate $T$ as $t_1 + T'$ with $T'$ having the above distribution. This can be done by inverse transform sampling.
Concretely, if $U$ is uniform on $(0,1)$, let $T' = F^{-1}(U)$ with $F(t) = 1-e^{ -{1\over \lambda^k}\left( (t_1+t)^k - t_1^k\right) }$, that is $$T' = \left(t_1^k - \lambda^k \log(1-U) \right)^{1\over k} - t_1,$$ where $\log$ is the natural logarithm. You can simplify this by noting that $U$ and $1-U$ have the same distribution so $\log U$ will do it.
• thank you so much for your quick and detailed help Elvis. $\log U$ is I think $\ln U$ with base e; right? May 22 '17 at 8:34
• You can test the formula by generating samples 1) using the formula, and 2) using rejection sampling (generate many $T$ values and keep only values above $t_1$). Compare the two samples with e.g. a qq-plot. Good luck! May 22 '17 at 8:54
{"ft_lang_label":"__label__en","ft_lang_prob":0.8997622,"math_prob":0.9991444,"size":843,"snap":"2022-05-2022-21","text_gpt3_token_len":166,"char_repetition_ratio":0.13945173,"word_repetition_ratio":0.0,"special_character_ratio":0.18979834,"punctuation_ratio":0.08450704,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9997632,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-01-21T00:53:52Z\",\"WARC-Record-ID\":\"<urn:uuid:cbf34f9a-17f8-4ea7-b057-c520a4e7a774>\",\"Content-Length\":\"140811\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:28c70885-776b-4d51-be4f-498889067e37>\",\"WARC-Concurrent-To\":\"<urn:uuid:c2de2bb9-960d-4c8f-9872-c15f85a9af5b>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://stats.stackexchange.com/questions/280925/how-to-generate-random-failure-time-conditional-to-a-lower-bound\",\"WARC-Payload-Digest\":\"sha1:OS3OK7UQGEG2HPPIR37X5A7ZN5XCZCBS\",\"WARC-Block-Digest\":\"sha1:DQXSS4R34QFHRPIURG5FLQMUFBP63HFO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-05/CC-MAIN-2022-05_segments_1642320302706.62_warc_CC-MAIN-20220120220649-20220121010649-00620.warc.gz\"}"}