In structural engineering we have to accept the fact that you can never be exactly sure how much load a structural member can resist, that the load carrying capability of an element is not one exact value but distributed with some probability distribution function (quality of laid concrete, for example, is quite dependent on many conditions on the worksite, such as the workers skill, etc.). The same goes for structural loads. Therefore we cannot say with absolute certainty whether some structural is stable, we can only calculate certain probabilities.
In the image below, the left curve represents the probability density of the possible loads, and the one of the right represents the probability density of the load carrying capacity of some structural element. The y-axis is the probability density, and the x-axis is the structural load. The red area where the curves overlap is a range of loads where structural failure is possible; before that range there is "zero" possibility of capacity being that low, therefore the capacity must be higher than any possible load (failure is defined as a scenario where the load is greater than the capacity). Beyond this range the load has "zero" possibility of being higher than the capacity therefore no chance of failure.
The actual probability of failure can be calculated as follows, according to Wikipedia:
$${\displaystyle P_{f}=\int _{0}^{\infty }F_{R}(s)f_{s}(s)\,ds\qquad \mathrm {} }$$
where $F_R(s)$ is the probability the cumulative distribution function of resistance/capacity (R) and $f_s(s)$ is the probability density of load (S).
I have hard time understanding why the above formula gives the probability of failure. This is supposed to give the probability of the load being higher than the capacity/resistance, but I just can't wrap my head around how that works. Could somebody explain this to me in more detail? I am familiar with probability distribution functions and cumulative distribution functions, but I don't understand what's happening here. Why do you take the cumulative function of the load resistance but the probability density function of the load?