class reliability.Reliability_testing.reliability_test_duration(MTBF_required, MTBF_design, consumer_risk, producer_risk, one_sided=True, time_terminated=True, show_plot=True, print_results=True)

This function calculates the required duration for a reliability test to achieve the specified producers and consumers risks. This is done based on the specified MTBF required and MTBF design. For details please see the algorithm.

  • MTBF_required (float, int) – The required MTBF that the equipment must demonstrate during the test.

  • MTBF_design (float, int) – The design target for the MTBF that the producer aims to achieve.

  • consumer_risk (float) – The risk the consumer is accepting. This is the probability that a bad product will be accepted as a good product by the consumer.

  • producer_risk (float) – The risk the producer is accepting. This is the probability that a good product will be rejected as a bad product by the consumer.

  • one_sided (bool, optional) – The risk is analogous to the confidence interval, and the confidence interval can be one sided or two sided. Default = True.

  • time_terminated (bool, optional) – Whether the test is time terminated or failure terminated. Typically it will be time terminated if the required test duration is sought. Default = True

  • show_plot (bool) – If True, this will create a plot of the risk vs test duration. Default = True.

  • print_results (bool, optional) – If True, this will print the results to the console. Default = True.


test_duration (float) – The required test duration to meet the input parameters.


The number of failures allowed is calculated but not provided by this function since the test will determine the actual number of failures so any prediction of number of failures ahead of time is not practical.

If the plot does not show automatically, use to show it.