All problems
Weibull Conditional Reliability
Problem
Conditional Weibull reliability of a component with scale lam and shape k that has already survived time t, for an additional mission time s:
R = exp(-((t + s) / lam)^k + (t / lam)^k).
Return 0.0 for invalid inputs.
Hint
Divide the survival at t + s by the survival at t.
Test cases
case 1
in: [1,1,2,3]
expected: 0.049787068367863944
case 2
in: [2,1,2,2]
expected: 0.36787944117144233
case 3
in: [1,2,1,1]
expected: 0.049787068367863944
case 4
in: [1,1,0,1]
expected: 0.36787944117144233
Starter codePython
import math
def weibull_conditional_reliability(lam, k, t, s):
# Your code here
pass4 test cases · run your code against them in the editor