Example 8. The probability of producing a non-standard item with a certain technological process is 0.06. The inspector takes an item from the batch and immediately checks its quality. If it turns out to be non-standard, further tests are stopped, and the batch is held. If the item is standard, the inspector takes the next one, and so on, but no more than five items are checked. Find the distribution law of the discrete random variable $X$ - the number of items checked.
Solution. The discrete random variable $X$ can take five values: $x_{1}=1, x_{2}=2, x_{3}=3, x_{4}=4, x_{5}=5$. It will take the value $x_{1}=1$, i.e., only one item will be checked and the batch will be detained, if the first item checked by the inspector turns out to be non-standard. The probability of such an outcome of the trial is $P(X=1)=0.06$.

Two items are checked, i.e., $X=2$, if the first item turns out to be standard and the second non-standard. The probability of such an outcome of the trial can be found using the multiplication theorem: $P(X=2)=0.94 \cdot 0.06 \approx 0.056 \quad$ (here $0.94=1-0.06$ is the probability that the item will be standard).

The trial will be limited to checking the quality of three items if the first two turn out to be standard and the third non-standard. According to the multiplication theorem, the probability of such an outcome of the trials is $P(X=3)=0.94^{2} \cdot 0.06 \approx 0.053$. Similarly, we find $P(X=4)=0.94^{3} \cdot 0.06 \approx 0.050$.

Five items are checked if the first four turn out to be standard, as the inspection of the batch ends under any quality of the fifth item by the condition. We have $P(X=5)=0.94^{4} \approx 0.781$.

Remark. The same result can be obtained in another way. Five items are checked in two cases, which are mutually exclusive events: 1) the first four items turn out to be standard and the fifth is also standard; 2) the first four items turn out to be standard and the fifth is non-standard. The probabilities of these cases, according to the multiplication theorem for independent events, are $0.94^{4} \cdot 0.94$ and $0.94^{4} \cdot 0.06$, and therefore, in accordance with the addition theorem, the probability that the inspector will check five items is determined as follows:

$$
P(X=5)=0.94^{4} \cdot 0.94 + 0.94^{4} \cdot 0.06 = 0.94^{4} \cdot (0.94 + 0.06) = 0.94^{4} \approx 0.781
$$

Thus, the distribution law of the considered random variable $X$ can be represented as follows:

| $X$ | 1 | 2 | 3 | 4 | 5 |
| :---: | :---: | :---: | :---: | :---: | :---: |
| $P$ | 0.06 | 0.056 | 0.053 | 0.050 | 0.781 |

Note that $0.06 + 0.056 + 0.053 + 0.050 + 0.781 = 1$, i.e., the condition (2.1.2) is satisfied.