I want to make some sort of reliability model of a system. Where stochastics are added to model unexpected failure of components. To do this I want to sample from a Weibul probability density function.
The pdf is a Weibull distribution is of the form $f(t) = \beta\eta^{-\beta}(t)^{\beta-1}\text{exp}(-(\frac{t}{\eta})^\beta$.
Where the probability of failure in a given interval can be computed by:
$$P_f(t) = \displaystyle\int_{t0}^{t1} f(\tau) \text{d}\tau = -\text{exp}(-(\frac{t}{\eta})^\beta) \Big|_{t0}^{t1}$$
Let's assume we take 100 intervals of equal length, each interval gives a small probability of failure. Now I want to sample from this distribution where either nothing happens or the component fails.
I tried this by sampling from a uniform distribution and checking if the given random number is smaller than the probability of failure in that interval. I did this in Matlab, and when I run this for 10k iterations, the number of failed components in each interval follows the the shape of the pdf. However, many components (roughly 1/3) make it through the 100 intervals, which is not expected as the area under the pdf sums to 1. So after 100 intervals, basically 99% of the components should have failed.
So I'm thinking the way I model random failures of components is not valid. Does anybody have a better idea on how to tackle this problem?