---
title: "Find plan"
author: ""
date: ""
output: html_document
---

```{r message=FALSE}
library(qcc)
library(AcceptanceSampling)
```

### Find plan

* Determine a sampling plan with producers risk point at $(0.02,0.975)$
and consumers risk point at $(0.025,0.01)$, where you assume
hypergeometric sampling with N=500.

```{r eval=FALSE}
plan <- find.plan(PRP=c(..,..), CRP=c(..,..), type = "hyp", N = ..)[1:2]
plan
```

* Determine the actual OC curve of the plan.

```{r}
# Hint: apply the OC2c() function and store the output in e.g. OC_output, and give command: plot(OC_output)
# Please apply "pd=seq(0,0.1,0.002)" within the OC2c function to limit proportion of defectives from 0 to 0.1 but with increased resolution. 
```

### Double sampling
Determine and plot the OC curve of a double sampling plan with
$n_1=n_2=200$, $r_1=5$, $c_1=2$ and $c_2=5$.

```{r}
#find the proper commands by aid of the commands in the slides 
```



