Example 11. On average, $85 \%$ of the items coming off the conveyor are of the first grade. How many items need to be taken so that with a probability of 0.997, the deviation of the frequency of first-grade items from the probability $p=0.85$ in absolute value does not exceed $0.01?$
Solution. We will use the formula

$$
P\left(\left|\frac{m}{n}-p\right| \leq \varepsilon\right)=2 \Phi\left(\varepsilon \sqrt{\frac{n}{p q}}\right)
$$

From the condition, it follows that $p=0.85, q=1-0.85=0.15, \varepsilon=0.01$, $P=0.997$. We need to determine the value of $n$. Since

$$
2 \Phi\left(\varepsilon \sqrt{\frac{n}{p q}}\right)=0.997, \quad \Phi\left(\varepsilon \sqrt{\frac{n}{p q}}\right)=0.4985
$$

we first solve the equation $\Phi(t)=0.4985 ; t=2.96$. Therefore,

$$
\varepsilon \sqrt{\frac{n}{p q}}=2.96, \quad \text { from which } \quad n=(2.96)^{2} \cdot \frac{p q}{\varepsilon^{2}}
$$

Substituting the values of $p, q$ and $\varepsilon$ into the last equation, we find $n$ :

$$
n=(2.96)^{2} \cdot \frac{0.85 \cdot 0.15}{(0.01)^{2}}, \quad n=11171
$$