exp_oc: Exponential Operating Characteristic (OC) Function

View source: R/exp_oc.R

exp_ocR Documentation

Exponential Operating Characteristic (OC) Function

Description

exp_oc the OC function for exponential reliability tests (probability of passing test as a function of true MTBF). See pg. 67 for the OC formula in MIL-HDBK-781A.

Usage

exp_oc(accept, duration, mtbf)

Arguments

accept

A vector with the allowable number of failures.

duration

A vector of test durations.

mtbf

A vector of the true MTBFs.

Value

The probability of passing the test of a given duration with an allowable number of failures, given the true MTBF. (The probability of accepting items with an MTBF = mtbf.)

References

Mil-Hdbk-781A

See Also

exp_mtbf_req, exp_reliability_req, exp_test_duration, exp_mean_lcb, exp_fixed_duration_tests

Examples

theta <- seq(250, 5000, 50)
prob_pass <- exp_oc(accept = 0, duration = 804.719, mtbf = theta)
prob_pass[1:5]

ggplot(data.frame(prob_pass = prob_pass, theta = theta)) +
  geom_line(
    aes(x = theta, y = prob_pass),
    linewidth = 1, colour = "blue"
  ) +
  scale_y_continuous(limits = c(0,1), breaks = seq(0,1,.2))

# Using stat_function()
ggplot(data.frame(x=c(250,5000))) +
  stat_function(
    aes(x=x), fun = exp_oc, args = list(accept = 0, duration = 804.719),
    linewidth = 1, colour = "blue"
  ) +
  scale_y_continuous(limits = c(0,1), breaks = seq(0,1,.2)) +
  labs(x = "MTBF", y = "Prob of Passing Demonstration")

# See: example(exp_fixed_duration_tests)

rm(list = c("theta", "prob_pass"))


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