The following R-code may be used for computing likelihood based confidence intervals when adding two random variables.

**A practical example**

A device is known to fail due to material cracks. The failure time for this device is obtained by summing the onset time *(X)* and growth time *(Y)* of the cracks. Both *X* and *Y* are random variables and are assumed to follow a Weibull distribution.

What is the failure time when the probability of failure for *X+Y* is less than, say, 0.1%? Stated differently, when observing both the onset and growth times of the material cracks, what is the time at which a proportion of .001 of these devices will have failed? This time corresponds to the .001 quantile.

The method for computing likelihood based confidence intervals for these quantiles is similar to the one that was used in this blog post. That post discusses how to sum random variables and also demonstrates how to compute likelihood based confidence intervals for cumulative probabilities.