You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/case_studies/reliability_and_calibrated_prediction.myst.md
+30-6
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,11 @@ jupytext:
5
5
format_name: myst
6
6
format_version: 0.13
7
7
kernelspec:
8
-
display_name: Python 3.9.0 ('pymc_ar_ex')
8
+
display_name: Python [conda env:pymc_ar_ex] *
9
9
language: python
10
-
name: python3
10
+
name: conda-env-pymc_ar_ex-py
11
+
substitutions:
12
+
extra_dependencies: lifelines
11
13
---
12
14
13
15
(Reliability Statistics and Predictive Calibration)=
@@ -141,6 +143,8 @@ See below how the failure data flags whether or not an observation has been cens
141
143
Left censoring (where we don't observe an item from the beginning of their history) and interval censoring (both left and right censoring) can also occur but are less common.
@@ -248,6 +255,8 @@ We' apply the same techniques to a larger dataset and plot some of these quantit
248
255
The shock absorbers data is in period format but it records a constantly decreasing risk set over time with one item being censored or failing at each time point i.e. removed from testing successfully (approved) or removed due to failure. This is a special case of the **period** format data.
Although it's tempting to take this model and run with it, we need to be cautious in the case of limited data. For instance in the heat-exchange data we have three years of data with a total of 11 failures. A too simple model can get this quite wrong. For the moment we'll focus on the shock-absorber data - its non-parametric description and a simple univariate fit to this data.
Next we'll plot the bootstrapped data and the two estimates of coverage we achieve conditional on the MLE fit. In other words when we want to assess the coverage of a prediction interval based on our MLE fit we can also bootstrap an estimate for this quantity.
@@ -592,6 +608,8 @@ Next we'll look at a data set which has a slightly less clean parametric fit. Th
592
608
We want to spend some time with this example to show how the *frequentist* techniques which worked well to estimate the shock-absorbers data can be augmented in the case of the Bearing cage data. In particular we'll show how the issues arising can be resolved with a *Bayesian* approach.
## Probability Plots: Comparing CDFs in a Restricted Linear Range
711
732
712
-
With this adjustment to the data format we compare the MLE fit against the empirical CDF. In the next section we'll use the technique of linearising the MLE fits so that can perform a visual "goodness of fit" check. These types of plots rely on a transformation that can be applied to the location and scale distributions to turn their CDF into a linear space.
733
+
In this section we'll use the technique of linearising the MLE fits so that can perform a visual "goodness of fit" check. These types of plots rely on a transformation that can be applied to the location and scale distributions to turn their CDF into a linear space.
713
734
714
735
For both the Lognormal and Weibull fits we can represent their CDF in a linear space as a relationship between the logged value t and an appropriate $CDF^{-1}$.
715
736
716
737
```{code-cell} ipython3
738
+
:tags: [hide-input]
739
+
717
740
def sev_ppf(p):
718
741
return np.log(-np.log(1 - p))
719
742
@@ -1158,7 +1181,8 @@ ax2.legend()
1158
1181
1159
1182
The choice of model in such cases is crucial. The decision about which failure profile is apt has to be informed by a subject matter expert because extrapolation from such sparse data is always risky. An understanding of the uncertainty is crucial if real costs attach to the failures and the subject matter expert is usually better placed to tell if you 2 or 7 failures can be plausibly expected within 600 hours of service.
1160
1183
1161
-
# Conclusion
1184
+
1185
+
## Conclusion
1162
1186
1163
1187
We've seen how to analyse and model reliability from both a frequentist and Bayesian perspective and compare against the non-parametric estimates. We've shown how prediction intervals can be derived for a number of key statistics by both a bootstrapping and a bayesian approach. We've seen approaches to calibrating these prediction intervals through re-sampling methods and informative prior specification. These views on the problem are complementary and the choice of technique which is appropriate should be driven by factors of the questions of interest, not some ideological commitment.
1164
1188
@@ -1168,7 +1192,7 @@ In particular we've seen how the MLE fits to our bearings data provide a decent
1168
1192
1169
1193
## Authors
1170
1194
1171
-
Nathaniel Forde
1195
+
* Authored by Nathaniel Forde on 9th of January 2022 ([pymc-examples491](https://github.com/pymc-devs/pymc-examples/pull/491))
0 commit comments