stress_strength
- class reliability.Other_functions.stress_strength(stress, strength, show_plot=True, print_results=True, warn=True)
Given the probability distributions for stress and strength, this module will find the probability of failure due to stress-strength interference. Failure is defined as when stress>strength. The calculation is achieved using numerical integration.
- Parameters:
stress (object) – A probability distribution from the Distributions module
strength (object) – A probability distribution from the Distributions module
show_plot (bool, optional) – If True the distribution plot will be shown. Default = True.
print_results (bool, optional) – If True, the results will be printed to console. Default = True.
warn (bool, optional) – A warning will be issued if both stress and strength are Normal as you should use stress_strength_normal. You can supress this using warn=False A warning will be issued if the median stress > median strength as the user may have assigned the distributions to the wrong variables. You can supress this using warn=False. Default = True.
- Returns:
probability_of_failure (float) – The probability of failure due to stress-strength interference
Notes
Example usage:
from reliability.Distributions import Weibull_Distribution, Gamma_Distribution stress = Weibull_Distribution(alpha=2,beta=3,gamma=1) strength = Gamma_Distribution(alpha=2,beta=3,gamma=3) stress_strength(stress=stress, strength=strength)
A warning will be issued if probability_of_failure > 1. This can occur when one of the distributions asymptotes. This warning can not be supressed.