I'm currently studying probability theory with the textbook Probability and Random Processes for Electrical and Computer Engineers (John Gubner) and had a question regarding multiple random variables.
More specifically, this comes from Example 2.10 of section 2.3 Multiple Random Variables - Independence on page 72.
A webpage server can handle $r$ requests per day. Find the probability that the server gets more than $r$ requests at least once in $n$ days. Assume that the number of requests on day $i$ is $X_i \sim \text{Poisson}(\lambda)$ and that $X_1, \dots , X_n$ are independent.
Solution:
$$ \begin{align} P\left(\bigcup_{i = 1}^n \{ X_i \gt r \}\right) & = 1 - P\left( \bigcap_{i = 1}^n \{X_i \le r \} \right) \\\ & = 1 - \prod_{i = 1}^nP\big(X_i \le r \big) \\\ & = 1 - \prod_{i = 1}^n \left( \sum_{i = 1}^r \frac{\lambda^k e^{-\lambda}}{k!} \right) \\\ & = 1 - \left( \sum_{i = 1}^r \frac{\lambda^k e^{-\lambda}}{k!} \right)^n \end{align} $$
I understand the solution, but what's confusing me is how the first line was derived. That is:
$$ P \left( \bigcup_{i = 1}^n \{X_i \gt r \} \right) = 1 - P\left( \bigcap_{i = 1}^n \{ X_i \le r \} \right)$$
I've tried working it out with a simple example of two random variables, but that's also not really making a lot of sense.
How was this equality derived?
$P(E)=1-P(E^{c})$. The complement of the set $\bigcup_{i=1}^{n} \{X_i >r\}$ is exactly the set $\bigcap_{i=1}^{n} \{X_i \leq r\}$ .