Example. There are $n$ boxes and $r$ balls. The balls are randomly placed into the boxes. Find the probability that the $i$-th box will contain $k$ balls, and the boxes with numbers $1,2, \ldots, i-1$ will contain in total $l$ balls $(k+l \leqslant r)$.
Solution. When the number of equally possible elementary outcomes is finite, the probability of an event is equal to the ratio of the number of elementary outcomes favorable to this event to the total number of elementary outcomes.

1. Define the space of elementary outcomes.

Number all the boxes and all the balls. Then an elementary outcome of the considered random experiment is a set of numbers $\left(i_{1}, i_{2}, \ldots, i_{r}\right)$, where $i_{1}$ is the number of the box in which the first ball ends up, $i_{2}$ is the number of the box in which the second ball ends up, and so on. Obviously, each of the numbers $i_{1}, i_{2}, \ldots, i_{r}$ can take any natural value from 1 to $n$.

2. Check the equiprobability of elementary outcomes.

It is assumed that this is guaranteed by the methodology of conducting the random experiment, i.e., the placement of balls into boxes.

3. Select those elementary outcomes that lead to the occurrence of event $A$ (favorable outcomes).

An elementary outcome is favorable if the $i$-th box contains $k$ balls, and the first, second, $\ldots,(i-1)$-th boxes together contain $l$ balls.

4. Count the total number of elementary outcomes $N$ (the number of elements in the space of elementary outcomes).

The number of elementary outcomes is $n^{r}$, since each of the $r$ positions in the set $\left(i_{1}, i_{2}, \ldots, i_{r}\right)$ can be any of the $n$ numbers $1,2, \ldots, n$ and these positions are filled independently of each other.

5. Count the number of elementary outcomes $N_{A}$ favorable to event $A$.

First, there are $C_{r}^{k}$ ways to select $k$ balls that will be in the $i$-th box.

Second, there are $C_{r-k}^{l}$ ways to select $l$ balls from the remaining $(r-k)$ balls, which will be placed in the first $(i-1)$ boxes. The number of ways to place these $l$ balls in $(i-1)$ boxes is $(i-1)^{l}$.

Third, the number of ways to place the remaining $(n-k-l)$ balls in the remaining $(n-i)$ boxes is $(n-i)^{r-k-l}$.

Therefore, the number of favorable outcomes is

$$
N_{A}=C_{r}^{k} C_{r-k}^{l}(i-1)^{l}(n-i)^{r-k-l}
$$

6. According to the classical definition of probability

$$
\mathrm{P}(A)=\frac{N_{A}}{N}=\frac{C_{r}^{k} C_{r-k}^{l}(i-1)^{l}(n-i)^{r-k-l}}{n^{r}}
$$

Answer. $\mathrm{P}(A)=C_{r}^{k} C_{r-k}^{l}(i-1)^{l}(n-i)^{r-k-l} / n^{r}$.

Conditions of the Problem. There are $n$ boxes and $r$ balls. The balls are randomly distributed among the boxes. Find the probability of the specified random event.

1. All balls will end up in different boxes $(r \leqslant n)$.
2. At least two balls will end up in the same box $(r \leqslant n)$.
3. All balls will end up in one fixed box.
4. Exactly $k$ balls will end up in one fixed box, and $l$ balls in another fixed box $(k+l \leqslant r)$.
5. $r_{i}$ balls will end up in the $i$-th box, $i=1,2, \ldots, n ; r_{1}+r_{2}+\ldots+r_{n}=r$.

6. All balls will end up in one box.

7. Exactly $k$ balls will end up in a fixed box $(k \leqslant r)$.
8. All balls will end up in two boxes.
9. All balls will end up in two fixed boxes.
10. Only one box will be empty.

Answers. $\quad 1 . n!/\left[(n-r)!n^{r}\right] . \quad 2.1-n!/\left[(n-r)!n^{r}\right] . \quad 3.1 / n^{r}$. 4. $C_{r}^{k} C_{r-k}^{l}(n-2)^{r-k-l} / n^{r}$. 5. $C_{r}^{r_{1}} C_{r-r_{1}}^{r_{2}} C_{r-r_{1}-r_{2}}^{r_{3}} \cdot \ldots \cdot C_{r_{n-1}+r_{n}}^{r_{n-1}} / n^{r}$. 6. $1 / n^{r-1}$. 7. $C_{r}^{k}(n-1)^{r-k} / n^{r}$. 8. $C_{n}^{2} 2^{r} / n^{r}$. 9. $2^{r} / n^{r}$. 10. $(n-1)^{r} / n^{r-1}$.

## 6.4. Geometric Probabilities (bounded area)

Problem Statement. A point is randomly chosen in some bounded plane area $D$. The word "randomly" here means that no part of the area $D$ is (for any reason) more preferable than any other part of the same area. Find the probability that the chosen point will be in some area $G \subset D$.

Plan of Solution. When the number of equally possible (in the above sense) elementary outcomes, represented by points in the area on the plane, is infinite, the probability of an event is equal to the ratio of the area of the set of elementary outcomes favorable to this event to the area of the entire set of elementary outcomes.

1. Define the space of elementary outcomes.

In this case, it coincides with the area $D$.

2. Check the equiprobability of elementary outcomes.

In this case, it is guaranteed by the methodology of conducting the random experiment, as stated in the problem, no part of the area $D$ is (for any reason) more preferable than any other part of the same area.

3. Select those elementary outcomes that lead to the occurrence of event $A$ (favorable outcomes).

In this case, the set of favorable outcomes coincides with the area $G$.

4. Find the area $S(D)$ of the area $D$.

It is convenient to graphically represent the area $D$.

5. Find the area $S(G)$ of the area $G$.

It is convenient to graphically represent the area $G$.

6. According to the geometric definition of probability

$$
\mathrm{P}(A)=\frac{S(G)}{S(D)}
$$

Remark. Similarly, the corresponding probability is calculated in the case when the random selection of a point occurs in a bounded area on a line or in space. In this case, the area is replaced by length or volume.