Title: | Binomial Reliability Demonstration Tests |
---|---|
Description: | This is an implementation of design methods for binomial reliability demonstration tests (BRDTs) with failure count data. The acceptance decision uncertainty of BRDT has been quantified and the impacts of the uncertainty on related reliability assurance activities such as reliability growth (RG) and warranty services (WS) are evaluated. This package is associated with the work from the published paper "Optimal Binomial Reliability Demonstration Tests Design under Acceptance Decision Uncertainty" by Suiyao Chen et al. (2020) <doi:10.1080/08982112.2020.1757703>. |
Authors: | Suiyao Chen [aut, cre] |
Maintainer: | Suiyao Chen <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-14 04:12:06 UTC |
Source: | https://github.com/ericchen12377/brdt |
Define the acceptance probability function which gets the probability of passing the test (for binomial RDT).
bacceptprob(n, c, pi)
bacceptprob(n, c, pi)
n |
RDT sample size. |
c |
Maximum allowable failures. |
pi |
Failure probability. |
Acceptance probability
pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) bacceptprob(n = 10, c = 2, pi = pi);
pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) bacceptprob(n = 10, c = 2, pi = pi);
Define the consumer's risk function which gets the probability of passing the test when the lower level reliability requirement is not satisfied (for binomial RDT).
bconsumerrisk(n, c, pi, R)
bconsumerrisk(n, c, pi, R)
n |
RDT sample size. |
c |
Maximum allowable failures. |
pi |
Failure probability. |
R |
Lower level reliability requirement. |
Probability of consumer's risk
bcore
for getting the core probability of passting the test;
boptimal_n
for getting the optimal test sample size;
bIndicator
for getting the binary indicator;
pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1) bconsumerrisk(n = 10, c = 2, pi = pi, R = 0.8);
pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1) bconsumerrisk(n = 10, c = 2, pi = pi, R = 0.8);
Define the summed core function inside of the integration which gets the probability of passing the test given specific failure probabilities (for binomial RDT).
bcore(n, c, pi)
bcore(n, c, pi)
n |
RDT sample size. |
c |
Maximum allowable failures. |
pi |
Failure probability. |
Core probability of passing the test given specific failure probabilities.
boptimal_n
for getting the optimal test sample size;
bconsumerrisk
for getting the consumer's risk;
bIndicator
for getting the binary indicator;
bcore(n = 10, c = 2, pi = 0.2)
bcore(n = 10, c = 2, pi = 0.2)
Define the cost function of expected overall cost including the RDT cost, expected reliabiltiy growth (RG) cost and expected warranty services (WS) cost (for binomial RDT design).
bcost_expected(Cf, Cv, n, G, Cw, N, c, pi)
bcost_expected(Cf, Cv, n, G, Cw, N, c, pi)
Cf |
Fixed costs of RDT |
Cv |
Variable unit costs of RDT |
n |
RDT sample size |
G |
Reliabilty growth cost |
Cw |
Average cost per warranty claim |
N |
Sales volume |
c |
Maximum allowable failures |
pi |
Failure probability |
Overall expected cost
pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1) bcost_expected(Cf = 10, Cv = 10, n = 10, G = 100000, Cw = 10, N = 1, c = 1, pi = pi)
pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1) bcost_expected(Cf = 10, Cv = 10, n = 10, G = 100000, Cw = 10, N = 1, c = 1, pi = pi)
Define the cost function of RDT, mainly determined by the test sample size (for binomial RDT)
bcost_RDT(Cf, Cv, n)
bcost_RDT(Cf, Cv, n)
Cf |
Fixed costs |
Cv |
Variable costs. |
n |
Optimal test sample size |
Binomial RDT cost
bcost_RG
, bcost_WS
, bcost_expected
#the n value can be the minimum test sample size obtained from \code{\link{boptimal_n}}. n_optimal <- 20 bcost_RDT(Cf = 0, Cv = 10, n = n_optimal);
#the n value can be the minimum test sample size obtained from \code{\link{boptimal_n}}. n_optimal <- 20 bcost_RDT(Cf = 0, Cv = 10, n = n_optimal);
Define the cost function of reliabiltiy growth (RG) after the decision of the test (for binomial RDT).
bcost_RG(G)
bcost_RG(G)
G |
A constant value reliabilty growth cost, suggest to be sufficiently larger than RDT cost. |
Reliability growth cost
bcost_RDT
, bcost_WS
, bcost_expected
bcost_RG(G = 100000);
bcost_RG(G = 100000);
Define the cost function of warranty services (WS) after the decision of the test (for binomial RDT)
bcost_WS(Cw, N, n, c, pi)
bcost_WS(Cw, N, n, c, pi)
Cw |
Average cost per warranty claim |
N |
Sales volume |
n |
RDT sample size |
c |
Maximum allowable failures |
pi |
Failure probability |
The result is a vector with two values. The first value is the expected failure probability in warranty period. The second value is the expected warranty services cost.
bcost_RDT
, bcost_RG
, bcost_expected
#the n value can be the minimum test sample size obtained from \code{\link{boptimal_n}}. n_optimal <- 20 pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1) WScost <- bcost_WS(Cw = 10, N = 1, n = n_optimal, c = 1, pi = pi); print(WScost[1]) #expected failure probability print(WScost[2]) #expected warranty services cost
#the n value can be the minimum test sample size obtained from \code{\link{boptimal_n}}. n_optimal <- 20 pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1) WScost <- bcost_WS(Cw = 10, N = 1, n = n_optimal, c = 1, pi = pi); print(WScost[1]) #expected failure probability print(WScost[2]) #expected warranty services cost
Define the function to generate the dataset based on the design settings (for Binomial RDT).
bdata_generator( Cf, Cv, nvec, G, Cw, N, Rvec, cvec, pi, par = all(), option = c("optimal"), thres_CR )
bdata_generator( Cf, Cv, nvec, G, Cw, N, Rvec, cvec, pi, par = all(), option = c("optimal"), thres_CR )
Cf |
Fixed costs of RDT |
Cv |
Variable unit costs of RDT |
nvec |
Vector of test sample size |
G |
Reliabilty growth cost |
Cw |
Average cost per warranty claim |
N |
Sales volume |
Rvec |
Vector of lower level reliability requirements |
cvec |
Vector of maximum allowable failures |
pi |
Failure probability |
par |
Specify which columns to return. Default is all columns.The columns include c('n', 'R', 'c', 'CR', 'AP', 'RDT Cost', 'RG Cost', 'RG Cost Expected', 'WS Cost', 'WS Failure Probability', 'WS Cost Expected', 'Overall Cost') |
option |
Options to get different datasets. Default is 'optimal'. If option = 'all', get all test plans data for all combinations of n, c, R; If option = 'optimal', get test plans data with optimal test sample size for every combination of c, R. |
thres_CR |
Threshold (acceptable level) of consumer's risk |
Matrix of the dataset
boptimal_cost
for getting the optial test plan with minimum overall cost;
boptimal_n
for getting the optial test sample size;
nvec <- seq(0, 10, 1) Rvec <- seq(0.8, 0.85, 0.01) cvec <- seq(0, 2, 1) pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) bdata_generator(Cf = 10, Cv = 10, nvec = nvec, G = 10000, Cw = 10, N = 100, Rvec = Rvec, cvec = cvec, pi = pi, par = c('n', 'R', 'c', 'CR', 'AP'), option = c("optimal"), thres_CR = 0.05)
nvec <- seq(0, 10, 1) Rvec <- seq(0.8, 0.85, 0.01) cvec <- seq(0, 2, 1) pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) bdata_generator(Cf = 10, Cv = 10, nvec = nvec, G = 10000, Cw = 10, N = 100, Rvec = Rvec, cvec = cvec, pi = pi, par = c('n', 'R', 'c', 'CR', 'AP'), option = c("optimal"), thres_CR = 0.05)
Define the binary indicator function to check whether the failure probability satisfies the lower level reliability requirement (for binomial RDT).
bIndicator(pi, R)
bIndicator(pi, R)
pi |
Failure probability. |
R |
Lower Level reliability requirement. |
0 – No; 1 – Yes.
bcore
for getting the core probability of passting the test;
boptimal_n
for getting the optimal test sample size;
bconsumerrisk
for getting the consumer's risk;
bIndicator(pi = 0.05, R = 0.9) bIndicator(pi = 0.2, R = 0.9)
bIndicator(pi = 0.05, R = 0.9) bIndicator(pi = 0.2, R = 0.9)
Define the optimal function to find the optimal test plans with minimum expected overall costs (for binomial RDT).
boptimal_cost(Cf, Cv, G, Cw, N, Rvec, cvec, pi, thres_CR)
boptimal_cost(Cf, Cv, G, Cw, N, Rvec, cvec, pi, thres_CR)
Cf |
Fixed costs of RDT |
Cv |
Variable unit costs of RDT |
G |
Reliabilty growth cost |
Cw |
Average cost per warranty claim |
N |
Sales volume |
Rvec |
Vector of lower level reliability requirements |
cvec |
Vector of maximum allowable failures |
pi |
Failure probability |
thres_CR |
Threshold (acceptable level) of consumer's risk |
Vector of optimal test plan parameters, acceptance probabiltiy and cost
boptimal_n
for getting the optial test sample size;
bdata_generator
for generating optimal test plans dataset;
Rvec <- seq(0.8, 0.85, 0.01) cvec <- seq(0, 2, 1) pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) boptimal_cost(Cf = 10, Cv = 10, G = 100, Cw = 10, N = 100, Rvec = Rvec, cvec = cvec, pi = pi, thres_CR = 0.5);
Rvec <- seq(0.8, 0.85, 0.01) cvec <- seq(0, 2, 1) pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) boptimal_cost(Cf = 10, Cv = 10, G = 100, Cw = 10, N = 100, Rvec = Rvec, cvec = cvec, pi = pi, thres_CR = 0.5);
Define the optimal function to find the optimal test plan with minimum test sample size given an acceptable level of consumer's risk (for binomial RDT).
boptimal_n(c, pi, R, thres_CR)
boptimal_n(c, pi, R, thres_CR)
c |
Maximum allowable failures |
pi |
Failure probability |
R |
Lower level reliability requirement |
thres_CR |
Threshold (acceptable level) of consumer's risk |
Minimum test sample size
boptimal_cost
for getting the optial test plan with minimum overall cost;
bdata_generator
for generating optimal test plans dataset;
pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) boptimal_n(c = 2, pi = pi, R = 0.8, thres_CR = 0.05)
pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1) boptimal_n(c = 2, pi = pi, R = 0.8, thres_CR = 0.05)
Define the simulation function to generate failure probability with Beta prior distributions as conjugate prior to binomial distributions (for binomial RDT).
pi_MCSim_beta(M, seed, a, b)
pi_MCSim_beta(M, seed, a, b)
M |
Simulation sample size |
seed |
Random seed for random sample |
a |
Shape parameter 1 for beta distribution |
b |
Shape parameter 2 for beta distribution |
Vector of failure probability sample values
pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1)
pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1)