Package 'BRDT'

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

Help Index


Acceptance Probability for Binomial RDT

Description

Define the acceptance probability function which gets the probability of passing the test (for binomial RDT).

Usage

bacceptprob(n, c, pi)

Arguments

n

RDT sample size.

c

Maximum allowable failures.

pi

Failure probability.

Value

Acceptance probability

Examples

pi <- pi_MCSim_beta(M = 5000, seed = 10, a = 1, b = 1)
bacceptprob(n = 10, c = 2, pi = pi);

Consumer's Risk for Binomial RDT

Description

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).

Usage

bconsumerrisk(n, c, pi, R)

Arguments

n

RDT sample size.

c

Maximum allowable failures.

pi

Failure probability.

R

Lower level reliability requirement.

Value

Probability of consumer's risk

See Also

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;

Examples

pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1)
bconsumerrisk(n = 10, c = 2, pi = pi, R = 0.8);

Probability Core for Binomial RDT

Description

Define the summed core function inside of the integration which gets the probability of passing the test given specific failure probabilities (for binomial RDT).

Usage

bcore(n, c, pi)

Arguments

n

RDT sample size.

c

Maximum allowable failures.

pi

Failure probability.

Value

Core probability of passing the test given specific failure probabilities.

See Also

boptimal_n for getting the optimal test sample size; bconsumerrisk for getting the consumer's risk; bIndicator for getting the binary indicator;

Examples

bcore(n = 10, c = 2, pi = 0.2)

Expected Overall Costs in Binomial RDT Design

Description

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).

Usage

bcost_expected(Cf, Cv, n, G, Cw, N, c, pi)

Arguments

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

Value

Overall expected cost

See Also

bcost_RDT, bcost_RG, bcost_WS

Examples

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)

Binomial RDT Cost

Description

Define the cost function of RDT, mainly determined by the test sample size (for binomial RDT)

Usage

bcost_RDT(Cf, Cv, n)

Arguments

Cf

Fixed costs

Cv

Variable costs.

n

Optimal test sample size

Value

Binomial RDT cost

See Also

bcost_RG, bcost_WS, bcost_expected

Examples

#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);

Reliability Growth Cost

Description

Define the cost function of reliabiltiy growth (RG) after the decision of the test (for binomial RDT).

Usage

bcost_RG(G)

Arguments

G

A constant value reliabilty growth cost, suggest to be sufficiently larger than RDT cost.

Value

Reliability growth cost

See Also

bcost_RDT, bcost_WS, bcost_expected

Examples

bcost_RG(G = 100000);

Warranty Services Cost

Description

Define the cost function of warranty services (WS) after the decision of the test (for binomial RDT)

Usage

bcost_WS(Cw, N, n, c, pi)

Arguments

Cw

Average cost per warranty claim

N

Sales volume

n

RDT sample size

c

Maximum allowable failures

pi

Failure probability

Value

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.

See Also

bcost_RDT, bcost_RG, bcost_expected

Examples

#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

Data Generation Function for Binomial RDT Design

Description

Define the function to generate the dataset based on the design settings (for Binomial RDT).

Usage

bdata_generator(
  Cf,
  Cv,
  nvec,
  G,
  Cw,
  N,
  Rvec,
  cvec,
  pi,
  par = all(),
  option = c("optimal"),
  thres_CR
)

Arguments

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

Value

Matrix of the dataset

See Also

boptimal_cost for getting the optial test plan with minimum overall cost; boptimal_n for getting the optial test sample size;

Examples

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)

Binary Indicator for Binomial RDT

Description

Define the binary indicator function to check whether the failure probability satisfies the lower level reliability requirement (for binomial RDT).

Usage

bIndicator(pi, R)

Arguments

pi

Failure probability.

R

Lower Level reliability requirement.

Value

0 – No; 1 – Yes.

See Also

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;

Examples

bIndicator(pi = 0.05, R = 0.9)
bIndicator(pi = 0.2, R = 0.9)

Optimal Test Plans with Minimum Expected Overall Costs in Binomial RDT Design

Description

Define the optimal function to find the optimal test plans with minimum expected overall costs (for binomial RDT).

Usage

boptimal_cost(Cf, Cv, G, Cw, N, Rvec, cvec, pi, thres_CR)

Arguments

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

Value

Vector of optimal test plan parameters, acceptance probabiltiy and cost

See Also

boptimal_n for getting the optial test sample size; bdata_generator for generating optimal test plans dataset;

Examples

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);

Optimal Test Sample Size for Binomial RDT

Description

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).

Usage

boptimal_n(c, pi, R, thres_CR)

Arguments

c

Maximum allowable failures

pi

Failure probability

R

Lower level reliability requirement

thres_CR

Threshold (acceptable level) of consumer's risk

Value

Minimum test sample size

See Also

boptimal_cost for getting the optial test plan with minimum overall cost; bdata_generator for generating optimal test plans dataset;

Examples

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)

Beta Prior Simulation for Binomial RDT

Description

Define the simulation function to generate failure probability with Beta prior distributions as conjugate prior to binomial distributions (for binomial RDT).

Usage

pi_MCSim_beta(M, seed, a, b)

Arguments

M

Simulation sample size

seed

Random seed for random sample

a

Shape parameter 1 for beta distribution

b

Shape parameter 2 for beta distribution

Value

Vector of failure probability sample values

Examples

pi <- pi_MCSim_beta(M = 1000, seed = 10, a = 1, b = 1)