I'm using the following R code:
library(AcceptanceSampling)
x <- OC2c(50, 2, type="hypergeom", N=4000)
plot(x, xlim=c(0,0.2))
which generates the plot:
I will like to find the proportion when P(accept)
(Y-axis) is 0.1. Is there a way to do this in R? I have a feeling this package does not allow direct computation of that according to its documentation at https://cran.r-project.org/web/packages/AcceptanceSampling/AcceptanceSampling.pdf.
As far as I know, you can't get this exactly, but you can get close.
x
is an S4 object, and the slots you're interested in here arepaccept
andpd
. We can get thepd
value with thepaccept
value closest to 0.1 of all thepaccept
values: