Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # simulating the accelerated life tests
  2.  
  3. for R in reliabilities:
  4.     for n_s in n_samples:
  5.         test_battery = [Device(R) for _ in range(n_s)]
  6.  
  7.         for rep in test_repetitions:
  8.             repetition_passed[rep] = conduct_test(test_battery)
  9.  
  10.         frequency_of_catching_subpar_samples[R][n_s] = 1-np.mean(repetition_passed)
  11.  
  12.  
  13.  
  14. print("Confidence level of detecting fact that population shows reliability of <R given n_s samples is")
  15.        
  16. def print_summary(R, n_s):
  17.     print("R={}, n_s={}".format(R,n_s), "--> C=",frequency_of_catching_subpar_samples[R][n_s])