Example 10. Two dice are rolled, and the sum of the points on the upper faces is calculated. What is more likely - to get a sum of 7 or 8?
Solution. Let's denote the events: $A$ - "7 points have fallen", $B$ - "8 points have fallen". Event $A$ is favorable in 6 elementary outcomes: $(1 ; 6)$, $(2 ; 5)$, $(3 ; 4)$, $(4 ; 3)$, $(5 ; 2)$, $(6 ; 1)$, and event $B$ in 5 outcomes: $(2 ; 6)$, $(3 ; 5)$, $(4 ; 4)$, $(5 ; 3)$, $(6 ; 2)$. The total number of equally possible elementary outcomes is $n=6^{2}=36$ (see table 1.1). Therefore,

$$
P(A)=\frac{6}{36}=\frac{1}{6} \approx 0.167 ; \quad P(B)=\frac{5}{36} \approx 0.139
$$

Thus, $P(A)>P(B)$; getting a total of 7 points is a more likely event than getting a total of 8 points.

## Problems

1. A natural number not exceeding 30 is chosen at random. What is the probability that this number is divisible by 3?
2. In an urn, there are $a$ red and $b$ blue balls, identical in size and weight. What is the probability that a ball randomly drawn from this urn will be blue?
3. A number not exceeding 30 is chosen at random. What is the probability that this number is a divisor of 30?
4. In an urn, there are $a$ blue and $b$ red balls, identical in size and weight. One ball is drawn from this urn and set aside. This ball turned out to be red. After this, another ball is drawn from the urn. Find the probability that the second ball is also red.
5. A natural number not exceeding 50 is chosen at random. What is the probability that this number is prime?
6. Three dice are rolled, and the sum of the points on the upper faces is counted. Which is more likely - to get a total of 9 or 10 points?
7. Three dice are rolled, and the sum of the points that fall is counted. Which is more likely - to get a total of 11 (event $A$) or 12 points (event $B$)?

## Answers

1. $1 / 3$. 2. $8 /(a+b)$. 3. 0.2. 4. $(b-1) /(a+b-1)$. 5. 0.3. 6. $p_{1}=25 / 216$ - the probability of getting a total of 9 points; $p_{2}=27 / 216$ - the probability of getting a total of 10 points; $p_{2}>p_{1}$. 7. $P(A)=27 / 216, P(B)=25 / 216, P(A)>P(B)$.

## Questions

1. What is called the probability of an event?
2. What is the probability of a certain event?
3. What is the probability of an impossible event?
4. Within what limits is the probability of a random event confined?
5. Within what limits is the probability of any event confined?
6. What definition of probability is called classical?

## § 1.3. Combinatorics and Probability

Combinatorics studies methods of counting the number of elements in finite sets. Combinatorial formulas are used in the direct calculation of probabilities.

Sets of elements, consisting of the same distinct elements and differing only in their order, are called permutations of these elements. The number of all possible permutations of $n$ elements is denoted by $P_{n}$; this number is equal to $n!$ (read as "n factorial"):

$$
P_{n}=n!,
$$

where

$$
n!=1 \cdot 2 \cdot 3 \cdot \ldots \cdot n
$$

Remark 1. For an empty set, it is agreed that an empty set can be ordered in only one way; by definition, $0!=1$.

Arrangements are sets composed of $n$ different elements taken $m$ at a time, which differ either in the composition of elements or in their order. The number of all possible arrangements is given by the formula

$$
A_{n}^{m}=n(n-1)(n-2) \ldots(n-m+1)
$$

Combinations of $n$ different elements taken $m$ at a time are sets containing $m$ elements from the $n$ given, and which differ by at least one element. The number of combinations of $n$ elements taken $m$ at a time is denoted by $C_{n}^{m}$ or $\binom{n}{m}$. This number is expressed by the formula

$$
C_{n}^{m}=\frac{n!}{m!(n-m)!}
$$

Remark 2. By definition, $C_{n}^{0}=1$.

For the number of combinations, the following equalities hold:

$$
\begin{aligned}
& C_{n}^{m}=C_{n}^{n-m}, \quad C_{n+1}^{m+1}=C_{n}^{m}+C_{n}^{m+1} \\
& C_{n}^{0}+C_{n}^{1}+C_{n}^{2}+\ldots+C_{n}^{n-1}+C_{n}^{n}=2^{n}
\end{aligned}
$$

The last equality is sometimes formulated as the following theorem about finite sets.

The number of all subsets of a set consisting of $n$ elements is $2^{n}$.

Note that the numbers of permutations, arrangements, and combinations are related by the equality

$$
C_{n}^{m}=\frac{A_{n}^{m}}{P_{m}}
$$

Remark 3. Above, it was assumed that all $n$ elements are distinct. If some elements are repeated, then in this case, sets with repetitions are calculated using other formulas.

For example, if among $n$ elements there are $n_{1}$ elements of one kind, $n_{2}$ elements of another kind, and so on, then the number of permutations with repetitions is given by the formula

$$
P_{n}\left(n_{1}, n_{2}, \ldots, n_{k}\right)=\frac{n!}{n_{1}!\cdot n_{2}!\cdot \ldots \cdot n_{k}!}
$$

where $n_{1}+n_{2}+\ldots+n_{k}=n$.

The number of arrangements with repetitions of $m$ elements from $n$ elements is $n^{m}$, i.e.,

$$
\left(A_{n}^{m}\right)_{\text{with rep.}}=n^{m}
$$

- The number of combinations with repetitions of $m$ elements from $n$ elements is equal to the number of combinations without repetitions of $m$ elements from $n+m-1$ elements, i.e.,

$$
\left(C_{n}^{m}\right)_{\text{with rep.}}=C_{n+m-1}^{m}
$$

When solving combinatorial problems, the following rules are used.

Rule of Sum. If an object $A$ can be chosen from a set of objects in $m$ ways, and another object $B$ can be chosen in $n$ ways, then choosing either $A$ or $B$ can be done in $m+n$ ways.

Rule of Product. If an object $A$ can be chosen from a set of objects in $m$ ways and after each such choice, an object $B$ can be chosen in $n$ ways, then the pair of objects $(A, B)$ in the specified order can be chosen in $m \cdot n$ ways.

The classical scheme for calculating probabilities is suitable for solving a number of practical problems. Consider, for example, some set of elements of volume $N$. These can be items, each of which is either good or defective, or seeds, each of which can either germinate or not. Such situations are described by the urn scheme: in an urn, there are $N$ balls, of which $M$ are blue and $(N-M)$ are red.

From an urn containing $N$ balls, of which $M$ are blue, $n$ balls are drawn. It is required to determine the probability that in the sample of size $n$, there will be $m$ blue balls. Let $A$ be the event "in the sample of size $n$, there are $m$ blue balls", then

$$
P(A)=\frac{C_{M}^{m} C_{N-M}^{n-m}}{C_{N}^{n}}=P_{M, N}(m, n)
$$