Last data update: 2014.03.03

R: Operating characteristic
OCR Documentation

Operating characteristic

Description

Calculation of probability of acceptance of a lot with fraction defective p when using plan (n, k) for sampling inspection

Usage

OC(p, n, k, type = c("exact", "napprox","ewmaSK","ewma2"),lam=1)

Arguments

p

fraction defective

n

sample size

k

critical value

type

function used for operating characteristic; "t" stands for exact function using non-central t-distribution (see (Johnson and Welch, 1940)), "napprox" stands for approximation using normal distribution, (see (Jennett and Welch, 1939)); if EWMA statistic is to be used, "ewmaSK" stands for the sigma known case, "ewma2" stands for the sigma unknown case

lam

smoothing parameter in case that EWMA statistic is used

Value

probability of acceptance of a lot (single number)

References

Jennett, W. J. - Welch, B. L.: The Control of Proportion Defective as Judged by a Single Quality Characteristic Varying on a Continuous Scale, Supplement to the Journal of the Royal Statistical Society, Vol. 6, No. 1, pp. 80-88, 1939.

Johnson, N. L. - Welch, B. L.: Applications of the Non-Central t-Distribution, Biometrika, Vol. 31, No. 3/4, pp. 362-389, 1940.

Examples

OC(p=0.1,n=85,k=2.44)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LTPDvar)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LTPDvar/OC.Rd_%03d_medium.png", width=480, height=480)
> ### Name: OC
> ### Title: Operating characteristic
> ### Aliases: OC
> ### Keywords: misc
> 
> ### ** Examples
> 
> OC(p=0.1,n=85,k=2.44)
[1] 1.208949e-08
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>