Example 5. Two fair coins are tossed, and the number of heads on both upper sides of the coins is counted. Consider the discrete random variable $X$ - the number of heads that appear on both coins. Write the distribution law of the random variable $X$.
Solution. In this experiment, there are four equally likely elementary outcomes: $(\Gamma, \Gamma),(\Gamma, L),(Ц, \Gamma),(Ц, L);$ the notation $(\Gamma, L)$ means that the coat of arms fell on the first coin, and the tail on the second; the other notations have a similar meaning. The coat of arms can fall 1 time, 2 times, or not appear at all. Therefore, the random variable $X$ can take only three values: $x_{1}=0, x_{2}=1, x_{3}=2$. Let's find the probabilities of these values:

$$
\begin{gathered}
P(X=0)=\frac{1}{4}=0.25 ; P(X=1)=\frac{2}{4}=0.50 ; P(X=2)=\frac{1}{4}=0.25 ; \\
p_{1}=0.25, p_{2}=0.50, p_{3}=0.25 ;
\end{gathered}
$$

where $p_{1}+p_{2}+p_{3}=1$.

Thus, the distribution law of this random variable can be given by the table

| $X$ | 0 | 1 | 2 |
| :---: | :---: | :---: | :---: |
| $P$ | 0.25 | 0.50 | 0.25 |