W. Q. Meeker, L. A. Escobar, and J. K. Freels
19 April 2017
Important reliability-related applications of prediction
The difference between probability prediction and statistical prediction
Methods for computing predictions and prediction bounds for future failure times
Methods for computing predictions and prediction bounds for the number of failures in a future time interval
The objective of statistical prediction is to predict the value of some unknown, random quantity, e.g. \(T\)
The prediction is based on 'learned' information from sample data \(DATA\)
With sample data, there will be some inherent uncertainty in the estimated parameter values \(\boldsymbol{\widehat{\theta}}\)
The estimated parameter values are then used to estimate a nominal prediction interval
\[PI(1-\alpha)=[\underset{\sim}{T}, \overset{\sim}{T}]\]
If the data are from single sample (fixed \(DATA\))
The coverage probability for fixed \(DATA\) is conditioned on the true, but unknown value of \(\boldsymbol{\theta}\) and is expressed as
\[ \begin{aligned} CP[PI(1-\alpha)|\boldsymbol{\widehat{\theta}};\boldsymbol{\theta}&=Pr(\underset{\sim}{T} \le T \le \overset{\sim}{T}|\boldsymbol{\widehat{\theta}};\boldsymbol{\theta})\\\\ &=F(\overset{\sim}{T};\boldsymbol{\theta})-F(\underset{\sim}{T};\boldsymbol{\theta}) \end{aligned} \]
However, this conditional coverage probability depends on how close \(\boldsymbol{\widehat{\theta}}\) is to \(\boldsymbol{\theta}\)
Thus, since the true value of \(\boldsymbol{\theta}\) is unknown the coverage probability of a prediction interval based on fixed data is also unknown
If the data are from multiple samples
For each sample, the coverage probability is random and is conditioned on \(\boldsymbol{\widehat{\theta}}\)
The unconditional coverage probability for the prediction interval procedure is
\[ \begin{aligned} CP[PI(1-\alpha)|\boldsymbol{\theta}&=Pr(\underset{\sim}{T} \le T \le \overset{\sim}{T}|;\boldsymbol{\theta})\\\\ &=E_{_{\boldsymbol{\widehat{\theta}}}}\left[CP[PI(1-\alpha)|\boldsymbol{\widehat{\theta}};\boldsymbol{\theta}\right] \end{aligned} \]
The expectation in the above equation is taken wrt \(\boldsymbol{\widehat{\theta}}\)
This unconditional coverage probability can be computed (approximately) and controlled
Thus, this unconditional probability is generally used to describe a prediction interval procedure
When \(CP[PI(1-\alpha);\boldsymbol{\theta}]=1-\alpha\) does not depend on \(\boldsymbol{\theta}\), the procedure is said to be 'exact'
In general, the procedure is approximate because \(CP[PI(1-\alpha);\boldsymbol{\theta}]\approx 1-\alpha\) depends on the unknown \(\boldsymbol{\theta}\)
An equal-tailed \(100(1-\alpha)\%\) probability prediction interval can be created by combining
However, it may be possible to construct a narrower \(100(1-\alpha)\%\) probability prediction interval with unequal probabilities in the upper and lower tails
Equal-probability intervals have an advantage in that the endpoints can be correctly interpreted as the combination of one-sided bounds
This is important as we are often interested in finding either the lower limit or the upper limit, but not both
Naive prediction intervals are obtained by substituting \(\boldsymbol{\widehat{\theta}_{_{MLE}}}\) into equation 12.1
For log-location scale distributions, this naive prediction interval is expressed as
\[ \begin{aligned} PI(1-\alpha)&=\left[\underset{\sim}{T},\overset{\sim}{T}\right]\\\\ &=\left[\widehat{t}_{_{\alpha/2}},\widehat{t}_{_{1-\alpha/2}}\right]\\\\ &=\left[\exp\left(\widehat{\mu}_{_{MLE}}+\Phi^{-1}(\alpha/2)\times \widehat{\sigma}_{_{MLE}}\right),\quad\exp\left(\widehat{\mu}_{_{MLE}}+\Phi^{-1}(1-\alpha/2)\times \widehat{\sigma}_{_{MLE}}\right)\right] \end{aligned} \]
The unconditional coverage probabilities for these naive prediction intervals
Example 12.1 in which a prediction interval was produced for the time to failure of a ball bearing
lzbearing data setThis example assumes that all observations greater than \(80\) million cycles are right censored.
Under this assumption, the data are
example12_2 <- data.frame(cycles = c(lzbearing[1:15,],rep(80,8)),
status = rep(c('fail','right'), c(15,8)))
example12_2\[ \begin{aligned} \left[\underset{\sim}{T},\overset{\sim}{T}\right]&=\left[\exp\left(\widehat{\mu}_{_{MLE}}+\Phi_{_{NOR}}^{-1}(0.05)\times \widehat{\sigma}_{_{MLE}}\right), \quad\exp\left(\widehat{\mu}_{_{MLE}}+\Phi_{_{NOR}}^{-1}(0.95)\times \widehat{\sigma}_{_{MLE}}\right)\right]\\\\ &=\left[\exp\left(4.16+(-1.645)\times 0.5451\right), \quad\exp\left(4.16+1.645\times 0.5451\right)\right]\\\\ &=[26.1, \quad 157.1] \end{aligned} \]
Intervals constructed in this manner are generally too narrow
\[ \begin{aligned} \left[\underset{\sim}{T},\overset{\sim}{T}\right]&=\left[\exp\left(\widehat{\mu}_{_{MLE}}+\Phi_{_{SEV}}^{-1}(0.05)\times \widehat{\sigma}_{_{MLE}}\right), \quad\exp\left(\widehat{\mu}_{_{MLE}}+\Phi_{_{SEV}}^{-1}(0.95)\times \widehat{\sigma}_{_{MLE}}\right)\right]\\\\ &=\left[\exp\left(4.334+(-2.970)\times 0.4013\right), \quad\exp\left(4.334+1.097\times 0.4013\right)\right]\\\\ &=[23.2, \quad 118.4] \end{aligned} \]
Introduce basic ideas of pivotal methods
Use pivotal methods to produce approximate prediction intervals for Type II (failure censored) data
Use pivotal methods to produce approximate prediction intervals for Type I (time censored) data
Recall, a statistic is defined simply as a function of the data
An estimator is a type of statistic that is used to estimate the value of some unknown quantity
Example statistics
Statistics do not depend on any unknown parameters
By contrast, a pivotal quantity (aka pivot) is a function of the data and one or more unknown parameters
Type II failure tests conclude when \(r\) failures have been observed, where \(1 \le r \le n\)
The data from these tests are
For Type II failure data (and complete data) the following quantity is pivotal - if \(T\) has a log-location scale distribution
\[Z_{_{\log(T)}}=\frac{\log(T)-\widehat{\mu}}{\widehat{\sigma}}\]
The distribution of \(Z_{_{\log(T)}}\) depends only on the number of failures \(r\) and the number of censored observation \(n-r\), but does not depend on \(\mu\) or \(\sigma\)
Therefore, we can construct the following \(100(1-\alpha)\%\) prediction interval
\[ Pr\left[z_{_{\log(T)_{(\alpha/2)}}} < \frac{\log(T)-\widehat{\mu}}{\widehat{\sigma}} \le z_{_{\log(T)_{(1-\alpha/2)}}}\right]=1-\alpha \]
Where \(z_{_{\log(T)_{(p)}}}\) is the \(p\) quantile of \(Z_{_{\log(T)}}\)
Simplifying this inequality gives
\[ Pr\left[\widehat{\mu} + z_{_{\log(T)_{(\alpha/2)}}} \times \widehat{\sigma} < \log(T) \le \widehat{\mu} + z_{_{\log(T)_{(1-\alpha/2)}}}\times \widehat{\sigma} \right]=1-\alpha \]
\[ \left[\underset{\sim}{T},\overset{\sim}{T}\right]=\left[\exp\left(\widehat{\mu} + z_{_{\log(T)_{(\alpha/2)}}} \times \widehat{\sigma}\right), \quad \exp\left(\widehat{\mu} + z_{_{\log(T)_{(1-\alpha/2)}}}\times \widehat{\sigma}\right) \right] \]
Type II failure data, will contain \(r\) exact observations and \(n-r\) right-censored observations
The steps below assume that
Steps to obtain the empirical distribution of \(Z_{_{\log(T)}}\) using bootstrapping
Since the quantiles of \(Z_{_{\log(T)}}\) depend only on \(n\) and \(r\), the coverage probability of the prediction interval will be exactly \(1-\alpha\)
For Type I failure data, the distribution of \(Z_{_{\log(T)}}\) depends on \(n\) and \(F(t_c,\boldsymbol{\theta})\) the proportion of units failing at the censoring time \(t_c\)
However, in Type I tests the number of failures occurring at time \(t_c\) depends on the unknown quantity \(\boldsymbol{\theta}\)
Therefore, for Type I failure data the coverage probability of the prediction interval is only approximately equal to \(1-\alpha\)
Probability prediction intervals for Type I failure data may be constructed using the same bootstrap procedure as was presented for Type II failure data
lzbearing data from Examples 12.2 & 12.3The goal of this example
lzbearing data setThe bootstrap process described previously assumes that we can compute values for \(\widehat{\mu}_{_{MLE}}\) and \(\widehat{\sigma}_{_{MLE}}\)
From Example 12.2 we already know these values and can move forward
Step 1) Draw a sample of size \(n=23\) from \(NOR(4.16,0.5451)\)
samp <- rlnorm(23, meanlog = 4.16, sdlog = 0.5451)
samp [1] 65.91668 125.68141 83.85398 79.72670 145.07512 134.86884 106.55705
[8] 56.66127 23.19409 75.35078 39.58821 67.00100 90.66342 48.21936
[15] 57.08964 117.15660 70.23828 36.46338 87.68860 51.18963 62.99366
[22] 57.27232 69.98910
samp <-
sapply(X = seq_along(samp),
FUN = function(x) `if`(samp[x] >= 80, 80, samp[x]))
samp <- sort(samp)fails <- sum(samp < 80)
right <- sum(samp == 80)
samp.df <-
data.frame(megacycles = samp,
status = rep(c('fail','right'),c(fails,right)))
samp.dfsamp.ld <- frame.to.ld(samp.df,
response.column = 1,
censor.column = 2)
mlest <- print(mlest(samp.ld, distribution = 'lognormal'))
`mu*` <- mlest$mle[1,1]
`sigma*` <- mlest$mle[2,1]
`mu*` ; `sigma*`[1] 4.24117
[1] 0.4333061
`T*` <- rlnorm(1, meanlog = 4.160, sdlog = 0.5451)`Z_log[T*]` <- (log(`T*`) - `mu*`)/`sigma*`
`Z_log[T*]`[1] 0.3702068
boot.pivot <-
function(B = 100, N = 23,
mu = 4.16, sigma = 0.5451,
t_c = 80, alpha = 0.10)
{
samp <- replicate(B, rlnorm(N, mu, sigma))
samp <- apply(samp, MARGIN = 2, sort)
samp[which(samp > t_c)] <- t_c
params <-
sapply(X = 1:B,
FUN = function(x) {
fails <- sum(samp[,x] < t_c)
right <- N - fails
samp.df <-
data.frame(samp[,x],
rep(c('f','r'),c(fails,right)))
samp.ld <-
frame.to.ld(samp.df,
response.column = 1,
censor.column = 2)
print(mlest(samp.ld, distribution = 'lognormal'))$mle[,1]
})
zlog_t <-
sapply(X = 1:B,
FUN = function(x) {
numer <- log(rlnorm(1, mu, sigma)) - params[[1,x]]
denom <- params[[2,x]]
numer / denom
})
zlog_t <- sort(zlog_t)
limits <- zlog_t[c(B * alpha / 2, B * (1 - alpha / 2))]
zout <- list()
zout$zlog_t <- zlog_t
zout$limits <- limits
zout$predict <- exp(mu + limits * sigma)
return(zout)
}