I am trying to use Mathematica for more of my reliability engineering work and am having trouble using SplicedDistribution.
I have a Weibull distribution (dist1) associated with a low stress condition, β1 = 2.59 and η1 = 25889.
I have a different Weibull distribution (dist2) associated with a high stress condition with the characteristic life being 1/3 that for dist1, β2 = 2.59 and η2 = 8630.
The need is to create a spliced distribution such that for the first 5000 hours only dist1 applies and thereafter only dist2 applies. Think of a device that operates in a relatively clean, stress-free environment for the first 5000 hours of its life, then it is abruptly placed in a stressful, corrosive atmosphere thereafter.
My attempt in using SplicedDistribution does not seem to work as shown in the comparison plot below. SplicedDistribution appears to be “mixing” the two distributions for all time, t as opposed to letting only dist1 govern for the first 5000 hours then allowing only dist2 to govern thereafter. I would expect that dist3 would be equivalent to dist1 for the first 5000 hours then its survival (reliability) curve would depart from dist1.
Can someone show me how to accomplish what I need using Mathematica ?
Here is my version 9 code:
{β1 = 2.59, η1 = 25889.};
dist1 = WeibullDistribution[β1, η1]
plot1 = Plot[SurvivalFunction[dist1][t], {t, 0, 18000},
PlotStyle -> Black, Frame -> True,
FrameLabel -> {"Time (hours)", "Reliabilty, R[t]"},
PlotRange -> {0, 1.05},
PlotLabel -> "Distribution 1 Reliability Plot"]
{β2 = 2.59, η2 = 8630.};
dist2 = WeibullDistribution[β2, η2]
plot2 = Plot[SurvivalFunction[dist2][t], {t, 0, 18000},
PlotStyle -> Blue, Frame -> True,
FrameLabel -> {"Time (hours)", "Reliabilty, R[t]"},
PlotRange -> {0, 1.05},
PlotLabel -> "Distribution 2 Reliability Plot"]
plot3 = Show[plot1, plot2, PlotRange -> All,
PlotLabel -> "Distribution 1 & 2 Comparison Plot"]
dist3 = SplicedDistribution[{1, 1}, {0, 5000, ∞}, {dist1, dist2}]
plot4 = Plot[SurvivalFunction[dist3][t], {t, 0, 18000},
PlotStyle -> Red, Frame -> True,
FrameLabel -> {"Time (hours)", "Reliabilty, R[t]"},
PlotLabel -> "Distribution 3 (Spliced) Reliability Plot"]
plot5 = Show[plot3, plot4, PlotRange -> All, AxesOrigin -> {0, 0},
PlotLabel -> "Comparison Plot",
Epilog -> {Text["Distribution 1 (low stress)", {15000, .9}],
Text["Distribution 2 (high stress)", {10500, .6}],
Text["Distribution 3 (spliced)", {6000, .2}]}]