CLS
PRINT "Enter Weibull Shape Parameter k:";
INPUT k
PRINT "Enter Weibull Threshold Parameter e:";
INPUT e
PRINT "Enter Median Design Value:";
INPUT Median
v = e + (Median - e) / (LOG(2)) ^ (1 / k)
PRINT "Weibull Characteristic Value ="; v
PRINT "Enter production run size N:";
INPUT N
PRINT "Probability of survival at first failure =";
P = 1 - 1 / 1 / (N + 1)
PRINT P
PRINT "Time to first failure =";
t = e + (v - e) * (-LOG(P)) ^ (1 / k)
PRINT t
PRINT "Risk of failure at time"; t; "equals";
R = k * ((t - e) / (v - e)) ^ (k - 1) / (v - e)
PRINT R
PRINT "Probability density at time t =";
DENSITY = R * P
PRINT DENSITY
PRINT "Probability of survival at second failure =";
P = 1 - 2 / 1 / (N + 1)
PRINT P
PRINT "Time to second failure =";
t = e + (v - e) * (-LOG(P)) ^ (1 / k)
PRINT t
PRINT "Risk of failure at time"; t; "equals";
R = k * ((t - e) / (v - e)) ^ (k - 1) / (v - e)
PRINT R
PRINT "Probability density at time t =";
DENSITY = R * P
PRINT DENSITY
'PRINT "Probability of survival at third failure =";
'P = 1 - 3 / 1 / (N + 1)
'PRINT P
'PRINT "Time to third failure =";
't = e + (v - e) * (-LOG(P)) ^ (1 / k)
'PRINT t
'PRINT "Risk of failure at time"; t; "equals";
'R = k * ((t - e) / (v - e)) ^ (k - 1) / (v - e)
'PRINT R
'PRINT "Probability density at time t =";
'DENSITY = R * P
'PRINT DENSITY
PRINT "Probability of survival at median life = 0.5"
PRINT "Design median life ="; Median
PRINT "Risk of failure at median life equals";
R = k * ((Median - e) / (v - e)) ^ (k - 1) / (v - e)
PRINT R
PRINT "Probability density at median life =";
DENSITY = R * .5
PRINT DENSITY
PRINT "Probability of survival at failure"; N; "equals";
P = 1 - N / (N + 1)
PRINT P
PRINT "Time to failure"; N; "equals";
t = e + (v - e) * (-LOG(P)) ^ (1 / k)
PRINT t
PRINT "Risk of failure at time"; t; "equals";
R = k * ((t - e) / (v - e)) ^ (k - 1) / (v - e)
PRINT R
PRINT "Probability density at time t =";
DENSITY = R * P
PRINT DENSITY
END

