1. [3 points] A coin is flipped 80 times (the probabilities of heads and tails in each flip are the same). Let $p$ be the probability that heads will appear more than 51 times, and $q$ be the probability that heads will appear no more than 29 times. Find $p-q$
Answer: $-\frac{1}{2^{80}} \cdot C_{80}^{29}$.

Solution. Since the probability of getting heads or tails is equal, the probability of getting 80 heads is the same as the probability of getting 80 tails (i.e., 0 heads); the probability of getting 79 heads is the same as the probability of getting 79 tails (i.e., one head), and so on. Let's denote the probability of getting exactly $k$ heads as $p_{k}$. Then $p=p_{52}+p_{53}+\ldots+p_{80}, q=p_{0}+p_{1}+\ldots+p_{29}$, and due to the above, $q=p_{80}+p_{79}+\ldots+p_{51}$. Therefore, $p-q=-p_{51}=-p_{29}$.

Let's calculate the probability that heads appear exactly 29 times in 80 tosses. If we denote the appearance of heads by 1 and the appearance of tails by 0, then each sequence of 80 tosses can be characterized by a sequence of digits consisting of zeros and ones. The probability of getting any such sequence is $\frac{1}{2^{80}}$. We are interested in all sequences of events that contain exactly 29 ones. The number of such sequences is $C_{80}^{29}$ (we choose 29 positions out of the available 80 for the ones, and the remaining positions are filled with zeros). Therefore, the probability of getting at least one such sequence is $\frac{1}{2^{80}} \cdot C_{80}^{29}$. This is $p_{29}$.