bcost_WS {BRDT} | R Documentation |
Define the cost function of warranty services (WS) after the decision of the test (for binomial RDT)
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