« View all new features in
Mathematica
9
◄
previous

next
►
New in
Mathematica
9
›
Reliability
Reliability of a Car
A car needs wheels, an engine, a transmission, and one out of two brake systems to function.
In[1]:=
X
\!\(\* GraphicsBox[{ {Hue[0.6, 0.2, 0.8], EdgeForm[{GrayLevel[0], Opacity[0.7]}], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{0.17647060000000003`, 0.17647060000000003`}, \ {0.17647060000000003`, 0.17647060000000003`}]}, "DynamicName", BoxID > "VertexID$1"], InsetBox[ StyleBox["\<\"Start\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, \ {5.551115123125783*^17, 0.18518306940104146`}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$1"], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{0.8235294, 0.17647060000000003`}, \ {1.1764706, 0.17647060000000003`}]}, "DynamicName", BoxID > "VertexID$2"], InsetBox[ StyleBox["\<\"Wheels\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, {1., 0.18518306940104146`}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$2"], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{1.8235294, 0.17647060000000003`}, \ {2.1764706, 0.17647060000000003`}]}, "DynamicName", BoxID > "VertexID$3"], InsetBox[ StyleBox["\<\"Engine\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, {2., 0.18518306940104146`}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$3"], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{2.8235294, 0.17647060000000003`}, \ {3.1764706, 0.17647060000000003`}]}, "DynamicName", BoxID > "VertexID$4"], InsetBox[ StyleBox["\<\"Transmission\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, {3., 0.18518306940104146`}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$4"], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{3.8235294, 0.6764706}, \ {4.1764706, 0.32352939999999997`}]}, "DynamicName", BoxID > "VertexID$5"], InsetBox[ StyleBox["\<\"Brake 1\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, {4., 0.31481693059895854`}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$5"], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{3.8235294, 0.32352939999999997`}, \ {4.1764706, 0.6764706}]}, "DynamicName", BoxID > "VertexID$6"], InsetBox[ StyleBox["\<\"Brake 2\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, {4., 0.6851830694010415}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$6"], TagBox[{ TagBox[ {RGBColor[0.865, 0.865, 0.865], RectangleBox[{4.8235294, 0.17647060000000003`}, \ {5.1764706, 0.17647060000000003`}]}, "DynamicName", BoxID > "VertexID$7"], InsetBox[ StyleBox["\<\"End\"\>", StripOnInput>False, FontSize>12], Offset[{0., 2.}, {5., 0.18518306940104146`}], ImageScaled[{0.5, 0}], BaseStyle>"Graphics"]}, "DynamicName", BoxID > "VertexLabelID$7"]}, {Hue[0.6, 0.7, 0.5], Opacity[0.7], {GrayLevel[0], Thickness[Large], LineBox[{{0.18518306940104168`, 2.220446049250313*^16}, { 0.8148169305989584, 2.220446049250313*^16}}]}, {GrayLevel[0], Thickness[Large], LineBox[{{1.1851830694010417`, 2.220446049250313*^16}, { 1.8148169305989583`, 2.220446049250313*^16}}]}, {GrayLevel[0], Thickness[Large], LineBox[{{2.1851830694010417`, 2.220446049250313*^16}, { 2.8148169305989583`, 2.220446049250313*^16}}]}, {GrayLevel[0], Thickness[Large], LineBox[{{3.185183069401042, 0.09259153470052141}, { 3.814816930598958, 0.4074084652994792}}]}, {GrayLevel[0], Thickness[Large], LineBox[{{3.185183069401042, 0.09259153470052081}, { 3.814816930598958, 0.4074084652994786}}]}, {GrayLevel[0], Thickness[Large], LineBox[{{4.185183069401043, 0.4074084652994786}, { 4.814816930598959, 0.0925915347005205}}]}, {GrayLevel[0], Thickness[Large], LineBox[{{4.185183069401043, 0.4074084652994786}, { 4.814816930598959, 0.0925915347005205}}]}}}, FrameTicks>None, ImagePadding>20, ImageSize>{556.5, 182.}]\)
In[2]:=
X
\[ScriptCapitalR]car = ReliabilityDistribution[ wheels \[And] engine \[And] transmission \[And] (brake1 \[Or] brake2), {{wheels, ExponentialDistribution[Subscript[\[Lambda], 1]]}, {engine, WeibullDistribution[a1, b1]}, {transmission, ExponentialDistribution[Subscript[\[Lambda], 2]]}, {brake1, ExponentialDistribution[Subscript[\[Lambda], 3]]}, {brake2, ExponentialDistribution[Subscript[\[Lambda], 3]]}}];
Compute the survival function.
In[3]:=
X
SurvivalFunction[\[ScriptCapitalR]car, t]
Out[3]=
Without maintenance, the expected lifetime is about three years.
In[4]:=
X
vals = {Subscript[\[Lambda], 1] > 1/5, Subscript[\[Lambda], 2] > 1/10, Subscript[\[Lambda], 3] > 1/15, a1 > 5, b1 > 12};
In[5]:=
X
mttf = NExpectation[t, t \[Distributed] \[ScriptCapitalR]car /. vals]
Out[5]=
Simulate the lifetime of the car.
In[6]:=
X
ListPlot[{RandomVariate[\[ScriptCapitalR]car /. vals, 100], {{0, mttf}, {100, mttf}}}, Joined > {False, True}, Filling > Axis, AxesOrigin > {0, 0}]
Out[6]=