New in Wolfram
Mathematica
8: Nonparametric, Derived, and Formula Distributions
◄
previous
|
next
►
Core Algorithms
Compare Nonparametric and Parametric Reliability Models
A comparison of NPMLE and MLE estimates of the reliability function for some manufactured ropes using
SurvivalDistribution
and
CensoredDistribution
, respectively.
In[1]:=
X
data = {100, 43, 100, 100, 63, 26, 100, 100, 100, 100, 100, 100, 100, 69, 58, 99, 95};
In[2]:=
X
pars = FindDistributionParameters[data, CensoredDistribution[{0, 100}, WeibullDistribution[a, b]]]; sf[x_] = SurvivalFunction[ CensoredDistribution[{-Infinity, 100}, WeibullDistribution[a, b]], x] /. pars;
In[3]:=
X
\[ScriptCapitalD] = SurvivalDistribution[Censoring[data, Boole[# >= 100] & /@ data]];
In[4]:=
X
Plot[{SurvivalFunction[\[ScriptCapitalD], x], sf[x]}, {x, 0, 120}, PlotPoints -> 100, Exclusions -> None, Filling -> {1 -> {2}}, PlotStyle -> Thick, Frame -> {{True, False}, {True, False}}, FrameLabel -> (Style[#, FontFamily -> "Verdana", Bold, 12] &) /@ {"Force", "Reliability"}, ImageSize -> 500]
Out[4]=