# Wolfram Language™

## Order Distribution from Distribution with Units

A system has three components, out of which one is primary and two are redundant. Each component has a lifetime following a WeibullDistribution, with shape parameter 2 and mean lifetime of 885 hours.

In:= ```{sol} = NSolve[ Mean[WeibullDistribution[2, b]] == Quantity[885, "Hours"], b]```
Out= In:= `\[ScriptD] = WeibullDistribution[2, b] /. sol`
Out= The lifetime of this system can be described as the maximum lifetime of its components.

In:= `\[ScriptCapitalD] = OrderDistribution[{\[ScriptD], 3}, 3]`
Out= The mean lifetime of the system.

In:= `Mean[\[ScriptCapitalD]]`
Out= Compare with the computation using ReliabilityDistribution.

In:= ```Mean[ReliabilityDistribution[ comp1 \[Or] comp2 \[Or] comp3, {{comp1, \[ScriptD]}, {comp2, \[ScriptD]}, {comp3, \ \[ScriptD]}}]]```
Out= Compare probability density function of the lifetime of a single component with that of the system.

show complete Wolfram Language input
In:= ```Plot[{PDF[\[ScriptD], Quantity[x, "Hours"]], PDF[\[ScriptCapitalD], Quantity[x, "Hours"]]}, {x, 0, 3000}, FrameLabel -> {"hr"}, PlotTheme -> "Detailed", PlotLegends -> {"single component", "system"}, PlotLabel -> "Lifetime Distribution Density"]```
Out= 