weibull_rel_demo: Calculate the Required Test Duration or Sample Size

View source: R/weibull_rel_demo.R

weibull_rel_demoR Documentation

Calculate the Required Test Duration or Sample Size

Description

weibull_rel_demo calculates the required test duration or sample size (number of units to be tested) based on the alpha value, Weibull shape parameter, mission duration requirement and corresponding reliability requirement. Leave one of t or ss set to NULL to solve for it.

Usage

weibull_rel_demo(t, ss, r, alpha, shape, md, R_m, lower, upper, ...)

Arguments

t

The test duration. Set to NULL to solve for test duration. Default is NULL.

ss

The sample size (number of units) to be used in the test. Set to NULL to solve for sample size. Default is 1. If set it must be > r.

r

The allowable number of failures in the test. Default is 0.

alpha

The alpha value (Type I Error Rate) to be used in the test. Default is 0.20.

shape

The Weibull shape parameter. Default is 1 corresponding to an exponential distribution. Shape > 1 indicates increasing failure rate, Shape < 1 indicates decreasing failure rate.

md

The mission duration requirement.

R_m

The reliability requirement for the specified mission duration.

lower

The lower bound in the search range (the lower of where to look for t or ss). Required for the uniroot or uniroot.integer functions.

upper

The upper bound in the search range (the upper of where to look for t or ss). Required for the uniroot or uniroot.integer functions.

...

Additional options parameter to be passed to the uniroot or uniroot.integerfunctions.

Value

The output will be from the uniroot or uniroot.integer functions. The root element of the return (as in weibull_rel_demo(...)$root) provides the solution.

References

Determining the Right Sample Size for Your Test: Theory and Application 2015 Annual Reliability and Maintainability Symposium

See Also

weibull_scale, weibull_mean

Examples

# What is the required sample size given 1 allowable failure
  # in 1500 hours to demonstrate with 90% confidence that
  # a system has 0.80 probability of surviving to 2000 hours
  # without failure?
weibull_rel_demo(t = 1500, ss = NULL, r = 1, alpha = .1,
  shape = 2, md = 2000, R_m = .8, lower=1, upper = 100)

# What is the required test duration (per system), if I have 10 systems,
  # allow for a total of 1 failure, in order to demonstrate with 90%
  # confidence that a system has 0.80 probability of surviving to 2000
  # hours without failure?
weibull_rel_demo(t = NULL, ss = 10, r = 1, alpha = .1,
  shape = 2, md = 2000, R_m = .8, lower=1, upper = 10000)

# These are equivalent since shape = 1 reduces to exponential
# However, if the number of allowable failures (r) increases, the ss must increase and
  # the return from the exp_test_duration function will not match
weibull_rel_demo(t = NULL, ss = 1, r = 0, alpha = .1,
  shape = 1, md = 2000, R_m = .8, lower=1, upper = 100000)
exp_mtbf_req(.8, 2000)
exp_test_duration(r = 0, mtbf = 8962.84, alpha = .1)


jjw3952/mcotear documentation built on Sept. 2, 2023, 10:30 a.m.