Example 6.21. 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 0.85 in absolute value does not exceed 0.01?
Solution. Here $p=0.85, q=1-0.85=0.15, \varepsilon=0.01, P=0.997$, $n-$? Since in the equation $P\left|\frac{m}{n}-p\right|<\varepsilon \approx \Phi \varepsilon \sqrt{\frac{n}{p q}}$ the probability $P$ on the left is known, we first solve the equation $\Phi(t)=P$. Let $t_{P}$ be the root of this equation. Then $\varepsilon \sqrt{\frac{n}{p q}} \approx t_{P}, \varepsilon^{2} \frac{n}{p q} \approx t_{P}^{2}$ and, consequently, $n \approx \frac{p q t_{P}^{2}}{\varepsilon^{2}}$. For our case $t_{0.997}=3$, therefore

$$
n \approx \frac{0.85 \cdot 0.15 \cdot 3^{2}}{(0.01)^{2}}=\frac{1.1475}{0.0001}=11475
$$

## 6.3. Random Variables

A random variable (RV) is a variable that takes on a specific numerical value in each specific trial, which can vary from trial to trial.

Examples: the number of customers visiting a hair salon in a day; the monthly profit of a tailor shop; the development time of a photographic film.

Random variables represent the results of measurements in random experiments (trials). There are two types of random variables: discrete and continuous.

Discrete random variables are variables that take only distinct numerical values (which can be listed in advance).

Examples: grades in a grade book $(3,4,5)$; the number of students taking an exam

Continuous random variables can take any values from a closed or open interval. For example, the dimensions of the same part, determined by different people or using different tools, vary.

Combined (discrete-continuous) random variables are possible, which are continuous on some intervals and discrete on others.