Example 8. In the first urn, there are 2 blue and 6 red balls, in the second urn, there are 4 blue and 2 red balls. Two balls are randomly transferred from the first urn to the second, after which one ball is randomly drawn from the second urn.

What is the probability that this ball is blue?

Assuming the ball drawn from the second urn turned out to be blue, what is the probability that the two balls transferred from the first urn to the second were both blue?
Solution. Let's introduce the following notations: event $A$ - "the ball drawn from the second urn is blue"; hypotheses $H_{1}$ - "two blue balls were transferred from the first urn to the second", $H_{2}$ - "two balls of different colors were transferred", $H_{3}$ - "two red balls were transferred".

We will calculate the probabilities of the hypotheses $H_{i}$ and the conditional probabilities $P\left(A / H_{i}\right)(i=1,2,3):$

$$
\begin{aligned}
& P\left(H_{1}\right)=\frac{C_{2}^{2}}{C_{8}^{2}}=\frac{1}{28}, P\left(H_{2}\right)=\frac{C_{2}^{1} \cdot C_{6}^{1}}{C_{8}^{2}}=\frac{12}{28}, P\left(H_{3}\right)=\frac{C_{6}^{2}}{C_{8}^{2}}=\frac{15}{28} \\
& P\left(A / H_{1}\right)=\frac{3}{4}, P\left(A / H_{2}\right)=\frac{5}{8}, P\left(A / H_{3}\right)=\frac{1}{2}
\end{aligned}
$$

Using the formula for total probability, we get the answer to the first question:

$$
P(A)=\frac{1}{28} \cdot \frac{3}{4}+\frac{12}{28} \cdot \frac{5}{8}+\frac{15}{28} \cdot \frac{1}{2}=\frac{9}{16}
$$

To answer the second question, we will use Bayes' formula:

$$
P\left(H_{1} / A\right)=\frac{P\left(H_{1}\right) P\left(A / H_{1}\right)}{P(A)}=\left(\frac{1}{28} \cdot \frac{3}{4}\right): \frac{9}{16}=\frac{1}{21}
$$

## Problems

1. At a factory producing bolts, the first machine produces $30 \%$, the second - $25 \%$, and the third - $45 \%$ of all products. Defects in their products constitute respectively $2 \%, 1 \%, 3 \%$. Find the probabilities that a randomly selected bolt, produced by the first, second, and third machines, is defective.
2. A batch of transistors, of which $10 \%$ are defective, has been delivered for inspection. The inspection scheme is such that with a probability of 0.95 it detects a defect (if it exists), and there is a non-zero probability of 0.03 that a good transistor will be deemed defective. A randomly selected transistor from the batch was found to be defective. What is the probability that the transistor is actually good?
3. An investigation is underway into the causes of a failed rocket launch, for which four hypotheses can be stated: $H_{1}, H_{2}, H_{3}$, or $H_{4}$. According to statistical data, $P\left(H_{1}\right)=0.2, P\left(H_{2}\right)=0.4$, $P\left(H_{3}\right)=0.3, P\left(H_{4}\right)=0.1$. During the investigation, it was found that there was a fuel leak (event $A$). The conditional probabilities of event $A$ according to the same statistics are: $P\left(A / H_{1}\right)=0.9, P\left(A / H_{2}\right)=0$, $P\left(A / H_{3}\right)=0.2, P\left(A / H_{4}\right)=0.3$. Which hypothesis is most likely under these conditions?
4. Identical devices are produced by three factories in a ratio of $1: 2: 3$, and the probabilities of defects for these factories are respectively $3 \%, 2 \%, 1 \%$. A device purchased by a research institute turned out to be defective. What is the probability that this device was produced by the first factory (the factory mark on the device was absent)?
5. A batch of parts was manufactured by three workers, with the first making $35 \%$ of all parts, the second - $40 \%$, and the third - the rest of the production. Defects in their products constitute: for the first - $2 \%$, for the second - $3 \%$, for the third - $4 \%$. A randomly selected part for inspection turned out to be defective. Find the probability that it was made by the third worker.

## Answers

1. 2) 0,$272 ; 2) 0,113 ; 3) 0,614 \cdot 2 \cdot 0,221$. 3. $H_{1} \cdot 4 \cdot 0,3 \cdot 5 \cdot 0,345$.

## Chapter 2. Random Variables, Their Distributions, and Numerical Characteristics

## § 2.1. Discrete and Continuous Random Variables. Distribution Law of a Discrete Random Variable

A random variable is a variable that, depending on the outcomes of an experiment, takes values that depend on chance.

A random variable that takes different values that can be listed as a finite or infinite sequence is called a discrete random variable.

A random variable that can take all values from a certain interval is called a continuous random variable.

Random variables will be denoted by capital letters of the Latin alphabet $X, \dot{Y}, Z$..., and their values by lowercase letters with indices, for example, $x_{1}, x_{2}, x_{3}, \ldots$

The distribution law of a discrete random variable is the correspondence between the values $x_{1}, x_{2}, x_{3}, \ldots$ of this variable and their probabilities $p_{1}, p^{2}, p_{3}, \ldots$.

The distribution law of a discrete random variable can be defined by a table or analytically (i.e., using formulas).

If a discrete random variable $X$ takes a finite set of values $x_{1}, x_{2}, \ldots, x_{n}$ with respective probabilities $p_{1}, p_{2}, \ldots, p_{n}$, then its distribution law is defined by the formulas

$$
P\left(X=x_{k}\right)=p_{k} \quad(k=1,2, \ldots n)
$$

$$
\sum_{k=1}^{n} p_{k}=1
$$

This law can also be defined by a table (see Table 2.1).

Table 2.1

| $X$ | $x_{1}$ | $x_{2}$ | $x_{3}$ | $\ldots$ | $x_{n}$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| $P$ | $p_{1}$ | $p_{2}$ | $p_{3}$ | $\ldots$ | $p_{n}$ |

In this table, the sum of the probabilities is also equal to one:

![](https://cdn.mathpix.com/cropped/2024_05_22_720b3cbdc89c57e2b629g-084.jpg?height=51&width=1100&top_left_y=564&top_left_x=9)
a group of events, so the equality (2.1.2) holds.

For clarity, the distribution law of a discrete random variable is graphically represented by plotting points $\left(x_{k}, p_{k}\right)$ in a rectangular Cartesian coordinate system and connecting them sequentially with line segments. The resulting broken line is called the distribution polygon of the random variable $X$.

If a discrete random variable $X$ takes an infinite sequence of values $x_{1}, x_{2}, x_{3}, \ldots$ with respective probabilities $p_{1}, p_{2}, p_{3} \ldots$, then its distribution law is defined by the formulas

$$
\begin{gathered}
P\left(X=x_{k}\right)=p_{k} \quad(k=1,2,3, \ldots) \\
\sum_{k=1}^{\infty} p_{k}=1
\end{gathered}
$$

This distribution law of a discrete random variable $X$, which takes an infinite sequence of values $x_{1}, x_{2}, x_{3}, \ldots$ can also be defined by a table (see Table 2.2).

Table 2.2

| $X$ | $x_{1}$ | $x_{2}$ | $x_{3}$ | $\ldots$ | $x_{n}$ | $\ldots$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $P$ | $p_{1}$ | $p_{2}$ | $p_{3}$ | $\ldots$ | $p_{n}$ | $\ldots$ |

The series composed of the numbers $p_{1}, p_{2}, p_{3} \ldots$ in Table 2.2 converges and its sum is equal to one.

Remark. The difference between Table 2.2 and Table 2.1 is that the second table does not have a last value; the first table does.

84

17 Example 1. Do the following tables define the distribution law of a discrete random variable?

a)

| $X$ | 2 | 3 | 4 | 5 |
| :---: | :---: | :---: | :