CDF with probability and Weibull

A bakers oven may be out of use due for two reasons. With probability 0.8 the oven will be damaged from dirt and it will take exactly 5 minutes to repair it. With probability 0.2 the oven will need major repairs and repair time will follow a Weibull distribution with parameters with α = 6 and β = 0.5.

a) If X is the repair time of the next failure, find the cumulative distribution of X. b) Outline an inversion method to generate the failure times.

I am confused with the above problem for a I tried to generate the cdf by using the weibull cdf and adding the probabilities and arrived at:

$$F(x)=0$$ for $$x<1-e^-(\frac{x}{6})^{0.5}$$

$$F(x)=0.2$$ for $$1-e^-(\frac{x}{6})^{0.5}

$$F(x)=1$$ for $$5

But I am not sure if this is right and then I also am not sure how to use the inversion method on a 3 tier function. Any help would be appreciated!

Correction: the CDF is $$F=1-\exp\sqrt{x/6}$$ for $$x\ge 0$$ and $$0$$ otherwise. (Look up the usual Weibull CDF wherever you prefer, or integrate it's pdf.)I don't know how you got your answer, but any piecewise formula for the CDF add a function of $$x$$ shouldn't transition at $$x$$-dependent values. I'll leave you to express $$x$$ as a function of $$F$$.

• Should we end up with $F(x)=4x+0.2(1-e^-(\frac{x}{6})^0.5)$ as the cdf for $x>=0$ and $F(x)=0$ otherwise as the cdf then? – Mackie Oct 29 '18 at 19:20
• @Mackie The thing you need to multiply by $0.8$ isn't $5x$; it's $1$ for $x\ge 5$, $0$ otherwise. The easiest way to sample is to first randomly pick whether to return $5$ or a Weibull sample. – J.G. Oct 29 '18 at 20:06
• How do we arrive at the cdf being $1−exp(-sqrt(x/6))$ from multiplying 1 by 0.8? – Mackie Oct 29 '18 at 20:20
• $F(x)=0.8-0.2exp(sqrt(x/6))$? – Mackie Oct 29 '18 at 21:13